[Fix] Move openmpi_oversubscribe to init function rather than resource_dict#937
[Fix] Move openmpi_oversubscribe to init function rather than resource_dict#937jan-janssen merged 1 commit intomainfrom
Conversation
📝 WalkthroughWalkthroughThe pull request adds a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #937 +/- ##
=======================================
Coverage 93.89% 93.89%
=======================================
Files 38 38
Lines 1981 1981
=======================================
Hits 1860 1860
Misses 121 121 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/executorlib/executor/flux.py`:
- Line 73: The docstring for the openmpi_oversubscribe parameter is misleading
because create_flux_executor calls check_oversubscribe() which raises a
ValueError when True; update the docstrings on FluxJobExecutor and
FluxClusterExecutor (where openmpi_oversubscribe is documented) to either remove
the claim that it "adds the `--oversubscribe` command flag" or explicitly state
that openmpi_oversubscribe is unsupported for the Flux backend and will raise an
error via check_oversubscribe(); reference create_flux_executor and
check_oversubscribe in your change so readers know why the parameter cannot be
True.
| export_workflow_filename (str): Name of the file to store the exported workflow graph in. | ||
| log_obj_size (bool): Enable debug mode which reports the size of the communicated objects. | ||
| wait (bool): Whether to wait for the completion of all tasks before shutting down the executor. | ||
| openmpi_oversubscribe (bool): adds the `--oversubscribe` command flag (OpenMPI and SLURM) - default False |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find the check_oversubscribe function definition and implementation
rg -n -B 2 -A 15 'def check_oversubscribe' src/executorlib/Repository: pyiron/executorlib
Length of output: 1369
🏁 Script executed:
#!/bin/bash
# Look at the create_flux_executor function to confirm key deletion
rg -n -B 5 -A 20 'def create_flux_executor' src/executorlib/executor/flux.pyRepository: pyiron/executorlib
Length of output: 1116
🏁 Script executed:
#!/bin/bash
# Check the docstring at lines 73 and 275 to see the exact wording
sed -n '60,85p' src/executorlib/executor/flux.py
sed -n '260,290p' src/executorlib/executor/flux.pyRepository: pyiron/executorlib
Length of output: 3918
🏁 Script executed:
#!/bin/bash
# Get the full create_flux_executor implementation
sed -n '453,600p' src/executorlib/executor/flux.pyRepository: pyiron/executorlib
Length of output: 6435
🏁 Script executed:
#!/bin/bash
# Also check where create_flux_executor is called from FluxJobExecutor
rg -n -B 3 -A 3 'create_flux_executor' src/executorlib/executor/flux.py | head -40Repository: pyiron/executorlib
Length of output: 1317
Remove or clarify openmpi_oversubscribe docstring for Flux executors — parameter causes runtime error
The docstring claims the parameter "adds the --oversubscribe command flag (OpenMPI and SLURM)", but create_flux_executor calls check_oversubscribe() which raises a ValueError if the value is True:
"Oversubscribing is not supported for the executorlib.flux.PyFLuxExecutor backend.
Please use oversubscribe=False instead of oversubscribe=True."
This affects both FluxJobExecutor and FluxClusterExecutor. The docstring (at lines 73 and 275) should either be removed or clarified to note that this parameter is unsupported on the Flux backend and will raise an error if set to True.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/executorlib/executor/flux.py` at line 73, The docstring for the
openmpi_oversubscribe parameter is misleading because create_flux_executor calls
check_oversubscribe() which raises a ValueError when True; update the docstrings
on FluxJobExecutor and FluxClusterExecutor (where openmpi_oversubscribe is
documented) to either remove the claim that it "adds the `--oversubscribe`
command flag" or explicitly state that openmpi_oversubscribe is unsupported for
the Flux backend and will raise an error via check_oversubscribe(); reference
create_flux_executor and check_oversubscribe in your change so readers know why
the parameter cannot be True.
Summary by CodeRabbit
Release Notes