-
Notifications
You must be signed in to change notification settings - Fork 7
Support For Reading Jobs By Model Name #124
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
Conversation
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.
I think it looks good, I just have 2 minor questions.
for job in jobs: | ||
if job["modelName"] == model_name: | ||
return job | ||
else: # pylint: disable=useless-else-on-loop |
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.
Do you think it is easier to read the code with the else
or why do we need it?
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.
It works fine without the else
. I don't remember why that was added in the first place. Removed. Thanks!
job_by_name = model_manager_client.read_job_by_model_name(model_name) | ||
assert job_by_name is not None |
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.
Not sure but maybe we can also test the read_job_by_model_name
by replacing the lines 146-152 with a call to read_job_by_model_name
?
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.
Yes, that would work! Updated.
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.
Thank you!
Checks: