Composer

Latest version: v0.27.0

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 11

0.13.1

The legacy package name still works via `pip`:

bash
pip install mosaicml==0.13.1

**Note:** The `mosaicml==0.13.0` PyPi package was yanked due to some minor packaging issues discovered after release. The package was re-released as Composer v0.13.1, thus these release notes contain details for both v0.13.0 and v0.13.1.

New Features

1. **🤙 New and Updated Callbacks**

* *New `HealthChecker` Callback (2002)*

The callback will log a warning if the GPUs on a given node appear to be in poor health (low utilization). The callback can also be configured to send a Slack message!

python
from composer import Trainer
from composer.callbacks import HealthChecker

Warn if GPU utilization difference drops below 10%
health_checker = HealthChecker(
threshold = 10
)

Construct Trainer
trainer = Trainer(
...,
callbacks=health_checker,
)

Train!
trainer.fit()


* *Updated `MemoryMonitor` to use GigaBytes (GB) units (1940)*

* *New `RuntimeEstimator` Callback (1991)*

Estimate the remaining runtime of your job! Approximates the time remaining by observing the throughput and comparing to the number of batches remaining.

python
from composer import Trainer
from composer.callbacks import RuntimeEstimator

Construct trainer with RuntimeEstimator callback
trainer = Trainer(
...,
callbacks=RuntimeEestimator(),
)

Train!
trainer.fit()


* *Updated `SpeedMonitor` throughput metrics (1987)*

Expands throughput metrics to track relative to several different time units and per device:
* `throughput/batches_per_sec` and `throughput/device/batches_per_sec`
* `throughput/tokens_per_sec` and `throughput/device/tokens_per_sec`
* `throughput/flops_per_sec` and `throughput/device/flops_per_sec`
* `throughput/device/samples_per_sec`

Also adds `throughput/device/mfu` metric to compute per device MFU. Simply enable the `SpeedMonitor` callback per usual to log these new metrics! Please see [SpeedMonitor](https://docs.mosaicml.com/en/latest/api_reference/generated/composer.callbacks.SpeedMonitor.html#composer.callbacks.SpeedMonitor) documentation for more information.


1. **⣿ FSDP Sharded Checkpoints (1902)**

Users can now specify the `state_dict_type` in the `fsdp_config` dictionary to enable sharded checkpoints. For example:

python
from composer import Trainer

fsdp_confnig = {
'sharding_strategy': 'FULL_SHARD',
'state_dict_type': 'local',
}

trainer = Trainer(
...,
fsdp_config=fsdp_config,
save_folder='checkpoints',
save_filename='ba{batch}_rank{rank}.pt',
save_interval='10ba',
)


Please see the [PyTorch FSDP](https://pytorch.org/docs/stable/fsdp.html#torch.distributed.fsdp.FullyShardedDataParallel.state_dict) docs and Composer's [Distributed Training notes](https://docs.mosaicml.com/en/latest/notes/distributed_training.html#saving-and-loading-sharded-checkpoints-with-fsdp) for more information.

1. **🤗 HuggingFace Improvements**

* Update `HuggingFaceModel` class to support encoder-decoder batches without `decoder_input_ids` (1950)
* Allow evaluation metrics to be passed to `HuggingFaceModel` directly (1971)
* Add a utility function to load a Composer checkpoint of a `HuggingFaceModel` and write out the expected `config.json` and `pytorch_model.bin` in the HuggingFace pretrained folder (1974)

1. **🛟 Nvidia H100 Alpha Support - Added `amp_fp8` data type**

In preparation for H100's arrival, we've added the `amp_fp8` precision type. Currently setting `amp_fp8` specifies a new precision context using `transformer_engine.pytorch.fp8_autocast.` For more details, please see Nvidia's new [Transformer Engine](https://docs.nvidia.com/deeplearning/transformer-engine/user-guide/index.html) and the specific [fp8 recipe](https://docs.nvidia.com/deeplearning/transformer-engine/user-guide/examples/fp8_primer.html#id1) we utilize.

python
from composer import Trainer

trainer = Trainer(
...,
precision='amp_fp8',
)


API changes

* The `torchmetrics` package has been upgraded to 0.11.x.

The `torchmetrics.Accuracy` metric now requires a `task` argument which can take on a value of `binary`, `multiclass` or `multilabel`. Please see [Torchmetrics Accuracy](https://torchmetrics.readthedocs.io/en/v0.11.3/classification/accuracy.html) docs for details.

Additonally, since specifying `value='multiclass'` requires an additional field of `num_classes` to be specified, we've had to update `ComposerClassifier` to accept the additional `num_classes` argument. Please see PR's 2017 and 2025 for additional details

* Surgery algorithms used in functional form return a value of `None` (1543)

Deprecations

* Deprecate HFCrossEntropy and Perplexity (1857)
* Remove Jenkins CI (1943, 1954)
* Change Deprecation Warnings to Warnings for specifying `ProgressBarLogger` and `ConsoleLogger` to loggers (1846)

Bug Fixes

* Fixed an issue introduced in 0.12.1 where `HuggingFaceModel` crashes if `config.return_dict = False` (1948)
* Refactor EMA to improve memory efficiency (1941)
* Make wandb checkpoint logging compatible with wandb model registry (1973)
* Fix ICL race conditions (1978)
* Update `epoch` metric name to `trainer/epoch` (1986)
* reset scaler (1999)
* Bug/sync optimization logger across ranks (1970)
* Update Docker images to fix resolve vulnerability scan issues (2007)
* Fix eval duplicate logging issue (2018)
* extend test and patch bug (2028)
* Protect for missing slack_sdk import (2031)

Known Issues

* Docker Image Security Vulnerability
* [CVE-2022-45907](https://github.com/advisories/GHSA-47fc-vmwq-366v): The `mosaicml/pytorch:1.12.1*`, `mosaicml/pytorch:1.11.0*`, `mosaicml/pytorch_vision:1.12.1*` and `mosaicml/pytorch_vision:1.11.0*` images are impacted and currently supported for legacy use cases. **We recommend users upgrade to images with PyTorch >1.13. The affected images will be removed in the next Composer release.**

What's Changed
* Raise error if max duration is in epochs and dataloader is infinite by dakinggg in https://github.com/mosaicml/composer/pull/1942
* Bump traitlets from 5.8.0 to 5.9.0 by dependabot in https://github.com/mosaicml/composer/pull/1946
* Deprecate HFCrossEntropy and Perplexity by dakinggg in https://github.com/mosaicml/composer/pull/1857
* Change functional surgery method return values to None by nik-mosaic in https://github.com/mosaicml/composer/pull/1543
* Retire Jenkins by bandish-shah in https://github.com/mosaicml/composer/pull/1943
* Update MCP GHA Name by mvpatel2000 in https://github.com/mosaicml/composer/pull/1951
* update memory monitor by mvpatel2000 in https://github.com/mosaicml/composer/pull/1940
* Move ffcv up in test order by dskhudia in https://github.com/mosaicml/composer/pull/1953
* Fix memory monitor test by mvpatel2000 in https://github.com/mosaicml/composer/pull/1957
* Fix model surgery failure due to functional API change by nik-mosaic in https://github.com/mosaicml/composer/pull/1949
* Change how we check for forwards args in models for HF models by bcui19 in https://github.com/mosaicml/composer/pull/1955
* add return dict false test and bug fix by dakinggg in https://github.com/mosaicml/composer/pull/1948
* remove jenkins ci by mvpatel2000 in https://github.com/mosaicml/composer/pull/1954
* add support for enc-dec batches without decoder_input_ids by dakinggg in https://github.com/mosaicml/composer/pull/1950
* Refactor EMA to improve memory efficiency by coryMosaicML in https://github.com/mosaicml/composer/pull/1941
* Add warning for untrusted checkpoints by mvpatel2000 in https://github.com/mosaicml/composer/pull/1959
* permit opt tokenizer by bmosaicml in https://github.com/mosaicml/composer/pull/1958
* GHA Docker build flow for PR's by bandish-shah in https://github.com/mosaicml/composer/pull/1883
* Update download badge link to pepy by karan6181 in https://github.com/mosaicml/composer/pull/1966
* Update python version in setup.py and fixed pypi download badge by karan6181 in https://github.com/mosaicml/composer/pull/1969
* allow eval metrics to be passed in to HuggingFaceModel directly by dakinggg in https://github.com/mosaicml/composer/pull/1971
* Make wandb checkpoint logging compatible with wandb model registry by growlix in https://github.com/mosaicml/composer/pull/1973
* Add support for FP8 on H100 using NVidia's TransformerEngine by dskhudia in https://github.com/mosaicml/composer/pull/1965
* Util for writing HuggingFace save_pretrained from a composer checkpoint by dakinggg in https://github.com/mosaicml/composer/pull/1974
* Enable sharded checkpoint save and load (support local, sharded, and full state dicts for FSDP) by eracah in https://github.com/mosaicml/composer/pull/1902
* Bump custom-inherit from 2.4.0 to 2.4.1 by dependabot in https://github.com/mosaicml/composer/pull/1981
* Bump gitpython from 3.1.30 to 3.1.31 by dependabot in https://github.com/mosaicml/composer/pull/1982
* Fix ICL race conditions by dakinggg in https://github.com/mosaicml/composer/pull/1978
* add map location to huggingface utils by dakinggg in https://github.com/mosaicml/composer/pull/1980
* fix log epoch by mvpatel2000 in https://github.com/mosaicml/composer/pull/1986
* GHA release workflow, refactor PR and Daily workflows by bandish-shah in https://github.com/mosaicml/composer/pull/1968
* Remove python-version input from Daily CPU tests by bandish-shah in https://github.com/mosaicml/composer/pull/1989
* Add some logic to pass the correct github ref to mcp script by bandish-shah in https://github.com/mosaicml/composer/pull/1990
* Fix typo in docstring for eval with missing space by mvpatel2000 in https://github.com/mosaicml/composer/pull/1992
* Fix failing sharded_checkpoint tests that fail when pytorch 1.13 is not installed by eracah in https://github.com/mosaicml/composer/pull/1988
* Add merge_group event trigger to GHA daily workflow by bandish-shah in https://github.com/mosaicml/composer/pull/1996
* Runtime estimator by mvpatel2000 in https://github.com/mosaicml/composer/pull/1991
* Reset scaler state by mvpatel2000 in https://github.com/mosaicml/composer/pull/1999
* Speed monitor refactor by mvpatel2000 in https://github.com/mosaicml/composer/pull/1987
* Test hf fsdp by dakinggg in https://github.com/mosaicml/composer/pull/1972
* Bug/sync optimization logger across ranks by bmosaicml in https://github.com/mosaicml/composer/pull/1970
* Fix optimizer monitor test gating with FSDP by mvpatel2000 in https://github.com/mosaicml/composer/pull/2000
* Low precision groupnorm by mvpatel2000 in https://github.com/mosaicml/composer/pull/1976
* Bump coverage[toml] from 7.1.0 to 7.2.1 by dependabot in https://github.com/mosaicml/composer/pull/2008
* Update docs to include runtime estimator by mvpatel2000 in https://github.com/mosaicml/composer/pull/2009
* Tag surgery algorithms LPLN and LPGN by mvpatel2000 in https://github.com/mosaicml/composer/pull/2011
* Update SpeedMonitor short-description for docs table by mvpatel2000 in https://github.com/mosaicml/composer/pull/2010
* Update Low Precision LayerNorm arguments by nik-mosaic in https://github.com/mosaicml/composer/pull/1994
* Medical Segmentation Example Typo by mvpatel2000 in https://github.com/mosaicml/composer/pull/2014
* Update wallclock logging to default hours by mvpatel2000 in https://github.com/mosaicml/composer/pull/2005
* Add HealthChecker Callback by hanlint in https://github.com/mosaicml/composer/pull/2002
* Allow FX graph mode post-training dynamic quantisation of BlurConv2d operations. by BrettRyland in https://github.com/mosaicml/composer/pull/1995
* Add multi-gpu testing to test_algorithm_resumption by eracah in https://github.com/mosaicml/composer/pull/2016
* Add backwards compatible checkpoint loading for EMA by coryMosaicML in https://github.com/mosaicml/composer/pull/2012
* fsdp with custom process groups by vchiley in https://github.com/mosaicml/composer/pull/2006
* Patch Speed Monitor MFU by mvpatel2000 in https://github.com/mosaicml/composer/pull/2013
* Remove runtime estimator state dict by mvpatel2000 in https://github.com/mosaicml/composer/pull/2015
* Update Docker images to fix resolve vulnerability scan issues by bandish-shah in https://github.com/mosaicml/composer/pull/2007
* Change Deprecation Warnings to Warnings for specifying ProgressBarLogger and ConsoleLogger to loggers by eracah in https://github.com/mosaicml/composer/pull/1846
* Fix eval duplicate logging issue by mvpatel2000 in https://github.com/mosaicml/composer/pull/2018
* Add workflow_dispatch trigger to pr-docker workflow by bandish-shah in https://github.com/mosaicml/composer/pull/2019
* Bump streaming version to less than 0.4.0 by karan6181 in https://github.com/mosaicml/composer/pull/2020
* Upgrade ipython installed in Docker images by bandish-shah in https://github.com/mosaicml/composer/pull/2021
* Upgrade torchmetrics by nik-mosaic in https://github.com/mosaicml/composer/pull/2017
* Complete upgrade of torchmetrics accuracy by nik-mosaic in https://github.com/mosaicml/composer/pull/2025
* Bump version to v0.13.0 by bandish-shah in https://github.com/mosaicml/composer/pull/2024

New Contributors
* BrettRyland made their first contribution in https://github.com/mosaicml/composer/pull/1995

**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.12.1...v0.13.1

0.13.0

**This release has been yanked due to a minor packaging issue, please skip directly to Composer v0.13.1**

What's Changed
* Raise error if max duration is in epochs and dataloader is infinite by dakinggg in https://github.com/mosaicml/composer/pull/1942
* Bump traitlets from 5.8.0 to 5.9.0 by dependabot in https://github.com/mosaicml/composer/pull/1946
* Deprecate HFCrossEntropy and Perplexity by dakinggg in https://github.com/mosaicml/composer/pull/1857
* Change functional surgery method return values to None by nik-mosaic in https://github.com/mosaicml/composer/pull/1543
* Retire Jenkins by bandish-shah in https://github.com/mosaicml/composer/pull/1943
* Update MCP GHA Name by mvpatel2000 in https://github.com/mosaicml/composer/pull/1951
* update memory monitor by mvpatel2000 in https://github.com/mosaicml/composer/pull/1940
* Move ffcv up in test order by dskhudia in https://github.com/mosaicml/composer/pull/1953
* Fix memory monitor test by mvpatel2000 in https://github.com/mosaicml/composer/pull/1957
* Fix model surgery failure due to functional API change by nik-mosaic in https://github.com/mosaicml/composer/pull/1949
* Change how we check for forwards args in models for HF models by bcui19 in https://github.com/mosaicml/composer/pull/1955
* add return dict false test and bug fix by dakinggg in https://github.com/mosaicml/composer/pull/1948
* remove jenkins ci by mvpatel2000 in https://github.com/mosaicml/composer/pull/1954
* add support for enc-dec batches without decoder_input_ids by dakinggg in https://github.com/mosaicml/composer/pull/1950
* Refactor EMA to improve memory efficiency by coryMosaicML in https://github.com/mosaicml/composer/pull/1941
* Add warning for untrusted checkpoints by mvpatel2000 in https://github.com/mosaicml/composer/pull/1959
* permit opt tokenizer by bmosaicml in https://github.com/mosaicml/composer/pull/1958
* GHA Docker build flow for PR's by bandish-shah in https://github.com/mosaicml/composer/pull/1883
* Update download badge link to pepy by karan6181 in https://github.com/mosaicml/composer/pull/1966
* Update python version in setup.py and fixed pypi download badge by karan6181 in https://github.com/mosaicml/composer/pull/1969
* allow eval metrics to be passed in to HuggingFaceModel directly by dakinggg in https://github.com/mosaicml/composer/pull/1971
* Make wandb checkpoint logging compatible with wandb model registry by growlix in https://github.com/mosaicml/composer/pull/1973
* Add support for FP8 on H100 using NVidia's TransformerEngine by dskhudia in https://github.com/mosaicml/composer/pull/1965
* Util for writing HuggingFace save_pretrained from a composer checkpoint by dakinggg in https://github.com/mosaicml/composer/pull/1974
* Enable sharded checkpoint save and load (support local, sharded, and full state dicts for FSDP) by eracah in https://github.com/mosaicml/composer/pull/1902
* Bump custom-inherit from 2.4.0 to 2.4.1 by dependabot in https://github.com/mosaicml/composer/pull/1981
* Bump gitpython from 3.1.30 to 3.1.31 by dependabot in https://github.com/mosaicml/composer/pull/1982
* Fix ICL race conditions by dakinggg in https://github.com/mosaicml/composer/pull/1978
* add map location to huggingface utils by dakinggg in https://github.com/mosaicml/composer/pull/1980
* fix log epoch by mvpatel2000 in https://github.com/mosaicml/composer/pull/1986
* GHA release workflow, refactor PR and Daily workflows by bandish-shah in https://github.com/mosaicml/composer/pull/1968
* Remove python-version input from Daily CPU tests by bandish-shah in https://github.com/mosaicml/composer/pull/1989
* Add some logic to pass the correct github ref to mcp script by bandish-shah in https://github.com/mosaicml/composer/pull/1990
* Fix typo in docstring for eval with missing space by mvpatel2000 in https://github.com/mosaicml/composer/pull/1992
* Fix failing sharded_checkpoint tests that fail when pytorch 1.13 is not installed by eracah in https://github.com/mosaicml/composer/pull/1988
* Add merge_group event trigger to GHA daily workflow by bandish-shah in https://github.com/mosaicml/composer/pull/1996
* Runtime estimator by mvpatel2000 in https://github.com/mosaicml/composer/pull/1991
* Reset scaler state by mvpatel2000 in https://github.com/mosaicml/composer/pull/1999
* Speed monitor refactor by mvpatel2000 in https://github.com/mosaicml/composer/pull/1987
* Test hf fsdp by dakinggg in https://github.com/mosaicml/composer/pull/1972
* Bug/sync optimization logger across ranks by bmosaicml in https://github.com/mosaicml/composer/pull/1970
* Fix optimizer monitor test gating with FSDP by mvpatel2000 in https://github.com/mosaicml/composer/pull/2000
* Low precision groupnorm by mvpatel2000 in https://github.com/mosaicml/composer/pull/1976
* Bump coverage[toml] from 7.1.0 to 7.2.1 by dependabot in https://github.com/mosaicml/composer/pull/2008
* Update docs to include runtime estimator by mvpatel2000 in https://github.com/mosaicml/composer/pull/2009
* Tag surgery algorithms LPLN and LPGN by mvpatel2000 in https://github.com/mosaicml/composer/pull/2011
* Update SpeedMonitor short-description for docs table by mvpatel2000 in https://github.com/mosaicml/composer/pull/2010
* Update Low Precision LayerNorm arguments by nik-mosaic in https://github.com/mosaicml/composer/pull/1994
* Medical Segmentation Example Typo by mvpatel2000 in https://github.com/mosaicml/composer/pull/2014
* Update wallclock logging to default hours by mvpatel2000 in https://github.com/mosaicml/composer/pull/2005
* Add HealthChecker Callback by hanlint in https://github.com/mosaicml/composer/pull/2002
* Allow FX graph mode post-training dynamic quantisation of BlurConv2d operations. by BrettRyland in https://github.com/mosaicml/composer/pull/1995
* Add multi-gpu testing to test_algorithm_resumption by eracah in https://github.com/mosaicml/composer/pull/2016
* Add backwards compatible checkpoint loading for EMA by coryMosaicML in https://github.com/mosaicml/composer/pull/2012
* fsdp with custom process groups by vchiley in https://github.com/mosaicml/composer/pull/2006
* Patch Speed Monitor MFU by mvpatel2000 in https://github.com/mosaicml/composer/pull/2013
* Remove runtime estimator state dict by mvpatel2000 in https://github.com/mosaicml/composer/pull/2015
* Update Docker images to fix resolve vulnerability scan issues by bandish-shah in https://github.com/mosaicml/composer/pull/2007
* Change Deprecation Warnings to Warnings for specifying ProgressBarLogger and ConsoleLogger to loggers by eracah in https://github.com/mosaicml/composer/pull/1846
* Fix eval duplicate logging issue by mvpatel2000 in https://github.com/mosaicml/composer/pull/2018
* Add workflow_dispatch trigger to pr-docker workflow by bandish-shah in https://github.com/mosaicml/composer/pull/2019
* Bump streaming version to less than 0.4.0 by karan6181 in https://github.com/mosaicml/composer/pull/2020
* Upgrade ipython installed in Docker images by bandish-shah in https://github.com/mosaicml/composer/pull/2021
* Upgrade torchmetrics by nik-mosaic in https://github.com/mosaicml/composer/pull/2017
* Complete upgrade of torchmetrics accuracy by nik-mosaic in https://github.com/mosaicml/composer/pull/2025
* Bump version to v0.13.0 by bandish-shah in https://github.com/mosaicml/composer/pull/2024

New Contributors
* BrettRyland made their first contribution in https://github.com/mosaicml/composer/pull/1995

**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.12.1...v0.13.0

0.12.1

bash
pip install --upgrade mosaicml==0.12.1


New Features

1. **📚 In-Context Learning (1876)**

With Composer and MosaicML Cloud you can now evaluate LLMs on in-context learning tasks (LAMBADA, HellaSwag, PIQA, and more) hundreds of times faster than other evaluation harnesses. Please see our "[Blazingly Fast LLM Evaluation for In-Context Learning](https://www.mosaicml.com/blog/llm-evaluation-for-icl)" blog post for more details!

1. **💾 Added support for Coreweave [Object Storage](https://docs.coreweave.com/storage/object-storage) (#1915)**

Coreweave object store is compatible with `boto3`. Uploading objects to Coreweave object store is almost exactly like writing to using S3, except an `endpoint_url` must be set via the `S3_ENDPOINT_URL`environment variable. For example:

python
import os
os.environ['S3_ENDPOINT_URL'] = 'https://object.las1.coreweave.com'

from composer.trainer import Trainer

Save checkpoints every epoch to s3://my_bucket/checkpoints
trainer = Trainer(
model=model,
train_dataloader=train_dataloader,
max_duration='10ep',
save_folder='s3://my_bucket/checkpoints',
save_interval='1ep',
save_overwrite=True,
save_filename='ep{epoch}.pt',
save_num_checkpoints_to_keep=0, delete all checkpoints locally
)

trainer.fit()


Please see our [checkpointing documentation](https://docs.mosaicml.com/en/stable/trainer/checkpointing.html#uploading-checkpoints-to-object-store) for more details.

1. **🪵 Automatic logging of Trainer hparams (1855)**

Hyperparameter arguments passed to the `Trainer` are now automatically logged. Simply set the `Trainer` argument `auto_log_hparams=True`.

Bug Fixes

* Update Docker images to use ‘posix_prefix’ paths (1854)
* Disable new notebook in CI (1875)
* [Fix] Enable logging of metrics from Callbacks to ConsoleLogging (1884)
* Ensure loggers run init event before callbacks in Engine (1890)
* Raise an error in FSDP meta tensor initialization if there's no initialization functions, fix associated flaky FSDP test (1905)
* Add primitive list support (1906)
* Add logic for shifting labels before computing metrics (1913)
* Fixes mis specified dependency (1919)
* pin setuptools in build requirements (1926)
* Pin pip<23 in Docker images (1936)
* Fix bug in trainer.eval and add test cases for test_console_logger (1937)

What's Changed
* Rename GradMonitor -> OptimizerMonitor; add functionality to log optimizer-specific metrics to assist loss spike investigation by bmosaicml in https://github.com/mosaicml/composer/pull/1743
* Add GCS uri support for loading and saving checkpoints by eracah in https://github.com/mosaicml/composer/pull/1833
* HF factory function tests by dakinggg in https://github.com/mosaicml/composer/pull/1832
* Fix doc issue, Trainer hparam log_to_console defaults to False by eracah in https://github.com/mosaicml/composer/pull/1840
* Removed YAHP references from Docs by bandish-shah in https://github.com/mosaicml/composer/pull/1841
* Typo by nguyenhoan1988 in https://github.com/mosaicml/composer/pull/1843
* Fix source code links in docs by bandish-shah in https://github.com/mosaicml/composer/pull/1844
* add importorskip by dakinggg in https://github.com/mosaicml/composer/pull/1847
* Update Docker images to use ‘posix_prefix’ paths by mvpatel2000 in https://github.com/mosaicml/composer/pull/1854
* Fix typo by standardAI in https://github.com/mosaicml/composer/pull/1849
* ConsoleLogger: log first batch and first epoch when using console_log_interval by eracah in https://github.com/mosaicml/composer/pull/1860
* Simpler auto log hparams by eracah in https://github.com/mosaicml/composer/pull/1855
* Fix typos by cclauss in https://github.com/mosaicml/composer/pull/1850
* Bump sphinxext-opengraph from 0.7.3 to 0.7.4 by dependabot in https://github.com/mosaicml/composer/pull/1851
* Bump coverage[toml] from 6.5.0 to 7.0.1 by dependabot in https://github.com/mosaicml/composer/pull/1853
* Bump traitlets from 5.7.0 to 5.8.0 by dependabot in https://github.com/mosaicml/composer/pull/1852
* Bump ipython from 7.32.0 to 8.8.0 by dependabot in https://github.com/mosaicml/composer/pull/1865
* Update monai requirement from <0.10,>=0.9.1 to >=0.9.1,<1.2 by dependabot in https://github.com/mosaicml/composer/pull/1869
* Bump sphinxcontrib-katex from 0.9.3 to 0.9.4 by dependabot in https://github.com/mosaicml/composer/pull/1868
* Bump coverage[toml] from 7.0.1 to 7.0.4 by dependabot in https://github.com/mosaicml/composer/pull/1867
* Upgrade docker images to `torch==1.13.1` by abhi-mosaic in https://github.com/mosaicml/composer/pull/1863
* add more useful info to state by dakinggg in https://github.com/mosaicml/composer/pull/1848
* Feature/lambada evaluator by bmosaicml in https://github.com/mosaicml/composer/pull/1845
* multi-node distributed training, submitit & composer integration demo by YilunKuang in https://github.com/mosaicml/composer/pull/1753
* Daily tests by mvpatel2000 in https://github.com/mosaicml/composer/pull/1870
* Disable new notebook in CI by mvpatel2000 in https://github.com/mosaicml/composer/pull/1875
* Update deepspeed by mvpatel2000 in https://github.com/mosaicml/composer/pull/1864
* fix fail fast in daily by mvpatel2000 in https://github.com/mosaicml/composer/pull/1880
* Fix getting started docs by mvpatel2000 in https://github.com/mosaicml/composer/pull/1878
* Speed up test_lm_task_evaluation by mvpatel2000 in https://github.com/mosaicml/composer/pull/1879
* Fix unprotected import by mvpatel2000 in https://github.com/mosaicml/composer/pull/1874
* add ignore_modules to fsdp by vchiley in https://github.com/mosaicml/composer/pull/1877
* Change vision image by mvpatel2000 in https://github.com/mosaicml/composer/pull/1881
* Fix eval_forward in the ComposerModel ABC by eracah in https://github.com/mosaicml/composer/pull/1871
* Fix fsdp weight tying by bcui19 in https://github.com/mosaicml/composer/pull/1856
* Bump pytest from 7.2.0 to 7.2.1 by dependabot in https://github.com/mosaicml/composer/pull/1886
* Bump ipykernel from 6.19.2 to 6.20.1 by dependabot in https://github.com/mosaicml/composer/pull/1887
* Bump gitpython from 3.1.28 to 3.1.30 by dependabot in https://github.com/mosaicml/composer/pull/1888
* Update Vision Image in Pytest by mvpatel2000 in https://github.com/mosaicml/composer/pull/1882
* Streaming data tests by dakinggg in https://github.com/mosaicml/composer/pull/1842
* Add NLP Algorithms Tests by nik-mosaic in https://github.com/mosaicml/composer/pull/1839
* rename HF notebook by dakinggg in https://github.com/mosaicml/composer/pull/1873
* Ensure loggers run init event before callbacks in Engine by eracah in https://github.com/mosaicml/composer/pull/1890
* [Fix] Enable logging of metrics from Callbacks to ConsoleLogging by eracah in https://github.com/mosaicml/composer/pull/1884
* Updating how we load metrics in a state_dict so we don't add extra memory overhead by bcui19 in https://github.com/mosaicml/composer/pull/1892
* Getting daily tests passing by dakinggg in https://github.com/mosaicml/composer/pull/1893
* Bump nbsphinx from 0.8.10 to 0.8.12 by dependabot in https://github.com/mosaicml/composer/pull/1897
* Fix docker image by mvpatel2000 in https://github.com/mosaicml/composer/pull/1894
* Add primitive list support by mvpatel2000 in https://github.com/mosaicml/composer/pull/1906
* Raise an error in FSDP `meta` tensor initialization if there's no initialization functions, fix associated flaky FSDP test by bcui19 in https://github.com/mosaicml/composer/pull/1905
* Gpu Test by mvpatel2000 in https://github.com/mosaicml/composer/pull/1907
* Update docker with FFCV fix by mvpatel2000 in https://github.com/mosaicml/composer/pull/1908
* Restore GPU tests by mvpatel2000 in https://github.com/mosaicml/composer/pull/1909
* Update workflow names by mvpatel2000 in https://github.com/mosaicml/composer/pull/1910
* Enable daily gpu tests by mvpatel2000 in https://github.com/mosaicml/composer/pull/1911
* Tweak daily GPU tests by mvpatel2000 in https://github.com/mosaicml/composer/pull/1912
* Daily GPU Tests -- Change to Git Commit by mvpatel2000 in https://github.com/mosaicml/composer/pull/1914
* Add logic for shifting labels before computing metrics by alextrott16 in https://github.com/mosaicml/composer/pull/1913
* Add coreweave object store support. by eracah in https://github.com/mosaicml/composer/pull/1915
* Fixes mis specified dependency by dakinggg in https://github.com/mosaicml/composer/pull/1919
* Bump coverage[toml] from 7.0.4 to 7.1.0 by dependabot in https://github.com/mosaicml/composer/pull/1923
* Update importlib-metadata requirement from <6,>=5.0.0 to >=5.0.0,<7 by dependabot in https://github.com/mosaicml/composer/pull/1921
* pin setuptools in build requirements by dakinggg in https://github.com/mosaicml/composer/pull/1926
* Remove synthetic testing infrastructure for HF/NLP by dakinggg in https://github.com/mosaicml/composer/pull/1895
* Add upgrade flags to pip installs by dakinggg in https://github.com/mosaicml/composer/pull/1916
* Temporarily pin pip to <23 by dakinggg in https://github.com/mosaicml/composer/pull/1930
* add link protection by mvpatel2000 in https://github.com/mosaicml/composer/pull/1927
* Cleaning up error checking for FSDP sharding strategies with fp32 precision by bcui19 in https://github.com/mosaicml/composer/pull/1925
* Fix mcp script to avoid follow by mvpatel2000 in https://github.com/mosaicml/composer/pull/1932
* Emit Eval progress in console logging by eracah in https://github.com/mosaicml/composer/pull/1917
* Remove Fused LayerNorm deprecation by nik-mosaic in https://github.com/mosaicml/composer/pull/1931
* Add EFA Support for Multinode in AWS by mvpatel2000 in https://github.com/mosaicml/composer/pull/1891
* remove jenkins gpu tests by mvpatel2000 in https://github.com/mosaicml/composer/pull/1933
* Typo due to stale MCLI docs by mvpatel2000 in https://github.com/mosaicml/composer/pull/1934
* Pin pip<23 in Docker images by bandish-shah in https://github.com/mosaicml/composer/pull/1936
* Fix bug in trainer.eval and add test cases for test_console_logger by eracah in https://github.com/mosaicml/composer/pull/1937
* Add few shot and multiple choice to ICL evaluation by bmosaicml in https://github.com/mosaicml/composer/pull/1876
* Disable test_streaming_datasets in pytest-daily by bandish-shah in https://github.com/mosaicml/composer/pull/1939

New Contributors
* bmosaicml made their first contribution in https://github.com/mosaicml/composer/pull/1743
* nguyenhoan1988 made their first contribution in https://github.com/mosaicml/composer/pull/1843
* standardAI made their first contribution in https://github.com/mosaicml/composer/pull/1849
* cclauss made their first contribution in https://github.com/mosaicml/composer/pull/1850
* YilunKuang made their first contribution in https://github.com/mosaicml/composer/pull/1753
* vchiley made their first contribution in https://github.com/mosaicml/composer/pull/1877

**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.12.0...v0.12.1

0.12.0

bash
pip install mosaicml==0.12.0


New Features

1. **🪵 Logging and ObjectStore Enhancements**

There are multiple improvements to our logging and object store support in this release.

- *Image visualization using our `CometMLLogger` ([1710](https://github.com/mosaicml/composer/pull/1710))*

We've added support for using our `ImageVisualizer` callback with [CometML](https://www.comet.com/site/) to log images and segmentation masks to CometML.
python
from composer.trainer import Trainer

trainer = Trainer(...,
callbacks=[ImageVisualizer()],
loggers=[CometMLLogger()]
)


- *Added direct support for [Oracle Cloud Infrastructure (OCI)](https://www.oracle.com/cloud/storage/object-storage/) as an `ObjectStore` ([#1774](https://github.com/mosaicml/composer/pull/1774)) and support for Google Cloud Storage (GCS) via URI ([#1833](https://github.com/mosaicml/composer/pull/1833))*

To use, you can simply set your `save_folder` or `load_path` to a URI beginning with `oci://` or `gs://`, to save and load with OCI and GCS respectively.
python
from composer.trainer import Trainer

Checkpoint saving to Google Cloud Storage.
trainer = Trainer(
model=model,
save_folder="gs://my-bucket/{run_name}/checkpoints",
run_name='my-run',
save_interval="1ep",
save_filename="ep{epoch}.pt",
save_num_checkpoints_to_keep=0, delete all checkpoints locally
...
)

trainer.fit()


- *Added basic support for logging with [MLFlow](https://www.mlflow.org/docs/latest/tracking.html) ([#1795](https://github.com/mosaicml/composer/pull/1795))*

We've added basic support for using MLFlow to log experiment metrics.
python
from composer.loggers import MLFlowLogger
from composer.trainer import Trainer

mlflow_logger = MLFlowLogger(experiment_name=mlflow_exp_name,
run_name=mlflow_run_name,
tracking_uri=mlflow_uri)
trainer = Trainer(..., loggers=[mlflow_logger])


- *Simplified console and progress bar logging ([1694](https://github.com/mosaicml/composer/pull/1694))*

To turn off the progress bar, set `progress_bar=False`. To turn on logging directly to the console, set `log_to_console=True`. To control the frequency of logging to console, set `console_log_interval` (e.g. to `1ep` or `1ba`).

- *[`getfile`](https://docs.mosaicml.com/en/latest/apireference/generated/composer.utils.getfile.html) supports URIs ([#1750](https://github.com/mosaicml/composer/pull/1750))*

Our `get_file` utility now supports URIs directly (`s3://`, `oci://`, and `gs://`) for downloading files.

1. **🏃‍♀️ Support for Mid-Epoch Resumption with the latest release of [Streaming](https://github.com/mosaicml/streaming)**

We've added support in Composer for the latest release of our Streaming library. This includes awesome new features like instant mid epoch resumption and deterministic shuffling, regardless of the number of nodes. See the [Streaming release notes](https://github.com/mosaicml/streaming/releases/tag/v0.2.0) for more!

1. **🚨 New algorithm - `GyroDropout`!**

Thanks to [jelite](https://github.com/jelite) for adding a new algorithm, `GyroDropout` to Composer! Please see the [method card](https://docs.mosaicml.com/en/latest/method_cards/gyro_dropout.html) for more details.

1. **🤗 HuggingFace + Composer improvements**

We've added a new utility to load a 🤗 HuggingFace model and tokenizer out of a Composer checkpoint ([1754](https://github.com/mosaicml/composer/pull/1754)), making the pretraining -> finetuning workflow even easier in Composer. Check out the [docs](https://docs.mosaicml.com/en/latest/api_reference/generated/composer.models.HuggingFaceModel.html#composer.models.HuggingFaceModel.hf_from_composer_checkpoint) for more details, and our [example notebook](https://docs.mosaicml.com/en/latest/examples/pretrain_finetune_huggingface.html) for a full tutorial ([#1775](https://github.com/mosaicml/composer/pull/1775))!

1. **🎓 GradMonitor -> OptimizerMonitor**

Renames our `GradMonitor` callback to `OptimizerMonitor`, and adds the ability to track optimizer specific metrics. Check out the [docs](https://docs.mosaicml.com/en/latest/api_reference/generated/composer.callbacks.OptimizerMonitor.html) for more details, and add to your code just like any other callback!
python
from composer.callbacks import OptimizerMonitor
from composer.trainer import Trainer

trainer = Trainer(
...,
callbacks=[OptimizerMonitor(log_optimizer_metrics=log_optimizer_metrics)]
)


1. **🐳 New PyTorch and CUDA versions**

We've expanded our library of Docker images with support for PyTorch 1.13 + CUDA 11.7:
- `mosaicml/pytorch:1.13.0_cu117-python3.10-ubuntu20.04`
- `mosaicml/pytorch:1.13.0_cpu-python3.10-ubuntu20.04`

The `mosaicml/pytorch:latest`, `mosaicml/pytorch:cpu_latest` and `mosaicml/composer:0.12.0` tags are now built from PyTorch 1.13 based images. Please see our [DockerHub repository](https://hub.docker.com/orgs/mosaicml/repositories) for additional details.

API changes

1. **Replace `grad_accum` with `device_train_microbatch_size`** ([1749](https://github.com/mosaicml/composer/pull/1749), [#1776](https://github.com/mosaicml/composer/pull/1776))

We're deprecating the `grad_accum` Trainer argument in favor of the more intuitive `device_train_microbatch_size`. Instead of thinking about how to divide your specified minibatch into microbatches, simply specify the size of your microbatch. For example, let's say you want to split your minibatch of 2048 into two microbatches of 1024:

python
from composer import Trainer

trainer = Trainer(
...,
device_train_microbatch_size=1024,
)


If you want Composer to tune the microbatch for you automatically, enable automatic microbatching as follows:

python
from composer import Trainer

trainer = Trainer(
...,
device_train_microbatch_size='auto',
)


The `grad_accum` argument is still supported but will be deprecated in the next Composer release.

1. **Renamed precisions** ([1761](https://github.com/mosaicml/composer/pull/1761))

We've renamed precision attributes for clarity. The following values have been removed: ``['amp', 'fp16', bf16']``.

We have added the following values, prefixed with 'amp' to clarify when an Automatic Mixed Precision type is being used: ``['amp_fp16', 'amp_bf16']``.

The `fp32` precision value remains unchanged.


Deprecations

1. Removed support for YAHP ([1512](https://github.com/mosaicml/composer/pull/1512))
1. Removed COCO and SSD datasets ([1717](https://github.com/mosaicml/composer/pull/1717))
1. Fully removed Streaming v1 support, please see the [mosaicml/streaming](https://github.com/mosaicml/streaming) project for our next-gen streaming datasets ([#1787](https://github.com/mosaicml/composer/pull/1787))
1. Deprecated `FusedLayerNorm` algorithm ([1789](https://github.com/mosaicml/composer/pull/1789))
1. Fully removed `grad_clip_norm` training argument, please use the `GradientClipping` algorithm instead ([1768](https://github.com/mosaicml/composer/pull/1768))
1. Removed `data_fit`, `data_epoch`, and `data_batch` from `Logger` ([1826](https://github.com/mosaicml/composer/pull/1826))

Bug Fixes

- Fix FSDP checkpoint strategy ([1734](https://github.com/mosaicml/composer/pull/1734))
- Fix gradient clipping with FSDP ([1740](https://github.com/mosaicml/composer/pull/1740))
- Adds more supported FSDP config flags (`sync_module_states`, `forward_prefecth`, `limit_all_gathers`) ([1794](https://github.com/mosaicml/composer/pull/1794))
- Allow `FULL` precision with FSDP ([1796](https://github.com/mosaicml/composer/pull/1796))
- Fix `eval_microbatch` modification on `EVAL_BEFORE_FORWARD` event ([1739](https://github.com/mosaicml/composer/pull/1739))
- Fix algorithm API backwards compatibility in checkpoints ([1741](https://github.com/mosaicml/composer/pull/1741))
- Fixes a bad `None` check preventing setting `device_id` to `0` ([1767](https://github.com/mosaicml/composer/pull/1767))
- Unregister engine to make cleaning up memory easier ([1769](https://github.com/mosaicml/composer/pull/1769))
- Fix issue if `metric_names` is not a list ([1798](https://github.com/mosaicml/composer/pull/1798))
- Match implementation for list and tensor batch splitting ([1804](https://github.com/mosaicml/composer/pull/1804))
- Fixes infinite eval issue ([1815](https://github.com/mosaicml/composer/pull/1815))


What's Changed
* Update installation constraints for streaming by karan6181 in https://github.com/mosaicml/composer/pull/1661
* Update decoupled_weight_decay.md by jacobfulano in https://github.com/mosaicml/composer/pull/1672
* Notebooks part 2 by dakinggg in https://github.com/mosaicml/composer/pull/1659
* Add trainer arg for engine passes by mvpatel2000 in https://github.com/mosaicml/composer/pull/1673
* Autoload algorithms by mvpatel2000 in https://github.com/mosaicml/composer/pull/1658
* Faster metrics calculations + Fix warnings added by the new version of torchmetrics by dskhudia in https://github.com/mosaicml/composer/pull/1674
* Update coolname requirement from <2,>=1.1.0 to >=1.1.0,<3 by dependabot in https://github.com/mosaicml/composer/pull/1666
* Bump ipykernel from 6.16.0 to 6.16.1 by dependabot in https://github.com/mosaicml/composer/pull/1667
* Bump traitlets from 5.4.0 to 5.5.0 by dependabot in https://github.com/mosaicml/composer/pull/1668
* Image viz by dakinggg in https://github.com/mosaicml/composer/pull/1676
* Update checks for Gated Linear Units Method by jacobfulano in https://github.com/mosaicml/composer/pull/1575
* ADE20k streaming factory method by Landanjs in https://github.com/mosaicml/composer/pull/1626
* Deyahpify cifar10 by growlix in https://github.com/mosaicml/composer/pull/1677
* Nuke YAHP by hanlint in https://github.com/mosaicml/composer/pull/1512
* Imagenet streaming factory method by codestar12 in https://github.com/mosaicml/composer/pull/1649
* Bump ipykernel from 6.16.1 to 6.16.2 by dependabot in https://github.com/mosaicml/composer/pull/1683
* Bump pytest from 7.1.3 to 7.2.0 by dependabot in https://github.com/mosaicml/composer/pull/1684
* Bump pypandoc from 1.9 to 1.10 by dependabot in https://github.com/mosaicml/composer/pull/1680
* Update py-cpuinfo requirement from <9,>=8.0.0 to >=8.0.0,<10 by dependabot in https://github.com/mosaicml/composer/pull/1681
* Uncomment and clean up algorithms documentation by growlix in https://github.com/mosaicml/composer/pull/1685
* Update glu check by mvpatel2000 in https://github.com/mosaicml/composer/pull/1689
* fix backwards compatability by mvpatel2000 in https://github.com/mosaicml/composer/pull/1693
* Fix engine pass registration by mvpatel2000 in https://github.com/mosaicml/composer/pull/1692
* Add Low Precision LayerNorm by nik-mosaic in https://github.com/mosaicml/composer/pull/1525
* Update codeowners by mvpatel2000 in https://github.com/mosaicml/composer/pull/1691
* Add nccl env var by mvpatel2000 in https://github.com/mosaicml/composer/pull/1695
* Fix eval timestamp by mvpatel2000 in https://github.com/mosaicml/composer/pull/1697
* Update distributed docs by mvpatel2000 in https://github.com/mosaicml/composer/pull/1696
* Return empty dict if wandb disabled by dakinggg in https://github.com/mosaicml/composer/pull/1698
* Autoresume related error messages by dakinggg in https://github.com/mosaicml/composer/pull/1687
* Add log_image to wandb, cometml, and LoggerDestination by eracah in https://github.com/mosaicml/composer/pull/1675
* Pin PyTorch and supporting package versions by bandish-shah in https://github.com/mosaicml/composer/pull/1688
* Add in unit tests for log_image function for CometMLLogger and WandBLogger by eracah in https://github.com/mosaicml/composer/pull/1701
* refactor devices by mvpatel2000 in https://github.com/mosaicml/composer/pull/1699
* remove as in device by mvpatel2000 in https://github.com/mosaicml/composer/pull/1704
* Fix device imports by mvpatel2000 in https://github.com/mosaicml/composer/pull/1705
* Fix typing in EMA's _move_params_to_device() by coryMosaicML in https://github.com/mosaicml/composer/pull/1707
* Add docs for saving and loading checkpoints with GCS by eracah in https://github.com/mosaicml/composer/pull/1702
* Clean up imports by mvpatel2000 in https://github.com/mosaicml/composer/pull/1700
* Add rud docs by eracah in https://github.com/mosaicml/composer/pull/1709
* Bump cryptography from 38.0.1 to 38.0.3 by dependabot in https://github.com/mosaicml/composer/pull/1712
* GHA workflow for code quality checks by bandish-shah in https://github.com/mosaicml/composer/pull/1719
* Add support for Path in CheckpointSaver by cojennin in https://github.com/mosaicml/composer/pull/1721
* Docs Typo by mvpatel2000 in https://github.com/mosaicml/composer/pull/1723
* Bump nbsphinx from 0.8.9 to 0.8.10 by dependabot in https://github.com/mosaicml/composer/pull/1725
* Bump sphinx-argparse from 0.3.2 to 0.4.0 by dependabot in https://github.com/mosaicml/composer/pull/1726
* Simple nlp tests by dakinggg in https://github.com/mosaicml/composer/pull/1716
* Build Streaming CIFAR10 Factory Function by growlix in https://github.com/mosaicml/composer/pull/1729
* Change `build_streaming_cifar10_dataloader()` to use v2 by default by growlix in https://github.com/mosaicml/composer/pull/1730
* Clear the Optimizer before wrapping with FSDP by bcui19 in https://github.com/mosaicml/composer/pull/1732
* Add inf eval check by mvpatel2000 in https://github.com/mosaicml/composer/pull/1733
* Fix fsdp checkpoint strategy by bcui19 in https://github.com/mosaicml/composer/pull/1734
* Assign eval microbatch to self.state.batch by dakinggg in https://github.com/mosaicml/composer/pull/1739
* Add masks to wandblogger.log_image and cometmllogger.log_image and refactor ImageVisualizer to use log_image [WIP] by eracah in https://github.com/mosaicml/composer/pull/1710
* Protect backwards compatability by mvpatel2000 in https://github.com/mosaicml/composer/pull/1741
* Add composer version state by dakinggg in https://github.com/mosaicml/composer/pull/1742
* Adds auto object store creation to `get_file` by dakinggg in https://github.com/mosaicml/composer/pull/1750
* Log console interval by eracah in https://github.com/mosaicml/composer/pull/1694
* Bump sphinxcontrib-katex from 0.9.0 to 0.9.3 by dependabot in https://github.com/mosaicml/composer/pull/1757
* Bump pandoc from 2.2 to 2.3 by dependabot in https://github.com/mosaicml/composer/pull/1756
* Bump cryptography from 38.0.3 to 38.0.4 by dependabot in https://github.com/mosaicml/composer/pull/1755
* Add more event tests by mvpatel2000 in https://github.com/mosaicml/composer/pull/1762
* Add python 3.10, pytorch 1.13, cuda 11.7 by mvpatel2000 in https://github.com/mosaicml/composer/pull/1735
* Add huggingface info to state dict by dakinggg in https://github.com/mosaicml/composer/pull/1744
* Global batch size by mvpatel2000 in https://github.com/mosaicml/composer/pull/1746
* Add device to state by mvpatel2000 in https://github.com/mosaicml/composer/pull/1765
* Rename precisions by mvpatel2000 in https://github.com/mosaicml/composer/pull/1761
* Device id none by dakinggg in https://github.com/mosaicml/composer/pull/1767
* Autoload HuggingFace model/tokenizer by dakinggg in https://github.com/mosaicml/composer/pull/1754
* Supporting `train_device_microbatch_size` by mvpatel2000 in https://github.com/mosaicml/composer/pull/1749
* Switch flash attention to tag by mvpatel2000 in https://github.com/mosaicml/composer/pull/1766
* remove grad clip norm by mvpatel2000 in https://github.com/mosaicml/composer/pull/1768
* unregister engine for memory cleanup by mvpatel2000 in https://github.com/mosaicml/composer/pull/1769
* Fix hf tokenizer test for new hf version by dakinggg in https://github.com/mosaicml/composer/pull/1772
* Decrease microbatch size if batch size is smaller by mvpatel2000 in https://github.com/mosaicml/composer/pull/1771
* remove deprecated code by mvpatel2000 in https://github.com/mosaicml/composer/pull/1773
* cache call to cpuinfo by dakinggg in https://github.com/mosaicml/composer/pull/1778
* device train microbatch size pt 2 by mvpatel2000 in https://github.com/mosaicml/composer/pull/1776
* Huggingface pretrain + finetune notebook by dakinggg in https://github.com/mosaicml/composer/pull/1775
* Bump traitlets from 5.5.0 to 5.6.0 by dependabot in https://github.com/mosaicml/composer/pull/1781
* Bump deepspeed from 0.7.5 to 0.7.6 by dependabot in https://github.com/mosaicml/composer/pull/1780
* Minor docs fix for deepspeed typo by mvpatel2000 in https://github.com/mosaicml/composer/pull/1784
* Update Auto Microbatching by mvpatel2000 in https://github.com/mosaicml/composer/pull/1785
* Adding GyroDropout as an algorithm to Composer by jelite in https://github.com/mosaicml/composer/pull/1718
* Add Deprecation warning for Fused LayerNorm by nik-mosaic in https://github.com/mosaicml/composer/pull/1789
* Update error msgs by mvpatel2000 in https://github.com/mosaicml/composer/pull/1791
* Change gyro emoji by nik-mosaic in https://github.com/mosaicml/composer/pull/1792
* Speeding up tests by dakinggg in https://github.com/mosaicml/composer/pull/1779
* Add durations arg to pytest by dakinggg in https://github.com/mosaicml/composer/pull/1793
* Properly implement gradient clipping for FSDP by bcui19 in https://github.com/mosaicml/composer/pull/1740
* Updating FSDP supported config flags by bcui19 in https://github.com/mosaicml/composer/pull/1794
* Remove streaming v1 datasets. by knighton in https://github.com/mosaicml/composer/pull/1787
* Remove references to validate in docs by dakinggg in https://github.com/mosaicml/composer/pull/1800
* Install latest Git in Docker images by bandish-shah in https://github.com/mosaicml/composer/pull/1770
* move to pypi release for flash attn by mvpatel2000 in https://github.com/mosaicml/composer/pull/1777
* Check and make sure that metric names is a list of strings by dakinggg in https://github.com/mosaicml/composer/pull/1798
* Adding in the possibility of 'None' for MixedPrecision FSDP by bcui19 in https://github.com/mosaicml/composer/pull/1796
* Updating assertion check for gradient clipping and updating gradient clip tests for FSDP by bcui19 in https://github.com/mosaicml/composer/pull/1802
* Moving Pytest CPU to GHA by mvpatel2000 in https://github.com/mosaicml/composer/pull/1790
* Bump sphinxext-opengraph from 0.6.3 to 0.7.3 by dependabot in https://github.com/mosaicml/composer/pull/1760
* Update distributed_training.rst by lupesko in https://github.com/mosaicml/composer/pull/1731
* Use streaming v3 by knighton in https://github.com/mosaicml/composer/pull/1797
* Bump traitlets from 5.6.0 to 5.7.0 by dependabot in https://github.com/mosaicml/composer/pull/1806
* Bump ipykernel from 6.16.2 to 6.19.2 by dependabot in https://github.com/mosaicml/composer/pull/1810
* Update packaging requirement from <22,>=21.3.0 to >=21.3.0,<23 by dependabot in https://github.com/mosaicml/composer/pull/1808
* match list batch splitting and tensor batch splitting by dakinggg in https://github.com/mosaicml/composer/pull/1804
* Add type ignore for onnx import by mvpatel2000 in https://github.com/mosaicml/composer/pull/1811
* Remove pip install all from coverage action by dakinggg in https://github.com/mosaicml/composer/pull/1805
* Remove coco and ssd by growlix in https://github.com/mosaicml/composer/pull/1717
* Rename matrix by mvpatel2000 in https://github.com/mosaicml/composer/pull/1813
* Add OCI ObjectStore by eracah in https://github.com/mosaicml/composer/pull/1774
* Add MLFlowLogger by eracah in https://github.com/mosaicml/composer/pull/1795
* Object store docs by dakinggg in https://github.com/mosaicml/composer/pull/1817
* fix inf eval by mvpatel2000 in https://github.com/mosaicml/composer/pull/1815
* Add `fsdp_config` to `state` and add fsdp_config to trainer docstring by growlix in https://github.com/mosaicml/composer/pull/1821
* Add SHARP support to docker by mvpatel2000 in https://github.com/mosaicml/composer/pull/1818
* Testing Infra Cleanup by mvpatel2000 in https://github.com/mosaicml/composer/pull/1822
* Remove dead code in dockerfile by mvpatel2000 in https://github.com/mosaicml/composer/pull/1823
* Fix Export Docs by mvpatel2000 in https://github.com/mosaicml/composer/pull/1824
* Remove old deprecated logger methods by eracah in https://github.com/mosaicml/composer/pull/1826
* NLP metrics tests by dakinggg in https://github.com/mosaicml/composer/pull/1830
* Nlp pipeline test by dakinggg in https://github.com/mosaicml/composer/pull/1828
* Add tests for uri helper functions by eracah in https://github.com/mosaicml/composer/pull/1827
* Add pip targets to installation.rst docs by eracah in https://github.com/mosaicml/composer/pull/1829

New Contributors
* cojennin made their first contribution in https://github.com/mosaicml/composer/pull/1721
* jelite made their first contribution in https://github.com/mosaicml/composer/pull/1718

**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.11.1...v0.12.0

0.11.1

bash
pip install --upgrade mosaicml==0.11.1


Bug Fixes

* Fixes for Notebooks (1659)
* Documentation updates and fixes (1685, 1696, 1702, 1709)
* Addressed warnings and speed improvements for Torchmetrics (1674)
* Fixes to Gated Linear Units method (1575, 1689)
* Set `NCCL_ASYNC_ERROR_HANDLING` ENV variable in Composer launcher to enable distributed timeout (1695)
* Fix epoch count when `eval` is called before `fit` (1697)
* Constrain PyTorch package versions to avoid unintended upgrades (1688)
* Fix Optimizer state sharding issue with FSDP (1732)
* Rase `ValueError` with if evaluation dataloader of infinite length is specified

**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.11.0...v0.11.1

0.11.0

bash
pip install --upgrade mosaicml==0.11.0


New Features

1. **🧰 FSDP Beta Support**

Composer now supports [PyTorch FSDP](https://pytorch.org/docs/stable/fsdp.html)! PyTorch FSDP is a strategy for distributed training, similar to PyTorch DDP, that distributes work using data-parallelism only. On top of this, FSDP uses model, gradient, and optimizer sharding to dramatically reduce device memory requirements, and enables users to easily scale and train large models.

Here's how easy it is to use FSDP with Composer:
python
import torch.nn as nn
from composer import Trainer

class Block (nn.Module):
...

Your custom model
class Model(nn.Module):
def __init__(self, n_layers):
super().__init__()
self.blocks = nn.ModuleList([
Block(...) for _ in range(n_layers)
]),
self.head = nn.Linear(...)
def forward(self, inputs):
...

FSDP Wrap Function
def fsdp_wrap_fn(self, module):
return isinstance(module, Block)

Activation Checkpointing Function
def activation_checkpointing_fn(self, module):
return isinstance(module, Block)

ComposerModel wrapper, used by the Trainer
to compute loss, metrics, etc.
class MyComposerModel(ComposerModel):

def __init__(self, n_layers):
super().__init__()
self.model = Model(n_layers)
...

def forward(self, batch):
...

def eval_forward(self, batch, outputs=None):
...

def loss(self, outputs, batch):
...

Pass your ComposerModel and fsdp_config into the Trainer
composer_model = MyComposerModel(n_layers=3)
fsdp_config = {
'sharding_strategy': 'FULL_SHARD',
'min_params': 1e8,
'cpu_offload': False, Not supported yet
'mixed_precision': 'DEFAULT',
'backward_prefetch': 'BACKWARD_POST',
'activation_checkpointing': False,
'activation_cpu_offload': False,
'verbose': True
}

trainer = Trainer(
model=composer_model,
fsdp_config=fsdp_config,
...
)

trainer.fit()



For more information, please see our [FSDP docs](https://docs.mosaicml.com/en/v0.11.0/notes/distributed_training.html#fullyshardeddataparallel-fsdp).

Page 8 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.