From 0e039ff5d0a0880c35297a9fd5b983aa2813226b Mon Sep 17 00:00:00 2001 From: "Filipe G. Vieira" <1151762+fgvieira@users.noreply.github.com> Date: Thu, 2 May 2024 22:41:14 +0200 Subject: [PATCH] fix: bug when requesting extended benchmark with slurm (#2855) ### QC * [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). --- docs/snakefiles/rules.rst | 4 ++-- snakemake/path_modifier.py | 2 -- snakemake/spawn_jobs.py | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/snakefiles/rules.rst b/docs/snakefiles/rules.rst index aa17f0a5a..7f7ec36eb 100644 --- a/docs/snakefiles/rules.rst +++ b/docs/snakefiles/rules.rst @@ -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, @@ -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 diff --git a/snakemake/path_modifier.py b/snakemake/path_modifier.py index 854704935..5ea810ab0 100644 --- a/snakemake/path_modifier.py +++ b/snakemake/path_modifier.py @@ -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 diff --git a/snakemake/spawn_jobs.py b/snakemake/spawn_jobs.py index 1d7a8cd47..1842ab257 100644 --- a/snakemake/spawn_jobs.py +++ b/snakemake/spawn_jobs.py @@ -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,