Zero is alive! The first experience with the library was positive and now it is the time to use this experience to improve the library. This release brings nice additions (new functions, classes and structure to the library), improves things that proved to be useful and removes unnecessary modules and tools.
New features
- `zero.Stream`
- method `epochs` for ergonomic train loops with a progress bar
- methods `state_dict` and `load_state_dict` for saving and loading stream's state (epoch, iteration, etc.)
- `time.Timer`
- can be used as a context-manager to measure some code block execution time
- can be pickled
- pretty formatting when used inside `print` or f-strings
- method `format` for advanced formatting
- `random`
- functions `get_state` and `set_state` for better reproducibility when resuming training
- `zero.data.FnDataset` for fast datasets creation without the need to inherit from `torch.utils.data.Dataset`
- website (documentation)
- improve design, structure and layout
- now it is possible to select the version
API Changes
- new modules structure, see the website
- `zero.Stream.increment_epoch`: does not accept arguments anymore
- `zero.ProgressTracker`: support `patience=None` for only tracking the best score
- `zero.Timer.run`: does not return `self` anymore
- `zero.random.set_randomness`
- renamed to `zero.random.init`
- the argument `callback` was removed
- the generated (or passed) seed is returned
- The following modules were removed:
- `all`
- `io`
- `types`
- `module`
- `time`
- `training`
- The following functions and classes were removed:
- `hardware.to_device`
- `stream.ManualStream`
- `module.(call, ecall)`
- `time.format_seconds`
- `training.learn`
Dependencies
- python >= 3.7
- torch >= 1.6