-
Notifications
You must be signed in to change notification settings - Fork 356
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
chore: Remove attrdict from model hub #8554
Conversation
✅ Deploy Preview for determined-ui canceled.
|
self.hparams = context.get_hparams() | ||
self.data_config = context.get_data_config() |
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'm pretty sure this is a breaking change to MMDetTrial, since people are expected to subclass this object.
Why not just use the simplenamespace here too? Wouldn't that be enough?
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 the PyTorchTrialContext, hparams is an Optional[Dict]
, which is what we're passing here. Are users of MMDetTrial doing an __init__
, then changing hparams after the fact? My assumption was that hparams are expected to be passed as a dict or read from a file as a dict and that's the end of 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.
This also applies to data config, i.e. def get_data_config(self) -> Dict[str, Any]
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 can change this PR to change all dict objects to SimpleNamespace, but I'm not sure what the resulting benefit is.
cfa3b6b
to
baf4c6e
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.
Very nice.
Rephrase the PR comment before landing. attrdict
doesn't "depend on a personal fork of attrdict3", rather attrdict
is broken and possible replacements do not meet our dependency requirements.
Description
attrdict
is broken since Python 3.9. Possible replacements do not meet our dependency requirements. This PR implements our ownAttrDict
as a utility class.Replaces #8541
Test Plan
Unit tests pass. Also try any
mmdetection
andhugginface
example.Checklist
docs/release-notes/
.See Release Note for details.
Ticket
MLG-1442