Skip to content

Commit

Permalink
Custom workflow_name and improve check
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaehn committed Jan 30, 2024
1 parent 0cf4a03 commit b1448d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def set_node_info(self):
If the 'constraint' or 'run_on' configuration values are invalid.
"""
if self.constraint == 'gpu':
if self.workflow_name.startswith('icon'):
if hasattr(self, 'icon'):
if self.run_on == 'gpu':
self.ntasks_per_node = 1
elif self.run_on == 'cpu':
Expand Down Expand Up @@ -189,7 +189,7 @@ def set_workflow(self):
self.workflow = workflows[self.workflow_name]
# Otherwise, use custom workflow from config.yaml directly
elif isinstance(self.workflow, dict):
self.workflow_name = self.casename
self.workflow_name = 'custom'
else:
raise InvalidWorkflowType(
"Invalid workflow type. Must be either a string or a dictionary."
Expand Down

0 comments on commit b1448d3

Please sign in to comment.