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

Support for unsetting environment variables #8144

Merged
merged 1 commit into from Sep 4, 2023

Conversation

crusaderky
Copy link
Collaborator

@mrocklin
Copy link
Member

cc @ntabris

@github-actions
Copy link
Contributor

github-actions bot commented Aug 31, 2023

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

       21 files  ±  0         21 suites  ±0   10h 56m 23s ⏱️ - 11m 42s
  3 793 tests +  1    3 683 ✔️ +  2     107 💤 ±0  3  - 1 
36 667 runs  +22  34 865 ✔️ +28  1 799 💤  - 5  3  - 1 

For more details on these failures, see this check.

Results for commit 702f065. ± Comparison against base commit 9ba2eed.

♻️ This comment has been updated with latest results.

Copy link
Member

@hendrikmakait hendrikmakait left a comment

Choose a reason for hiding this comment

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

Thanks, @crusaderky!

@ntabris
Copy link
Contributor

ntabris commented Sep 1, 2023

Just to be clear, this PR doesn't actually change the behavior of the code that (I think) was supposed to demonstrate the problem in #8143 (comment)

That's probably fine, but it's a little confusing.

In particular, dask.config.set({"distributed.nanny.pre-spawn-environ": {'OMP_NUM_THREADS': 2}}) won't prevent the default values of (eg) MALLOC_TRIM_THRESHOLD_, you'd need to explicitly say

dask.config.set({"distributed.nanny.pre-spawn-environ": {
  'OMP_NUM_THREADS': 2,
  'MALLOC_TRIM_THRESHOLD_': None
}})

@crusaderky
Copy link
Collaborator Author

Just to be clear, this PR doesn't actually change the behavior of the code that (I think) was supposed to demonstrate the problem in #8143 (comment)

That's probably fine, but it's a little confusing.

In particular, dask.config.set({"distributed.nanny.pre-spawn-environ": {'OMP_NUM_THREADS': 2}}) won't prevent the default values of (eg) MALLOC_TRIM_THRESHOLD_, you'd need to explicitly say

dask.config.set({"distributed.nanny.pre-spawn-environ": {
  'OMP_NUM_THREADS': 2,
  'MALLOC_TRIM_THRESHOLD_': None
}})

this is correct.

@crusaderky
Copy link
Collaborator Author

dask.config.set({"distributed.nanny.pre-spawn-environ": {
  'OMP_NUM_THREADS': 2,
  'MALLOC_TRIM_THRESHOLD_': None
}})

this is correct.

or just write

dask.config.set({"distributed.nanny.pre-spawn-environ.MALLOC_TRIM_THRESHOLD_': None})

@crusaderky crusaderky merged commit c6d929b into dask:main Sep 4, 2023
24 of 28 checks passed
@crusaderky crusaderky deleted the unset_env_vars branch September 4, 2023 12:56
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.

Unsetting MALLOC_TRIM_THRESHOLD_ is sensitive to import order
4 participants