Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented passing memory requirements, removed mandatary queue spec #33

Merged
merged 1 commit into from Jun 22, 2021

Conversation

SergeyPod
Copy link
Contributor

No description provided.

@@ -16,6 +16,8 @@ class RubinTask:
executable: str = None
maxwalltime: int = None
maxattempt: int = None
maxrss: int = None
cloud: str = None
lfns: list = None
local_pfns: list = None
dependencies: list = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a brief description to each field of this data class? (It would be nice if the descriptions for maxwalltime and maxrss include information about the units they use, e.g., if the walltime needs to be specified in seconds, minutes, etc.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've added the suggested comment.

task.queue = self.computing_queue_himem if self.tasks_steps[task_name] \
in self.himem_tasks else self.computing_queue
bps_node = next(filter(lambda x: x['job'].label == self.tasks_steps[task_name],
self.bps_workflow.nodes.values()))['job']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I got it right it looks like, for each task, you iterate over all nodes of the generic workflow to find a node with a job having a specific label. Is there a reason why you can't create and use some kind of a "lookup table" (for example, a dictionary mapping task_steps keys onto these nodes)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filter provides the iterator and the values are computed lazy. This is why the next function will lead to finding only a single bps workflow node per task. The lookup table could do the same, I agree, but will require an extra variable. I would leave as it is now, if it is OK with you. Thank you!

…ification

Added changes required by the code review

Fixed E261 alerts
@SergeyPod SergeyPod merged commit f831abb into master Jun 22, 2021
@SergeyPod SergeyPod deleted the tickets/DM-30801 branch June 22, 2021 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants