Skip to content

Commit

Permalink
rename max_jobs to max_jobs_per_batch
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetretto committed Oct 24, 2024
1 parent c53087a commit 294e8f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions doc/source/user/advancedoptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,13 @@ end of one Job and the availability of a new one the *batch* job in the queue wi

.. warning::

The ``batch`` section of a worker's configuration also has a ``max_jobs`` option.
It allows for the definition of the maximum number of jobflow Jobs that will be executed in a single
process submitted to the queue (e.g. a SLURM job). This should not be confused with
The ``batch`` section of a worker's configuration has a ``max_jobs_per_batch`` option.
It allows for the definition of the maximum number of jobflow Jobs that will be executed
in a single *batch* process. This should not be confused with
the ``max_jobs`` value mentioned above, that defines the number of submitted *batch*
processes (e.g. the maximum number of SLURM Jobs simultaneously in the queue).

.. _advancedoptions paralbatch:

Parallel batch
--------------
Expand Down
4 changes: 2 additions & 2 deletions src/jobflow_remote/config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ class BatchConfig(BaseModel):
description="Absolute path to a folder where the batch jobs will be executed. This refers to the jobs submitted"
"to the queue. Jobflow's Job will still be executed in the standard folders."
)
max_jobs: Optional[int] = Field(
None, description="Maximum number of jobs executed in a single run in the queue"
max_jobs_per_batch: Optional[int] = Field(
None, description="Maximum number of jobs executed in a single batch process"
)
max_wait: Optional[int] = Field(
60,
Expand Down
4 changes: 2 additions & 2 deletions src/jobflow_remote/jobs/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,8 @@ def update_batch_jobs(self) -> None:
# note that here the worker.work_dir needs to be passed,
# not the worker.batch.work_dir
command = f"jf -fe execution run-batch {worker.work_dir} {worker.batch.jobs_handle_dir} {process_running_uuid}"
if worker.batch.max_jobs:
command += f" -mj {worker.batch.max_jobs}"
if worker.batch.max_jobs_per_batch:
command += f" -mj {worker.batch.max_jobs_per_batch}"
if worker.batch.max_time:
command += f" -mt {worker.batch.max_time}"
if worker.batch.max_wait:
Expand Down

0 comments on commit 294e8f4

Please sign in to comment.