Skip to content

Commit

Permalink
adds SCATTER MULTIPLIER
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricebrito committed Nov 18, 2023
1 parent 3164142 commit dd4b13a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* `STORAGE_CLASS`: defines the k8s RWX storage class for Calrissian. Defaults to `longhorn`
* `KEEP_SESSION`: if set to `true`, the session and thus the kubernetes namespace is not deleted

### Calrissian resources

* `SCATTER_MULTIPLIER`: scatter factor multiplier. Defaults to `2`.

### CWL Wrapper

The cwl-wrapper templates can be customized with the environment variables:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[metadata]
name = zoo_calrissian_runner
version = 0.1.10
version = 0.1.11
4 changes: 2 additions & 2 deletions zoo_calrissian_runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def eval_resource(self):
if resource_requirement := self.get_resource_requirement(
self.get_object_by_id(step.run[1:])
):
multiplier = 2 if step.scatter else 1
multiplier = int(os.getenv("SCATTER_MULTIPLIER", 2)) if step.scatter else 1
for resource_type in [
"coresMin",
"coresMax",
Expand Down Expand Up @@ -341,7 +341,7 @@ def assert_parameters(self):
)

def execute(self):
self.update_status(progress=97, message="Pre-execution hook")
self.update_status(progress=2, message="Pre-execution hook")
self.handler.pre_execution_hook()

if not (self.assert_parameters()):
Expand Down

0 comments on commit dd4b13a

Please sign in to comment.