-
Notifications
You must be signed in to change notification settings - Fork 37
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
Experiment.start
Returns Records
#744
base: v1.0
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v1.0 #744 +/- ##
=======================================
Coverage ? 59.04%
=======================================
Files ? 142
Lines ? 9140
Branches ? 0
=======================================
Hits ? 5397
Misses ? 3743
Partials ? 0
|
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.
Some small suggestions!
:param launch_id: A unique identifier for the launch of the job. | ||
:param job: The job that was launched. | ||
""" | ||
self._id = launch_id |
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.
Why do you deep copying the Job but not the launch_id here?
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.
In theory, the launch_id
(at least for now), is just a string that we ask the type checker to treat like a different type, and strings are immutable in python, so a "deepcopy of" and a "reference to" a string are functionally equivalent.
There is actually some special logic in copy.deepcopy
so that, by default, it will just return the original reference to a string if its encounter without change.
TL;DR I was lazy and didn't want to spell out "deepcopy". More than willing to add it though if we think that LaunchedJobID
might become a more substantive type in future!
831b9d4
to
2e367a0
Compare
2e367a0
to
e06bbac
Compare
109da7c
to
c647108
Compare
Basic implementation of a
Record
class to keep track of launched jobs. ConvertExperiment.start
returnRecord
s and all other methods to accept records.