Skip to content

Commit

Permalink
fix: bug when requesting extended benchmark with slurm (#2855)
Browse files Browse the repository at this point in the history
<!--Add a description of your PR here-->

### QC
<!-- Make sure that you can tick the boxes below. -->

* [x] The PR contains a test case for the changes or the changes are
already covered by an existing test case.
* [x] The documentation (`docs/`) is updated to reflect the changes or
this is not necessary (e.g. if the change does neither modify the
language nor the behavior or functionalities of Snakemake).
  • Loading branch information
fgvieira committed May 2, 2024
1 parent 769e0a4 commit 0e039ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/snakefiles/rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,7 @@ benchmarks the
* `mean_load`: CPU load = CPU time (`cpu_usage`) divided by wall clock time (`s`),
* `cpu_time`: CPU time user+system (seconds),

Since version X.X, it is possible to have extra benchmark metrics with the command ``--benchmark-extended``:
Since version 8.11.0, it is possible to have extra benchmark metrics with the command ``--benchmark-extended``:
* `jobid`: Internal job ID,
* `rule_name`: Name of rule,
* `wildcards`: Wildcards of this job,
Expand Down Expand Up @@ -1972,7 +1972,7 @@ However, the benchmark file can be annotated with the desired number of repeats,
will instruct Snakemake to run each job of this rule three times and store all measurements in the benchmark file.
The resulting `tsv` file can be used as input for other rules, just like any other output file.

Since version X.X, it is also possible to have the benchmark metrics in different formats (depending on the extension); currently only the `.jsonl` extension (JSONL format; i.e. one JSON record per line) is supported and all other extensions will be treated as TSV.
Since version 8.11.0, it is also possible to have the benchmark metrics in different formats (depending on the extension); currently only the `.jsonl` extension (JSONL format; i.e. one JSON record per line) is supported and all other extensions will be treated as TSV.

.. sidebar:: Note

Expand Down
2 changes: 0 additions & 2 deletions snakemake/path_modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ def modify(self, path, property=None):
return path

modified_path = self.apply_default_storage(self.replace_prefix(path, property))
logger.debug(f"Path {path}, converted to {modified_path}")
if modified_path == path:
# nothing has changed
logger.debug("Path did not change after prefix replace")
return path

# Important, update with previous flags in case of AnnotatedString #596
Expand Down
1 change: 1 addition & 0 deletions snakemake/spawn_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def general_args(
w2a("overwrite_configfiles", flag="--configfiles"),
w2a("config_settings.config_args", flag="--config"),
w2a("output_settings.printshellcmds"),
w2a("output_settings.benchmark_extended"),
w2a("execution_settings.latency_wait"),
w2a("scheduling_settings.scheduler", flag="--scheduler"),
local_storage_prefix,
Expand Down

0 comments on commit 0e039ff

Please sign in to comment.