-
Notifications
You must be signed in to change notification settings - Fork 7
feat: modify modality and optimizer #172
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
base: main
Are you sure you want to change the base?
Conversation
enver1323
left a comment
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.
The PR looks great. Thank you so much for your hard work! My only concern is that relying on number of dimensions and the data type may not always be representative enough to detect the correct modality. As written in comments, TS and Tabular data modalities might have more than 2 dimensions. This might limit users' data types, and workflows, if the modality is determined implicitly. Other than this, the code looks great! Thank you once again!
| def util_functions(self): | ||
| return self._util_functions | ||
|
|
||
| def _set_util_functions(self): |
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 this function public (with the first underscore)? I am not sure, if my thinking is correct, but by making this function public users would be able to customize the modality class without a need to extend it
|
|
||
| @property | ||
| def device(self): | ||
| return self._device |
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 making this dynamic? Thus, the code will not break, if model changes its device mid experiment.
return next(iter(self.model.parameters())).device
|
|
||
|
|
||
| DATA_MODALITY_MAYBE = { | ||
| (float, 2): 'tabular or time-series', |
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, both tabular, and time-series can have 3 and more dimensions? What do you think could be another way to distinguish the data modalities?
This PR:
ModelWrapperaccording to the data input method changep.s.
scripts/test_*.pymay help to understand the purposes or directions of these modifications.