-
Notifications
You must be signed in to change notification settings - Fork 94
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
id: pass tokens objects between interfaces #5328
Conversation
1b5518e
to
abd7cd1
Compare
abd7cd1
to
0aa723b
Compare
* Change `TaskProxy.tokens` to hold the absolute ID rather than the relative ID to make the object useful in more situations. * Refactor the data_store_mgr interfaces to accept `Tokens` instances rather than raw inputs (e.g. cycle_point, task_name, etc). * This avoids doing `Tokens(str(tokens))` when passing context into the data store interfaces.
0aa723b
to
6322f15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
node_type = TASKS | ||
elif sub_num is None: | ||
node_id = self.id_.duplicate( | ||
cycle=str(point), | ||
task=name, | ||
).id | ||
else: | ||
node_id = self.id_.duplicate( | ||
cycle=str(point), | ||
task=name, | ||
job=str(sub_num), | ||
).id | ||
node_type = JOBS | ||
node_type = { | ||
'task': TASK_PROXIES, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this was TASKS
, just want to make sure this is correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This had three branches for TASK_PROXIES
(kwarg default), TASKS
and JOBS
.
The TASKS
branch wasn't used so I dropped it (all store_node_fetcher
calls provided the point
argument).
TaskProxy.tokens
to hold the absolute ID rather than therelative ID to make the object useful in more situations.
Tokens
instancesrather than raw inputs (e.g. cycle_point, task_name, etc).
Tokens(str(tokens))
when passing context into thedata store interfaces.
Tested using this simple workflow which evaluates the scaling performance of internal-queues/job-submission/management against the number of tasks (note there are no dependencies or cycles to negotiate):
With
-s TASKS=100 -s LIMIT=100
:Before: 9.2s
After: 6.56s
Saving: ~28%
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.