Composer

Latest version: v0.23.2

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

Scan your dependencies

Page 4 of 10

0.17.1

Bug Fixes

**1. MosaicML Logger Robustness (https://github.com/mosaicml/composer/pull/2728)**

We've improved the MosaicML logger to be more robust to faulty serialization.


What's Changed
* Add train finished run event by jjanezhang in https://github.com/mosaicml/composer/pull/2714
* Override nvidia env var for 11.8 by dakinggg in https://github.com/mosaicml/composer/pull/2722
* Update file exists checkpointing error messages to be more helpful by irenedea in https://github.com/mosaicml/composer/pull/2668
* [S] Add tag support to MLFlowLogger by aspfohl in https://github.com/mosaicml/composer/pull/2716
* Use `raise ... from e` to preserve stack trace by irenedea in https://github.com/mosaicml/composer/pull/2725
* add 0.17 to bcompat tests by eracah in https://github.com/mosaicml/composer/pull/2723
* Add support for canned ACL environment variable by nik-mosaic in https://github.com/mosaicml/composer/pull/2729
* Check serialization for JSON in mosaicml logger by mvpatel2000 in https://github.com/mosaicml/composer/pull/2728
* Fix profiler issue by j316chuck in https://github.com/mosaicml/composer/pull/2735
* Fix activation cpu offloading by cli99 in https://github.com/mosaicml/composer/pull/2724
* Bump version 0.17.1 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2741


**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.17.0...v0.17.1

0.17.0

What's New

**1. Hybrid Sharded Data Parallel (HSDP) Integration (2648)**

Composer now supports Hybrid Sharded Data Parallel (HSDP), where a model is both sharded and replicated across blocks of controllable size. By default, this will shard a model within a node and replicate across nodes, but Composer will accept a tuple of process groups to specify custom shard/replicate sizes. This can be specified in the FSDP config.


composer_model = MyComposerModel(n_layers=3)

fsdp_config = {
'sharding_strategy': 'HYBRID_SHARD',
}

trainer = Trainer(
model=composer_model,
max_duration='4ba',
fsdp_config=fsdp_config,
...
)


`HYBRID_SHARD` will `FULL_SHARD` a model whereas `_HYBRID_SHARD_ZERO2` will `SHARD_GRAD_OP` within the shard block.

**2. Train Loss NaN Monitor (2704)**

Composer has a new callback which will raise a value error if your loss NaNs out. This is very useful to avoid wasting compute if your training run diverges or fails for numerical reasons.


from composer.callbacks import NaNMonitor

composer_model = MyComposerModel(n_layers=3)

trainer = Trainer(
model=composer_model,
max_duration='4ba',
callbacks=NaNMonitor(),
...
)


Bug Fixes

* Fix MPS with dict loss by mvpatel2000 in https://github.com/mosaicml/composer/pull/2706
* Squelch Memory Monitor warnings if device=meta by hanlint in https://github.com/mosaicml/composer/pull/2529
* Switch mosaicml logger to use futures to enable better error handling by j316chuck in https://github.com/mosaicml/composer/pull/2702

What's Changed
* Add partial state dict functionality for FSDP by b-chu in https://github.com/mosaicml/composer/pull/2637
* Update monai requirement from <1.3,>=0.9.1 to >=0.9.1,<1.4 by dependabot in https://github.com/mosaicml/composer/pull/2643
* Bump pytest-codeblocks from 0.16.1 to 0.17.0 by dependabot in https://github.com/mosaicml/composer/pull/2645
* Remove checkpoint on close by mvpatel2000 in https://github.com/mosaicml/composer/pull/2646
* Update latest to 2.1 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2650
* HSDP Support by mvpatel2000 in https://github.com/mosaicml/composer/pull/2648
* Log profile averages by j316chuck in https://github.com/mosaicml/composer/pull/2647
* Daily API key by mvpatel2000 in https://github.com/mosaicml/composer/pull/2655
* Add automatic remote uploader downloader for composer profiler by j316chuck in https://github.com/mosaicml/composer/pull/2653
* Update the AWS_OFI_NCCL version and add in the MPI HWLOC install by willgleich in https://github.com/mosaicml/composer/pull/2651
* Fix GCP tests by mvpatel2000 in https://github.com/mosaicml/composer/pull/2658
* Allow no eval_loader when eval is disabled by b-chu in https://github.com/mosaicml/composer/pull/2657
* Gate HSDP by torch 2.1.0 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2656
* Fix FSDP arg default to match torch by mvpatel2000 in https://github.com/mosaicml/composer/pull/2660
* Bump pypandoc from 1.11 to 1.12 by dependabot in https://github.com/mosaicml/composer/pull/2664
* Bump vit-pytorch from 0.35.8 to 1.6.1 by dependabot in https://github.com/mosaicml/composer/pull/2662
* Upgrade to transformers 4.34.1 by dakinggg in https://github.com/mosaicml/composer/pull/2635
* Update docker readme by mvpatel2000 in https://github.com/mosaicml/composer/pull/2669
* Add script to validate remote object store paths by irenedea in https://github.com/mosaicml/composer/pull/2667
* Torch 2.1 Resumption Support by mvpatel2000 in https://github.com/mosaicml/composer/pull/2665
* Bump gitpython from 3.1.37 to 3.1.40 by dependabot in https://github.com/mosaicml/composer/pull/2663
* Fix dist by mvpatel2000 in https://github.com/mosaicml/composer/pull/2670
* Add torch nightly for torch 2.2.0 10-24 by j316chuck in https://github.com/mosaicml/composer/pull/2671
* Adding Model Data Init and Training Progress to MosaicMLLogger by jjanezhang in https://github.com/mosaicml/composer/pull/2633
* Bump pytest from 7.4.2 to 7.4.3 by dependabot in https://github.com/mosaicml/composer/pull/2678
* Bump sphinxext-opengraph from 0.8.2 to 0.9.0 by dependabot in https://github.com/mosaicml/composer/pull/2677
* Bump traitlets from 5.10.0 to 5.12.0 by dependabot in https://github.com/mosaicml/composer/pull/2674
* Bump cryptography from 41.0.4 to 41.0.5 by dependabot in https://github.com/mosaicml/composer/pull/2675
* Secure Code Eval changes by mvpatel2000 in https://github.com/mosaicml/composer/pull/2679
* Lazy validation of code eval metric by mvpatel2000 in https://github.com/mosaicml/composer/pull/2681
* Upgrade transformers to 4.35 by dakinggg in https://github.com/mosaicml/composer/pull/2684
* Bump traitlets from 5.12.0 to 5.13.0 by dependabot in https://github.com/mosaicml/composer/pull/2687
* Bump ipykernel from 6.25.2 to 6.26.0 by dependabot in https://github.com/mosaicml/composer/pull/2686
* Add Kwargs to upload_object by nik-mosaic in https://github.com/mosaicml/composer/pull/2692
* Add version number to composer metadata logs by j316chuck in https://github.com/mosaicml/composer/pull/2565
* Add distributed barrier test fixture to ensure pytest cleans up resources properly by j316chuck in https://github.com/mosaicml/composer/pull/2694
* Properly handle empty metric_names passed to Trainer._filter_metrics by irenedea in https://github.com/mosaicml/composer/pull/2700
* Train loss NaN checking callback by coryMosaicML in https://github.com/mosaicml/composer/pull/2704
* Adding logging and force flushing for run events by jjanezhang in https://github.com/mosaicml/composer/pull/2703
* [daily-test fix] Add rank 0 gating to test_elastic_resumption state dict comparison by eracah in https://github.com/mosaicml/composer/pull/2705
* Fix MPS with dict loss by mvpatel2000 in https://github.com/mosaicml/composer/pull/2706
* Update types to follow PEP 585 by b-chu in https://github.com/mosaicml/composer/pull/2697
* Bump yamllint from 1.32.0 to 1.33.0 by dependabot in https://github.com/mosaicml/composer/pull/2708
* Update wandb requirement from <0.16,>=0.13.2 to >=0.13.2,<0.17 by dependabot in https://github.com/mosaicml/composer/pull/2709
* Squelch Memory Monitor warnings if device=meta by hanlint in https://github.com/mosaicml/composer/pull/2529
* Fix NaN monitor for loss dicts. by coryMosaicML in https://github.com/mosaicml/composer/pull/2712
* Switch mosaicml logger to use futures to enable better error handling by j316chuck in https://github.com/mosaicml/composer/pull/2702
* Fetching arguments for FSDP by mvpatel2000 in https://github.com/mosaicml/composer/pull/2710
* Bump version to 0.17 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2711

New Contributors
* willgleich made their first contribution in https://github.com/mosaicml/composer/pull/2651
* jjanezhang made their first contribution in https://github.com/mosaicml/composer/pull/2633

**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.16.4...v0.17.0

0.16.4

What's New

**1. Torch 2.1 Support**

Composer officially supports PyTorch 2.1! We support several new features from 2.1, including CustomPolicy which supports granular wrapping with FSDP.

What's Changed
* Add 0.16 checkpoint to backwards compatibility tests by eracah in https://github.com/mosaicml/composer/pull/2567
* Updating FSDP monkeypatch by mvpatel2000 in https://github.com/mosaicml/composer/pull/2571
* Add Databricks UC Volume Object Store by panchalhp-db in https://github.com/mosaicml/composer/pull/2548
* Fix pytest disk space OOM issue by adding tmp_path_retention_policy=None by j316chuck in https://github.com/mosaicml/composer/pull/2583
* Change daily nightly test version by j316chuck in https://github.com/mosaicml/composer/pull/2596
* Add save and register wrappers to mlflow logger by dakinggg in https://github.com/mosaicml/composer/pull/2579
* Missing () fo or in auto microbatching gate by mvpatel2000 in https://github.com/mosaicml/composer/pull/2574
* Simplify FSDP Gradient Clipping by mvpatel2000 in https://github.com/mosaicml/composer/pull/2586
* Use FSDP CustomPolicy to support custom kwargs passed to different wrapped modules by cli99 in https://github.com/mosaicml/composer/pull/2585
* Free outputs callback by mvpatel2000 in https://github.com/mosaicml/composer/pull/2598
* Merge branch 'dev' into spr/dev/458c4e36 by b-chu in https://github.com/mosaicml/composer/pull/2595
* Fix a bug when batch type is dict and one of the values is the list by mvpatel2000 in https://github.com/mosaicml/composer/pull/2599
* Readme update by ejyuen in https://github.com/mosaicml/composer/pull/2581
* Add chain of thought eval by bmosaicml in https://github.com/mosaicml/composer/pull/2466
* Add torch 2.1.0 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2602
* Change pr cpu and pr gpu test docker images by j316chuck in https://github.com/mosaicml/composer/pull/2611
* Change the tokenizer json file to read binary by dakinggg in https://github.com/mosaicml/composer/pull/2608
* [Docs] MLflow casing by aspfohl in https://github.com/mosaicml/composer/pull/2609
* Call generate callback at end of training by aspfohl in https://github.com/mosaicml/composer/pull/2607
* Refactor save interval and eval interval to share code by dakinggg in https://github.com/mosaicml/composer/pull/2600
* Deprecate many datasets and models by mvpatel2000 in https://github.com/mosaicml/composer/pull/2605
* Clean up gpu tests by mvpatel2000 in https://github.com/mosaicml/composer/pull/2612
* Remove apex test by j316chuck in https://github.com/mosaicml/composer/pull/2616
* Patch default precision by mvpatel2000 in https://github.com/mosaicml/composer/pull/2628
* Add logging for generate callbacks by aspfohl in https://github.com/mosaicml/composer/pull/2630
* Expose input_names and output_names when exporting to ONNX by antoinebrl in https://github.com/mosaicml/composer/pull/2601
* Bump version to 0.16.4 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2627

New Contributors
* panchalhp-db made their first contribution in https://github.com/mosaicml/composer/pull/2548
* cli99 made their first contribution in https://github.com/mosaicml/composer/pull/2585

**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.16.3...v0.16.4

0.16.3

What's New

**1. Add passk for HumanEval**

HumanEval now supports passk. We also support first-class integration with the MosaicML platform for secure code evaluation.

**2. `log_model` with MLFlow**

The MLFlow integration now supports `log_model` at the end of the run.

What's Changed
* Update checkpoint.py by b-chu in https://github.com/mosaicml/composer/pull/2540
* Add log image to mlflow by eracah in https://github.com/mosaicml/composer/pull/2416
* Log runtime estimator units by mvpatel2000 in https://github.com/mosaicml/composer/pull/2542
* Bump traitlets from 5.9.0 to 5.10.0 by dependabot in https://github.com/mosaicml/composer/pull/2547
* Bump gitpython from 3.1.35 to 3.1.36 by dependabot in https://github.com/mosaicml/composer/pull/2546
* Bump ipykernel from 6.25.1 to 6.25.2 by dependabot in https://github.com/mosaicml/composer/pull/2544
* Add providers param to ONNX Session in tests by nik-mosaic in https://github.com/mosaicml/composer/pull/2553
* Bump flash attn by mvpatel2000 in https://github.com/mosaicml/composer/pull/2551
* Remove pin by mvpatel2000 in https://github.com/mosaicml/composer/pull/2554
* Change filter to include pull_request_target by mvpatel2000 in https://github.com/mosaicml/composer/pull/2557
* Downgrade nightly to previous version by mvpatel2000 in https://github.com/mosaicml/composer/pull/2556
* MCLI Code Eval by rishab-partha in https://github.com/mosaicml/composer/pull/2479
* Bump cryptography from 41.0.3 to 41.0.4 by dependabot in https://github.com/mosaicml/composer/pull/2559
* Bump gitpython from 3.1.36 to 3.1.37 by dependabot in https://github.com/mosaicml/composer/pull/2560
* Update numpy requirement from <1.26.0,>=1.21.5 to >=1.21.5,<1.27.0 by dependabot in https://github.com/mosaicml/composer/pull/2561
* Update support for HumanEval by mcarbin in https://github.com/mosaicml/composer/pull/2550
* Add log_model to MLFlowLogger by dakinggg in https://github.com/mosaicml/composer/pull/2541
* Bump version to 0.16.3 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2566

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

**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.16.2...v0.16.3

0.16.2

What's New

**1. PyTorch Nightly Support**

Composer now supports PyTorch Nightly and Cuda 12! Along with new docker images based on nightly PyTorch versions and release candidates, we've updated our PyTorch monkeypatches to support the latest version of PyTorch. These monkeypatches add additional functionality in finer-grain FSDP wrapping and patch bugs related to sharded checkpoints. We are in the process of upstreaming these changes into PyTorch.

Bug Fixes

**1. MosaicML Logger Robustness**

MosaicML logger now is robust to platform timeouts and other errors. Additionally, it can now be disabled by setting the environment variable `MOSAICML_PLATFORM` to `'False'` when training on the MosaicML platform.

**2. GCS Integration**

GCS authentication is now supported with HMAC keys, patching a bug in the previous implementation.

**3. Optimizer Monitor Norm Calculation (https://github.com/mosaicml/composer/pull/2531)**

Previously, the optimizer monitor incorrectly reduced norms across GPUs. It now correctly computes norms in a distributed setting.

What's Changed
* fix: when there is no train_metrics, do not checkpoint by furkanbiten in https://github.com/mosaicml/composer/pull/2502
* Remove metric saving by mvpatel2000 in https://github.com/mosaicml/composer/pull/2514
* Fix daily tests by removing gpu marker by j316chuck in https://github.com/mosaicml/composer/pull/2515
* Refactor mosaic_fsdp.py by b-chu in https://github.com/mosaicml/composer/pull/2506
* Disable slack notifications for PRs by mvpatel2000 in https://github.com/mosaicml/composer/pull/2517
* Add custom sharding to ChunkShardingSpec by b-chu in https://github.com/mosaicml/composer/pull/2507
* Update nightly docker image to torch nightly 09-03-23 by j316chuck in https://github.com/mosaicml/composer/pull/2518
* Update pre-commit in setup.py by b-chu in https://github.com/mosaicml/composer/pull/2522
* Add FSDP custom wrap with torch 2.1 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2460
* Fix GCSObjectStore bug where hmac keys auth doesn't work by eracah in https://github.com/mosaicml/composer/pull/2519
* Bump gitpython from 3.1.34 to 3.1.35 by dependabot in https://github.com/mosaicml/composer/pull/2525
* Bump pytest from 7.4.0 to 7.4.2 by dependabot in https://github.com/mosaicml/composer/pull/2523
* Upgrade to MLFlow version 2.5.0 by ngcgarcia in https://github.com/mosaicml/composer/pull/2528
* Disable cifar daily test by mvpatel2000 in https://github.com/mosaicml/composer/pull/2527
* Mosaicml logger robustness improvements by mvpatel2000 in https://github.com/mosaicml/composer/pull/2530
* Fix metrics keys sort in DecoupledAdamW for OptimizerMonitor FSDP metric agreggation by m1kol in https://github.com/mosaicml/composer/pull/2531
* Fix github actions for GCS integration testing by mvpatel2000 in https://github.com/mosaicml/composer/pull/2532
* Fix GCS tests by mvpatel2000 in https://github.com/mosaicml/composer/pull/2535
* Change cast for mosaicml logger by mvpatel2000 in https://github.com/mosaicml/composer/pull/2538
* Bump Version to 0.16.2 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2537
* Bump transformers version by dakinggg in https://github.com/mosaicml/composer/pull/2539

New Contributors
* ngcgarcia made their first contribution in https://github.com/mosaicml/composer/pull/2528
* m1kol made their first contribution in https://github.com/mosaicml/composer/pull/2531

**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.16.1...v0.16.2

0.16.1

New Features

**1. HPU (Habana Gaudi) Support (https://github.com/mosaicml/composer/pull/2444)**

Composer now supports Habana Gaudi chips! To enable HPUs, `device` needs to be specified as `'hpu'`:


composer_model = MyComposerModel(n_layers=3)

trainer = Trainer(
model=composer_model,
device='hpu',
...
)


**2. Generate Callback (https://github.com/mosaicml/composer/pull/2449)**

We've added a new callback which runs generate on a language model at a given frequency to visualize outputs:


from composer.callbacks import Generate

composer_model = MyComposerModel(n_layers=3)
generate_callback = Generate(prompts=['How good is my model?'], interval='5ba')

trainer = Trainer(
model=composer_model,
callbacks = generate_callback,
...
)


Bug Fixes

**1. Checkpoint Fixes**

Elastic sharded checkpointing now disables torchmetric saving to avoid issues with torchmetrics tensors being sharded. Additionally, checkpointing now falls back on the old path which does not convert torchmetrics tensors to `numpy`. Checkpointing also no longer materializes optimizer state when saving weights only.

**2. MLFlow Performance Improvements**

MLFlow integration has significant performance improvements in logging frequency and system metrics collected.


What's Changed
* Hpu support by vivekgoe in https://github.com/mosaicml/composer/pull/2444
* Change `input_ids` to a kwarg in `HuggingFaceModel.generate` by dakinggg in https://github.com/mosaicml/composer/pull/2459
* Add log_table by irenedea in https://github.com/mosaicml/composer/pull/2437
* Enable composer to work with torch nightly builds, torch 2.1.0, and cuda 12.1. by j316chuck in https://github.com/mosaicml/composer/pull/2463
* Materialize only model state_dict in memory for `save_weights_only` by eracah in https://github.com/mosaicml/composer/pull/2450
* Improve performance of MLflow logging by dbczumar in https://github.com/mosaicml/composer/pull/2442
* Fail fast if scheduler warmup and max duration are incompatible by dakinggg in https://github.com/mosaicml/composer/pull/2458
* Add nightly docker image by j316chuck in https://github.com/mosaicml/composer/pull/2452
* Fix local eval by rishab-partha in https://github.com/mosaicml/composer/pull/2465
* Add torch 2.1.0 args for github release-docker workflow by j316chuck in https://github.com/mosaicml/composer/pull/2470
* Log system metrics on each event by prithvikannan in https://github.com/mosaicml/composer/pull/2412
* Fix torch 2.1.0 docker tag by j316chuck in https://github.com/mosaicml/composer/pull/2472
* Upstream Generate Callback by irenedea in https://github.com/mosaicml/composer/pull/2449
* Bump torch nightly docker image by j316chuck in https://github.com/mosaicml/composer/pull/2476
* Test pytorch 2.1.0 docker images on ci/cd by j316chuck in https://github.com/mosaicml/composer/pull/2469
* Fix huggingface tokenizer loading for slow tokenizers by dakinggg in https://github.com/mosaicml/composer/pull/2483
* Deprecate Fused LayerNorm by nik-mosaic in https://github.com/mosaicml/composer/pull/2475
* Transformers upgrade by dakinggg in https://github.com/mosaicml/composer/pull/2489
* Update RTD build config with build.os by bandish-shah in https://github.com/mosaicml/composer/pull/2490
* Upgrade torch docker version and tests by j316chuck in https://github.com/mosaicml/composer/pull/2488
* upgrade node by j316chuck in https://github.com/mosaicml/composer/pull/2492
* Gating tying modules w/ FSDP for torch 2.0 by bcui19 in https://github.com/mosaicml/composer/pull/2467
* Removing min_params by bcui19 in https://github.com/mosaicml/composer/pull/2494
* Fix torchmetrics backwards compatibility issue by eracah in https://github.com/mosaicml/composer/pull/2468
* Adding some fixes to FSDP tests by bcui19 in https://github.com/mosaicml/composer/pull/2495
* Fail count on mosaicml logger by mvpatel2000 in https://github.com/mosaicml/composer/pull/2496
* Remove PR curve metrics from backward compatibility test and skip torch 1.13 by eracah in https://github.com/mosaicml/composer/pull/2497
* filter warning by mvpatel2000 in https://github.com/mosaicml/composer/pull/2500
* Bump version to 0.16.1 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2498
* Skip metrics in state dict by mvpatel2000 in https://github.com/mosaicml/composer/pull/2501
* Add peak memory stats by mvpatel2000 in https://github.com/mosaicml/composer/pull/2504
* Fix sharded ckpt by mvpatel2000 in https://github.com/mosaicml/composer/pull/2505
* Bump gitpython from 3.1.31 to 3.1.34 by dependabot in https://github.com/mosaicml/composer/pull/2509
* Annotate `torch_prof_remote_file_name` as Optional by srstevenson in https://github.com/mosaicml/composer/pull/2512

New Contributors
* vivekgoe made their first contribution in https://github.com/mosaicml/composer/pull/2444
* irenedea made their first contribution in https://github.com/mosaicml/composer/pull/2437
* j316chuck made their first contribution in https://github.com/mosaicml/composer/pull/2463
* dbczumar made their first contribution in https://github.com/mosaicml/composer/pull/2442

**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.16.0...v0.16.1

Page 4 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.