Skip to content

Commit

Permalink
Add --samples option to flepimop submit
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyWillard committed Nov 14, 2024
1 parent 7e7efd5 commit 6491367
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion flepimop/gempyor_pkg/src/gempyor/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

from ._jinja import _render_template_to_file, _render_template_to_temp_file
from .file_paths import run_id
from .info import Cluster, get_cluster_info
from .info import get_cluster_info
from .logging import get_script_logger
from .utils import _format_cli_options, _git_checkout, _git_head, _shutil_which, config
from .shared_cli import (
Expand Down Expand Up @@ -764,6 +764,7 @@ def _submit_scenario_job(
"job_name": job_name,
"jobs": job_size.jobs,
"outcome_modifiers_scenario": outcome_modifiers_scenario,
"nsamples": kwargs.get("samples", job_size.simulations),
"nslots": job_size.simulations, # aka nwalkers
"prefix": prefix,
"project_path": kwargs["project_path"].absolute(),
Expand Down Expand Up @@ -844,6 +845,12 @@ def _submit_scenario_job(
type=click.IntRange(min=1),
help="The number of sequential blocks to run per a job.",
),
click.Option(
param_decls=["--samples", "samples"],
default=None,
type=click.IntRange(min=1),
help="The number of samples to produce. Defaults to all samples.",
),
click.Option(
param_decls=["--batch-system", "batch_system"],
default=None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ flepimop-calibrate --config $CONFIG_PATH \
--project_path $PROJECT_PATH \
--nslots {{ nslots }} \
--niterations {{ simulations }} \
--nsamples {{ nsamples }} \
--jobs {{ jobs }} \
--id {{ run_id }} \
--prefix {{ prefix}} \
Expand Down

0 comments on commit 6491367

Please sign in to comment.