Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT-#7368: Add a new environment variable for using dynamic partitioning #7369

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

Retribution98
Copy link
Collaborator

@Retribution98 Retribution98 commented Aug 13, 2024

The use of Dynamic-partitioning depends on various factors such as data size, number of CPUs, operations performed,
and it is up to the user to determine whether Dynamic-partitioning will give a boost in his case or not.

Performance results for abs:

32 CPUS

image

112 CPUS

image

  • first commit message and PR title follow format outlined here

    NOTE: If you edit the PR title to match this format, you need to add another commit (even if it's empty) or amend your last commit for the CI job that checks the PR title to pick up the new PR title.

  • passes flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
  • [x passes black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
  • signed commit with git commit -s
  • Resolves Add a new environment variable for using dynamic partitioning #7368
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

…amic partitioning

Signed-off-by: Kirill Suvorov <kirill.suvorov@intel.com>
the combined tasks carries more overhead than assigning them separately.

Unfortunately, the use of Dynamic-partitioning depends on various factors such as data size, number of CPUs, operations performed,
and it is up to the user to determine whether Dynamic-partitioning will give a boost in his case or not.
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we plan to look for a heuristic that can switch implementations automatically, then we could add a few words about this (and a link to the issue).

Retribution98 and others added 2 commits August 19, 2024 11:05
Co-authored-by: Anatoly Myachev <anatoliimyachev@mail.com>
@@ -675,7 +676,7 @@ def map_partitions(
NumPy array
An array of partitions
"""
if np.prod(partitions.shape) <= 1.5 * CpuCount.get():
if not DynamicPartitioning.get():
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be good to keep the previous default behavior.

Suggested change
if not DynamicPartitioning.get():
if np.prod(partitions.shape) <= 1.5 * CpuCount.get() and not DynamicPartitioning.get():

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you think we should do that? Shouldn't the user be given more freedom to decide when to activate this option?
The user can activate this locally, only for the required operations.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The user now has the ability to force the use of another code branch at his own choice, this is already more flexibility than before. And since this condition worked quite well before and considering that slowdowns are possible when using this new variable, I would replace the default behavior more carefully.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Confused with similar code in rebalance_partitions function. Ok, leave it as is.

@anmyachev anmyachev merged commit 05e5c48 into modin-project:main Aug 19, 2024
38 checks passed
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.

Add a new environment variable for using dynamic partitioning
2 participants