-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[NLP] ArtifactItem with init=True to make it debuggable #7980
Conversation
@@ -359,8 +359,6 @@ def register_artifact(self, model, config_path: str, src: str, verify_src_exists | |||
""" | |||
app_state = AppState() | |||
|
|||
artifact_item = model_utils.ArtifactItem() |
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.
How about keeping the instantiation here, with dummy default values of "" and type of local by default ? Then the remainder of the code doesn't need to be changed
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.
Good suggestion, adopted it. Now changes boil down to removing init=False
and setting dummy defaults
f9b5a68
to
e53a491
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.
Thanks LGTM
jenkins |
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
for more information, see https://pre-commit.ci
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
e53a491
to
1a389bf
Compare
Thanks! I've just rebased it, I'll merge once pipeline completes. |
* ArtifactItem with init=True to make it debuggable Signed-off-by: Jan Lasek <janek.lasek@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Initialize ArtifactItem with dummy values to keep changes minimal Signed-off-by: Jan Lasek <janek.lasek@gmail.com> --------- Signed-off-by: Jan Lasek <janek.lasek@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Piotr Żelasko <petezor@gmail.com>
* ArtifactItem with init=True to make it debuggable Signed-off-by: Jan Lasek <janek.lasek@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Initialize ArtifactItem with dummy values to keep changes minimal Signed-off-by: Jan Lasek <janek.lasek@gmail.com> --------- Signed-off-by: Jan Lasek <janek.lasek@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Sasha Meister <ameister@nvidia.com>
* ArtifactItem with init=True to make it debuggable Signed-off-by: Jan Lasek <janek.lasek@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Initialize ArtifactItem with dummy values to keep changes minimal Signed-off-by: Jan Lasek <janek.lasek@gmail.com> --------- Signed-off-by: Jan Lasek <janek.lasek@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
What does this PR do ?
When debugging artifact items I struggled with
ArtifactItem
as it is defined withinit=False
which results in issues when printing an instance of this class.The following minimal example illustrates the problem - this code
results in AttributeError: 'Point' object has no attribute 'x'. So it doesn't make it easier to check what's going on.
Collection: [NLP]
Jenkins CI
To run Jenkins, a NeMo User with write access must comment
jenkins
on the PR.Before your PR is "Ready for review"
Pre checks:
PR Type:
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information