Repository navigation
[Bug] Pass max_cores to TaskSchedulerBase in OneProcessTaskScheduler - #1127
chenyangsu wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1127 +/- ##
==========================================
+ Coverage 94.16% 94.20% +0.04%
==========================================
Files 39 39
Lines 2210 2210
==========================================
+ Hits 2081 2082 +1
+ Misses 129 128 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
With
SingleNodeExecutor(max_cores=2, disable_dependencies=True)orOneProcessTaskScheduler(max_cores=2), submitting a task withresource_dict={"cores": 4}does not raiseValueErrorasDependencyTaskSchedulerdoes.OneProcessTaskScheduler.__init__passesexecutor_kwargs.get("max_cores")(None) toTaskSchedulerBase.__init__, leaving_max_coresunset so_wait_for_free_slotsloops indefinitely.Pass
max_cores=max_coresdirectly tosuper().__init__and add unit tests covering both rejection and acceptance at themax_coreslimit. Happy to also validatecores * threads_per_coreagainstmax_coresinTaskSchedulerBase.submitif you prefer.Testing:
pytest tests/unit/task_scheduler/interactive/test_onetoone.py(3 passed) plus 39 unit tests (42 passed);ruff check,ruff format --check, andmypyononetoone.pyclean.Summary by CodeRabbit