Skip to content

[testing] Local multi-processing executor#1024

Open
kumare3 wants to merge 2 commits into
mainfrom
local-exec-multi-proc
Open

[testing] Local multi-processing executor#1024
kumare3 wants to merge 2 commits into
mainfrom
local-exec-multi-proc

Conversation

@kumare3
Copy link
Copy Markdown
Contributor

@kumare3 kumare3 commented Apr 30, 2026

flyte run --local-multi ... will now run locally across multiple processes.

flyte.with_runcontext(mode="local-multi").run() does the same

```flyte run --local-multi ...``` will not run locally across multiple processes.

```flyte.with_runcontext(mode="local-multi").run()``` does the same

Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
import concurrent.futures

ControllerType = Literal["local", "remote"]
ControllerType = Literal["local", "local-multi", "remote"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use multi-process when the user specifies local[4] (i.e., use 4 processes)?
Same as spark local mode. https://github.com/tomaztk/Spark-for-data-engineers/blob/main/SparkEngineers/04_Spark-Architecture-Local-and-cluster-mode.md#spark-architecture---local-and-cluster-mode

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know if we can do that, as it maybe nested, or are you saying its parallel limit?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local[4] would be nice if we could

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the challenge is deadlock, if local[4] but, we need more to complete then how can we stop

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, I mean parallel limit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i mean this

_DEFAULT_MAX_WORKERS = min(os.cpu_count() or 1, 8)

Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants