v0.6.0
版本发布时间: 2022-04-21 09:49:15
mosaicml/composer最新发布版本:v0.25.0(2024-09-25 04:56:05)
🚀 Composer v0.6.0
Composer v0.6.0 is released! Install via pip
:
pip install --upgrade mosaicml==0.6.0
Alternatively, install Composer with Conda:
conda install -c mosaicml mosaicml=0.6.0
Major Changes
-
🗃️ Automatic Gradient Accumulation
Composer v0.6.0 can automatically pick an appropriate value for gradient accumulation. The trainer will automatically catch OutOfMemory exceptions and handle them gracefully. No need to manually tune this parameter for each model, batch size, and hardware combination!
To use automatic gradient accumulation, set
grad_accum='auto'
. For example:trainer = Trainer( ..., grad_accum='auto', )
-
💾 Artifact Logging
Training on spot instances? Composer v0.6.0 introduces artifact logging, making it possible to store checkpoints and other artifacts directly to cloud storage. See the Object Store Logger and the Checkpointing Guide for more information.
Artifact Logging has replaced the run directory and the run directory uploader, which have been removed.
-
📊 Metric Values on the State
Composer v0.6.0 binds the computed metric values on the State. Go ahead and read these values from your own callbacks! We'll be releasing an early stopping callback in an upcoming Composer release.
-
⚠️
NoEffectWarning
andNotIntendedUseWarning
for AlgorithmsSome algorithms, such as BlurPool, now emit a
NoEffectWarning
or aNotIntendedUseWarning
when they're not being used appropriately.
Minor Improvements
-
🏃♀️ Training Run Names
We introduced a
run_name
parameter in the Trainer to help organize training runs.trainer = Trainer( ..., run_name='awesome-traing-run', )
We'll automatically pick one if the run name is not specified.
-
💈 Automatic Progress Bars
The ProgressBarLogger, formally called the TQDMLogger, is automatically enabled for all training runs.
To disable the progress bar, set
progress_bar=False
. For example:trainer = Trainer( ..., progress_bar=False, )
-
🪵 Logged Data in the Console
To print Logger calls to the console, set the
log_to_console
and theconsole_log_level
arguments.trainer = Trainer( ..., log_to_console=True, console_log_level="epoch", )
By default, the console logger will only be enabled when
progress_bar=False
. The default console log level isepoch
. -
📃 Capturing
stdout
andstderr
in Log FilesThe FileLogger captures
stdout
andstderr
by default now. Tracebacks will now be captured amongst other logging statements. -
⬆️ PyTorch 1.11 Support
We've tested Composer on PyTorch 1.11. Go ahead and upgrade your dependencies!
-
✅ Checkpointing
We changed the checkpoint format to store the underlying model, not the DistributedDataParallel wrapped model. If you're using Composer to read checkpoints, there's nothing to change. But if you're reading Composer checkpoints manually, note that the module checkpoints will be formatted differently.
In addition, we changed the checkpointing argument names for the trainer.
- The new parameters
save_artifact_name
andsave_latest_artifact_name
allow checkpoints to be saved directly to artifact stores. - The new parameter
save_num_checkpoints_to_keep
helps preserve local disk storage by automatically removing old checkpoints. -
load_path
replacesload_path_format
. -
save_name
replacessave_path_format
. -
save_latest_filename
replacessave_latest_format
.
- The new parameters
-
🏎️ Profiling
We added support for custom scheduling functions and re-designed how the profiler saves traces. Each profiling cycle will now have its own trace file. Trace merging happens automatically throughout the training process. Long-running profiling is now possible without the long wait at the end of training for the trace merge.
As part of this refactor, the profiler arguments have changed:
-
prof_trace_handlers
replacesprof_event_handlers
. -
prof_schedule
replacesprof_skip_first
,prof_wait
,prof_warmup
,prof_active
, andprof_repeat
. See the cyclic schedule function. -
torch_prof_folder
replacestorch_profiler_trace_dir
- The new arguments
torch_prof_filename
,torch_prof_artifact_name
,torch_prof_overwrite
, andtorch_prof_num_traces_to_keep
allow for customization on how PyTorch Profiler traces are saved.
-
-
🏗️ TorchVision Model Architectures
We switched our vision models to use the TorchVision model architecture implementations where possible.
Bug Fixes
- Fixed a bug with MixUp and gradient accumulation
- Fixed numerous issues with the Composer launch script for distributed training. Composer v0.6.0 includes environment variable support, better defaults and warings, and proper handling of crashed processes.
Changelog
- Update Migrating_from_PTL.ipynb by @moinnadeem in https://github.com/mosaicml/composer/pull/730
- CodeQL Analysis by @Averylamp in https://github.com/mosaicml/composer/pull/723
- Installing pyright via npm by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/735
- Polish intro docs by @dblalock in https://github.com/mosaicml/composer/pull/721
- Numerics docs page by @bandish-shah in https://github.com/mosaicml/composer/pull/725
- Testing Niklas GH Docs Star w/ Dark Mode by @moinnadeem in https://github.com/mosaicml/composer/pull/742
- [Artifact Logging PR1] Logger Refactoring by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/698
- Update README.md by @moinnadeem in https://github.com/mosaicml/composer/pull/731
- Updated the Method Cards by @hanlint in https://github.com/mosaicml/composer/pull/647
- Using existing clone in conda meta.yaml by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/751
- [Artifact Logging PR2] Logger Destination Cleanup by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/699
- Shorten to minimal code snippets by @hanlint in https://github.com/mosaicml/composer/pull/752
- Sample-wise Stochastic Depth Method Card by @Landanjs in https://github.com/mosaicml/composer/pull/749
- Update algorithm yamls by @coryMosaicML in https://github.com/mosaicml/composer/pull/747
- [Artifact Logging PR3] Add the
run_name
as a property of theLogger
by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/700 - [Artifact Logging PR4] Added log_file_artifact base method by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/701
- Fix README.md by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/753
- Less CodeQL by @Averylamp in https://github.com/mosaicml/composer/pull/762
- Increase the timeout for test trainer equivalence by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/766
- Port squeze excite method card to new format by @dblalock in https://github.com/mosaicml/composer/pull/764
- Small fixes by @hanlint in https://github.com/mosaicml/composer/pull/765
- Adding defaults to blurpool by @moinnadeem in https://github.com/mosaicml/composer/pull/756
- Added maximum versions to dependencies by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/768
- Update sequence length warmup documentation by @moinnadeem in https://github.com/mosaicml/composer/pull/770
- Additional README fixes by @hanlint in https://github.com/mosaicml/composer/pull/769
- Fix
setup.py
by @Averylamp in https://github.com/mosaicml/composer/pull/761 - Increased the timeout for
test_trainer.py
by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/775 - Remove plural types and aliases for native pytorch types by @Landanjs in https://github.com/mosaicml/composer/pull/677
- [Artifact Logging PR5] Added the object store logger by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/706
- [Artifact Logging PR6] Rename the
TQDMLogger
as theProgressBarLogger
; remove terminal logging from the file logger by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/708 - [Artifact Logging PR7] Add
stdout
andstderr
capture to the FileLogger by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/710 - Update README.md by @vahidfazelrezai in https://github.com/mosaicml/composer/pull/781
- URGENT: Fixing an incorrect number by @jfrankle in https://github.com/mosaicml/composer/pull/785
- Add eval dataloader to the README.md by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/779
- Readme code fix by @nqn in https://github.com/mosaicml/composer/pull/787
- Set the random seed before each test. by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/786
- Docker file for vision applications with ffcv and deeplabv3 dependencies by @dskhudia in https://github.com/mosaicml/composer/pull/724
- Update README.md by @murthyn in https://github.com/mosaicml/composer/pull/789
- Chmod 644 all files by @Averylamp in https://github.com/mosaicml/composer/pull/760
- Add Algorithm Warning for
NoEffectWarning
by @hanlint in https://github.com/mosaicml/composer/pull/720 - Update dense label conversion and soft cross entropy to handle segmentation style labels by @coryMosaicML in https://github.com/mosaicml/composer/pull/763
- added model card details comparing cifar to imagenet resnets by @growlix in https://github.com/mosaicml/composer/pull/792
- Added codeowners file by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/797
- ffcv integration for cifar10 dataset by @dskhudia in https://github.com/mosaicml/composer/pull/672
- Add trainer link to README by @hanlint in https://github.com/mosaicml/composer/pull/804
- ffcv integration for imagenet by @dskhudia in https://github.com/mosaicml/composer/pull/802
- [XS] Consolidating NLP Import Message by @moinnadeem in https://github.com/mosaicml/composer/pull/795
- Removed duplicate logger registry by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/808
- Update docs on random seed by @hanlint in https://github.com/mosaicml/composer/pull/794
- Remove the LoggerData and LoggerDataDict types by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/810
- Rename composer/datasets/webdataset.py => composer/datasets/webdataset_utils.py by @dskhudia in https://github.com/mosaicml/composer/pull/813
- More method card updates by @jfrankle in https://github.com/mosaicml/composer/pull/777
- [Part 1] Adding Synthetic NLP Tokenizers, Models, Datasets w/o Integration by @moinnadeem in https://github.com/mosaicml/composer/pull/650
- Update README by @moinnadeem in https://github.com/mosaicml/composer/pull/822
- Updating setup.py with missing dependancies by @dlmgary in https://github.com/mosaicml/composer/pull/818
- Fix submodule type errors when doing
import composer
by @dblalock in https://github.com/mosaicml/composer/pull/823 - Update composer_model.rst by @moinnadeem in https://github.com/mosaicml/composer/pull/824
- models cleanup - part 3: one model family per directory (cifar resnets) by @A-Jacobson in https://github.com/mosaicml/composer/pull/791
- Support for webdatasets with ffcv by @dskhudia in https://github.com/mosaicml/composer/pull/815
- Remove config from the logger base classes by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/811
- models cleanup - part 2: metrics and loss by @A-Jacobson in https://github.com/mosaicml/composer/pull/790
- Adding docstring for missing conditional imports by @moinnadeem in https://github.com/mosaicml/composer/pull/836
- Filepath formatting helper utilities by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/827
- Serialize model state without
module.
prefix when using DDP by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/829 - models cleanup - part 1: composermodel tasks by @A-Jacobson in https://github.com/mosaicml/composer/pull/788
- Remove Batch Types - Part 1: recursive to_device function by @A-Jacobson in https://github.com/mosaicml/composer/pull/727
- Profiler Refactor for Artifact Logging by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/828
- [Artifact Logging PR8]: Switch to artifact logging and remove the run directory. by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/712
- conditional imports use MissingConditionalImportError #814 by @IanWorley in https://github.com/mosaicml/composer/pull/835
- Vision Tests + Jenkins Improvements by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/806
- Fix the entrypoint and launch script by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/840
- Remove a broken link to an old callback hparams tutorial. by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/850
- Remove no longer needed xfails by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/848
- Ade20k streaming dataset yaml by @Landanjs in https://github.com/mosaicml/composer/pull/843
- [Part 2] Integrating synthetic tokenizers, datasets, and models into our unit tests by @moinnadeem in https://github.com/mosaicml/composer/pull/652
- 'Second' typo by @nqn in https://github.com/mosaicml/composer/pull/852
- [FFCV] webdataset from local + download only once by @dskhudia in https://github.com/mosaicml/composer/pull/849
- Lowered Test Timeouts by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/851
- Proofreading for docs "Getting Started" section by @mcneela in https://github.com/mosaicml/composer/pull/859
- Dynamic Shrinking Microbatches by @mvpatel2000 in https://github.com/mosaicml/composer/pull/485
- Proofreading for speedup methods section by @mcneela in https://github.com/mosaicml/composer/pull/861
- LICENSE: copyright and cleanup by @kobindra in https://github.com/mosaicml/composer/pull/862
- CLI Launcher supports environment variables and tells fewer lies by @jbloxham in https://github.com/mosaicml/composer/pull/860
- Update MixUp to allow use of index labels by @coryMosaicML in https://github.com/mosaicml/composer/pull/825
- Bert validation refactor by @anisehsani in https://github.com/mosaicml/composer/pull/478
- Make wandb tags optional by @siriuslee in https://github.com/mosaicml/composer/pull/865
- Fix validation in CLI launcher by @jbloxham in https://github.com/mosaicml/composer/pull/870
- Fixing version number by @ajaysaini725 in https://github.com/mosaicml/composer/pull/871
- PyTorch 1.11 Docker Image by @bandish-shah in https://github.com/mosaicml/composer/pull/868
- Add missing ffcv dependency in pytorch_vision docker image by @dskhudia in https://github.com/mosaicml/composer/pull/867
- Fixed webdatasest import bug by @ajaysaini725 in https://github.com/mosaicml/composer/pull/874
- Proofread five sections of Trainer module docs by @mcneela in https://github.com/mosaicml/composer/pull/872
- Switch mixup events to avoid grad accum issues by @coryMosaicML in https://github.com/mosaicml/composer/pull/875
- Proofreading docs through "Callbacks" section by @mcneela in https://github.com/mosaicml/composer/pull/878
- Initialize distributed before dataloaders are created by @dskhudia in https://github.com/mosaicml/composer/pull/869
- Proofreading the remainder of the trainer section of docs by @mcneela in https://github.com/mosaicml/composer/pull/881
- Add test for grad_accum > 2 to the asset tests by @hanlint in https://github.com/mosaicml/composer/pull/876
- Remove Batch Types - Part 2: unify split batch by @A-Jacobson in https://github.com/mosaicml/composer/pull/833
- Proofreading Methods section of docs through AugMix by @mcneela in https://github.com/mosaicml/composer/pull/883
- Add ssh by @Averylamp in https://github.com/mosaicml/composer/pull/885
- rename LICENSE_HEADER to fix GH license detection by @kobindra in https://github.com/mosaicml/composer/pull/863
- Torch 1.11 pytorch_vision Docker image by @bandish-shah in https://github.com/mosaicml/composer/pull/886
- Add full traceback to grad accum errors by @mvpatel2000 in https://github.com/mosaicml/composer/pull/892
- Modify ResNet9 benchmark to enable channels_last and progressive_resizing by @coryMosaicML in https://github.com/mosaicml/composer/pull/889
- Proofreading Methods section of docs through Cutout by @mcneela in https://github.com/mosaicml/composer/pull/890
- Proofread Methods section of docs through MixUp by @mcneela in https://github.com/mosaicml/composer/pull/895
- Fixes for ffcv integration by @dskhudia in https://github.com/mosaicml/composer/pull/844
- Print the stdout/stderr of the crashing process by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/893
- Change NLP yamls to use evaluators by @anisehsani in https://github.com/mosaicml/composer/pull/891
- Fix loss logging with DeepSpeed by @abhi-mosaic in https://github.com/mosaicml/composer/pull/897
- Add Computed Metrics to State by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/842
- Proofread Methods section of docs through Squeeze-Excite by @mcneela in https://github.com/mosaicml/composer/pull/899
- test whether resuming from a checkpoint changes algorithm effect by @growlix in https://github.com/mosaicml/composer/pull/816
- Object store symlinks for graceful resumption by @mvpatel2000 in https://github.com/mosaicml/composer/pull/887
- Console log level by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/900
- Remove asdict in unet by @Landanjs in https://github.com/mosaicml/composer/pull/901
- Cherry Pick #906 by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/912
- Release/v0.6.0 by @ravi-mosaicml in https://github.com/mosaicml/composer/pull/933
New Contributors
- @vahidfazelrezai made their first contribution in https://github.com/mosaicml/composer/pull/781
- @murthyn made their first contribution in https://github.com/mosaicml/composer/pull/789
- @dlmgary made their first contribution in https://github.com/mosaicml/composer/pull/818
- @IanWorley made their first contribution in https://github.com/mosaicml/composer/pull/835
Full Changelog: https://github.com/mosaicml/composer/compare/v0.5.0...v0.6.0