-
Notifications
You must be signed in to change notification settings - Fork 432
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
AutoYAHP Part 3: Refactor the models, datasets, and trainer_hparams #1072
AutoYAHP Part 3: Refactor the models, datasets, and trainer_hparams #1072
Conversation
- Treat all python warnings as errors in tests. Existing tests that were throwing warnings were either fixed (yay!) or modified with `@pytest.mark.filterwarnings` - In BlurPool, throwing an error if both `replace_maxpools` and `replace_convs` are False, as that results in the algorithm being a no-op. - Made the default optimizer warning in the trainer less verbose. - Converted the bert yaml to have duration specified in terms of samples, to fix an issue where the warmup period, combine with max duration, was a noop. - Moved `TestMetricSetter` to `tests/common` and renamed as `MetricSetterCallback`. Tests should not be importing from other test files (tests/common is OK) - Removed TestWandBLogger, since the trainer tests do the same thing
Fix progressive resizing
This PR refactors the algorithms and tests as will be required by AutoYAHP. It does not depend on AutoYAHP itself (a future PR will remove the underlying hparam classes). - Refactored algorithm tests to not depend on hparams - Reformatted the factorize and selective backprop docstrings so they would be correctly parsed by auto-yahp - Refactor `algorithm_settings.py` to not depend on hparams and to return a list of `pytest.param` objects for a `pytest.mark.parametrize`. This change makes it more re-usable since it now includes information about markers required for each algorithm. - Moved the `TestTrainerAlgorithms` into `tests/algorithms/test_algorithms_train.py`, since it tests the individual algorithms, not the trainer, and thus should live in `tests/algorithms`. - Add helper methods for scanning a module to discover subclass implementations, check that the registry contains an entry, and test that a class is constructable from yaml
Silencing deepspeed deprecation warnings
Bump pyright
Definitely not Yes, amp is the best performance but it could cause some training runs to overflow. If I'm training a model and getting |
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.
Left a few comments asking about why the hparams classes are organized the way the are + my opinion on the device defaults.
Overall LGTM, especially since many of these hparams classes will be leaving is soon (rest in peace you will not be missed).
Discussed offline; decided to go with option 4 (leave as is), as option 3 would require the yamls to specify |
…taset_trainer_for_autoyahp
…taset_trainer_for_autoyahp
…aicml/ravi-composer into refactor_callbacks_for_autoyahp
…taset_trainer_for_autoyahp
This PR cleans up the model hparams, dataset hparams, and trainer hparams for AutoYAHP. It does not depend on AutoYAHP itself (a future PR will remove the underlying hparam classes).
DeviceGPU()
/DeviceCPU()
instances directly, andDeviceGPU()
throws an error if cuda is not available (before, yahp would parse intoDeviceGPUHparams()
, which could then be replaced withDeviceCPUHparams()
). (While it would have also worked to patch the yaml directly, I thought it'd be generally better to make the yamls more portable).