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

Fix obj.save() when threading is enabled #5993

Merged
merged 2 commits into from
Dec 5, 2023
Merged

Conversation

maximlt
Copy link
Member

@maximlt maximlt commented Dec 5, 2023

Fixes #5957

.save() internally calls with config.set(embed=True), and config.set() stores the original values of all the config Parameters plus their overrides, to reset them later when the context manager exits. This leads to config.__setattr__ being called quite a lot and I noticed that while nthreads was declared in config._globals, setting _nthreads would still go through the code path that sets up config._session_config. This change deals with such case, i.e. when the string declared in config._globals is not a reference to the parameter name itself (e.g. admin_plugins) but to its property (e.g. nthreads, comms).

@maximlt maximlt changed the title Fix save nthreads Fix obj.save() when threading is enabled Dec 5, 2023
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6690bd3) 84.36% compared to head (32451d8) 84.65%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5993      +/-   ##
==========================================
+ Coverage   84.36%   84.65%   +0.28%     
==========================================
  Files         291      291              
  Lines       43452    43471      +19     
==========================================
+ Hits        36660    36800     +140     
+ Misses       6792     6671     -121     
Flag Coverage Δ
ui-tests 40.81% <14.28%> (+<0.01%) ⬆️
unitexamples-tests 72.74% <100.00%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@philippjfr philippjfr merged commit a03726b into main Dec 5, 2023
12 of 13 checks passed
@philippjfr philippjfr deleted the fix_save_nthreads branch December 5, 2023 08:32
philippjfr pushed a commit that referenced this pull request Dec 12, 2023
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.

Can't hv.save html file when threading is enabled
2 participants