diff --git a/README.md b/README.md index c01b53ab21..1919c78c30 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,10 @@ [![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmengine.svg)](https://github.com/open-mmlab/mmengine/issues) [![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmengine.svg)](https://github.com/open-mmlab/mmengine/issues) +[Introduction](#introduction) +[Installation](#installation) +[Get Started](#get-started) [📘Documentation](https://mmengine.readthedocs.io/en/latest/) | -[🛠️Installation](https://mmengine.readthedocs.io/en/latest/get_started/installation.html) | [🤔Reporting Issues](https://github.com/open-mmlab/mmengine/issues/new/choose) @@ -62,51 +64,36 @@ v0.10.3 was released on 2024-1-24. Highlights: -- Support installing mmengine-lite with no dependency on opencv. Refer to the [Installation](https://mmengine.readthedocs.io/en/latest/get_started/installation.html#install-mmengine) for more details. - -- Support training with [ColossalAI](https://colossalai.org/). Refer to the [Training Large Models](https://mmengine.readthedocs.io/en/latest/common_usage/large_model_training.html#colossalai) for more detailed usages. - -- Support gradient checkpointing. Refer to the [Save Memory on GPU](https://mmengine.readthedocs.io/en/latest/common_usage/save_gpu_memory.html#gradient-checkpointing) for more details. - -- Supports multiple visualization backends, including `NeptuneVisBackend`, `DVCLiveVisBackend` and `AimVisBackend`. Refer to [Visualization Backends](https://mmengine.readthedocs.io/en/latest/common_usage/visualize_training_log.html) for more details. +- Add the support for musa device [#1453](#1453) +- Add the usage of ProfilerHook [#1466](#1466) Read [Changelog](./docs/en/notes/changelog.md#v0103-2412024) for more details. -## Table of Contents - -- [Introduction](#introduction) -- [Installation](#installation) -- [Get Started](#get-started) -- [Learn More](#learn-more) -- [Contributing](#contributing) -- [Citation](#citation) -- [License](#license) -- [Ecosystem](#ecosystem) -- [Projects in OpenMMLab](#projects-in-openmmlab) - ## Introduction -MMEngine is a foundational library for training deep learning models based on PyTorch. It provides a solid engineering foundation and frees developers from writing redundant codes on workflows. It serves as the training engine of all OpenMMLab codebases, which support hundreds of algorithms in various research areas. Moreover, MMEngine is also generic to be applied to non-OpenMMLab projects. +MMEngine is a foundational library for training deep learning models based on PyTorch. It serves as the training engine of all OpenMMLab codebases, which support hundreds of algorithms in various research areas. Moreover, MMEngine is also generic to be applied to non-OpenMMLab projects. Its highlights are as follows: -Major features: +**Integrate mainstream large-scale model training frameworks** -1. **A universal and powerful runner**: +- [ColossalAI](https://mmengine.readthedocs.io/en/latest/common_usage/large_model_training.html#colossalai) +- [DeepSpeed](https://mmengine.readthedocs.io/en/latest/common_usage/large_model_training.html#deepspeed) +- [FSDP](https://mmengine.readthedocs.io/en/latest/common_usage/large_model_training.html#fullyshardeddataparallel-fsdp) - - Supports training different tasks with a small amount of code, e.g., ImageNet can be trained with only 80 lines of code (400 lines of the original PyTorch example). - - Easily compatible with models from popular algorithm libraries such as TIMM, TorchVision, and Detectron2. +**Supports a variety of training strategies** -2. **Open architecture with unified interfaces**: +- [Mixed Precision Training](https://mmengine.readthedocs.io/en/latest/common_usage/speed_up_training.html#mixed-precision-training) +- [Gradient Accumulation](https://mmengine.readthedocs.io/en/latest/common_usage/save_gpu_memory.html#gradient-accumulation) +- [Gradient Checkpointing](https://mmengine.readthedocs.io/en/latest/common_usage/save_gpu_memory.html#gradient-checkpointing) - - Handles different algorithm tasks with unified APIs, e.g., implement a method and apply it to all compatible models. - - Provides a unified abstraction for upper-level algorithm libraries, which supports various back-end devices such as Nvidia CUDA, Mac MPS, AMD, MLU, and more for model training. +**Provides a user-friendly configuration system** -3. **Customizable training process**: +- [Pure Python-style configuration files, easy to navigate](https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#a-pure-python-style-configuration-file-beta) +- [Plain-text-style configuration files, supporting JSON and YAML](https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html) - - Defines the training process just like playing with Legos. - - Provides rich components and strategies. - - Complete controls on the training process with different levels of APIs. +**Covers mainstream training monitoring platforms** -![mmengine_dataflow](https://github.com/open-mmlab/mmengine/assets/58739961/267db9cb-72e4-4af2-a58b-877b30091acc) +- [TensorBoard](https://mmengine.readthedocs.io/en/latest/common_usage/visualize_training_log.html#tensorboard) | [WandB](https://mmengine.readthedocs.io/en/latest/common_usage/visualize_training_log.html#wandb) | [MLflow](https://mmengine.readthedocs.io/en/latest/common_usage/visualize_training_log.html#mlflow-wip) +- [ClearML](https://mmengine.readthedocs.io/en/latest/common_usage/visualize_training_log.html#clearml) | [Neptune](https://mmengine.readthedocs.io/en/latest/common_usage/visualize_training_log.html#neptune) | [DVCLive](https://mmengine.readthedocs.io/en/latest/common_usage/visualize_training_log.html#dvclive) | [Aim](https://mmengine.readthedocs.io/en/latest/common_usage/visualize_training_log.html#aim) ## Installation diff --git a/README_zh-CN.md b/README_zh-CN.md index 3400ca35e5..171d66dac0 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -24,8 +24,10 @@ [![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmengine.svg)](https://github.com/open-mmlab/mmengine/issues) [![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmengine.svg)](https://github.com/open-mmlab/mmengine/issues) -[📘使用文档](https://mmengine.readthedocs.io/zh_CN/latest/) | -[🛠️安装教程](https://mmengine.readthedocs.io/zh_CN/latest/get_started/installation.html) | +[简介](#简介) | +[安装](#安装) | +[快速上手](#快速上手) | +[📘用户文档](https://mmengine.readthedocs.io/zh_CN/latest/) | [🤔报告问题](https://github.com/open-mmlab/mmengine/issues/new/choose) @@ -60,54 +62,43 @@ 最新版本 v0.10.3 在 2024.1.24 发布。 -亮点: +版本亮点: -- 支持安装不依赖于 opencv 的 mmengine-lite 版本。可阅读[安装文档](https://mmengine.readthedocs.io/zh-cn/latest/get_started/installation.html#mmengine)了解用法。 - -- 支持使用 [ColossalAI](https://colossalai.org/) 进行训练。可阅读[大模型训练](https://mmengine.readthedocs.io/zh_CN/latest/common_usage/large_model_training.html#colossalai)了解用法。 - -- 支持梯度检查点。详见[用法](https://mmengine.readthedocs.io/zh_CN/latest/common_usage/save_gpu_memory.html#id3)。 - -- 支持多种可视化后端,包括`NeptuneVisBackend`、`DVCLiveVisBackend` 和 `AimVisBackend`。可阅读[可视化后端](https://mmengine.readthedocs.io/zh_CN/latest/common_usage/visualize_training_log.html)了解用法。 +- 适配摩尔线程 [#1453](#1453) +- 添加 ProfilerHook 使用文档 [#1466](#1466) 如果想了解更多版本更新细节和历史信息,请阅读[更新日志](./docs/en/notes/changelog.md#v0103-2412024)。 -## 目录 +## 简介 -- [简介](#简介) -- [安装](#安装) -- [快速上手](#快速上手) -- [了解更多](#了解更多) -- [贡献指南](#贡献指南) -- [引用](#引用) -- [开源许可证](#开源许可证) -- [生态项目](#生态项目) -- [OpenMMLab 的其他项目](#openmmlab-的其他项目) -- [欢迎加入 OpenMMLab 社区](#欢迎加入-openmmlab-社区) +MMEngine 是一个基于 PyTorch 实现的,用于训练深度学习模型的基础库。它作为 OpenMMLab 所有代码库的训练引擎,其在不同研究领域支持了上百个算法。此外,MMEngine 也可以用于非 OpenMMLab 项目中。它的亮点如下: -## 简介 +**集成主流的大模型训练框架** -MMEngine 是一个基于 PyTorch 实现的,用于训练深度学习模型的基础库。它为开发人员提供了坚实的工程基础,以此避免在工作流上编写冗余代码。作为 OpenMMLab 所有代码库的训练引擎,其在不同研究领域支持了上百个算法。此外,MMEngine 也可以用于非 OpenMMLab 项目中。 +- [ColossalAI](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/large_model_training.html#colossalai) +- [DeepSpeed](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/large_model_training.html#deepspeed) +- [FSDP](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/large_model_training.html#fullyshardeddataparallel-fsdp) -主要特性: +**支持丰富的训练策略** -1. **通用且强大的执行器**: +- [混合精度训练(Mixed Precision Training)](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/speed_up_training.html#id3) +- [梯度累积(Gradient Accumulation)](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/save_gpu_memory.html#id2) +- [梯度检查点(Gradient Checkpointing)](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/save_gpu_memory.html#id3) - - 支持用少量代码训练不同的任务,例如仅使用 80 行代码就可以训练 ImageNet(原始 PyTorch 示例需要 400 行)。 - - 轻松兼容流行的算法库(如 TIMM、TorchVision 和 Detectron2)中的模型。 +**提供易用的配置系统** -2. **接口统一的开放架构**: +- [纯 Python 风格的配置文件,易于跳转](https://mmengine.readthedocs.io/zh-cn/latest/advanced_tutorials/config.html#python-beta) +- [纯文本风格的配置文件,支持 JSON 和 YAML](https://mmengine.readthedocs.io/zh-cn/latest/advanced_tutorials/config.html#id1) - - 使用统一的接口处理不同的算法任务,例如,实现一个方法并应用于所有的兼容性模型。 - - 上下游的对接更加统一便捷,在为上层算法库提供统一抽象的同时,支持多种后端设备。目前 MMEngine 支持 Nvidia CUDA、Mac MPS、AMD、MLU 等设备进行模型训练。 +**覆盖主流的训练监测平台** -3. **可定制的训练流程**: +- [TensorBoard](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/visualize_training_log.html#tensorboard) | [WandB](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/visualize_training_log.html#wandb) | [MLflow](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/visualize_training_log.html#mlflow-wip) +- [ClearML](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/visualize_training_log.html#clearml) | [Neptune](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/visualize_training_log.html#neptune) | [DVCLive](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/visualize_training_log.html#dvclive) | [Aim](https://mmengine.readthedocs.io/zh-cn/latest/common_usage/visualize_training_log.html#aim) - - 定义了“乐高”式的训练流程。 - - 提供了丰富的组件和策略。 - - 使用不同等级的 API 控制训练过程。 +**兼容主流的训练芯片** -![mmengine_dataflow](https://github.com/open-mmlab/mmengine/assets/58739961/267db9cb-72e4-4af2-a58b-877b30091acc) +- 英伟达 CUDA | 苹果 MPS +- 华为 Ascend | 寒武纪 MLU | 摩尔线程 MUSA ## 安装 diff --git a/docs/en/get_started/introduction.md b/docs/en/get_started/introduction.md index 3c70e28e4d..f15073ed14 100644 --- a/docs/en/get_started/introduction.md +++ b/docs/en/get_started/introduction.md @@ -1,30 +1,29 @@ # Introduction MMEngine is a foundational library for training deep learning models based on -PyTorch. It supports running on Linux, Windows, and macOS. It has the -following three features: +PyTorch. It supports running on Linux, Windows, and macOS. Its highlights are as follows: -1. **Universal and powerful executor**: +**Integrate mainstream large-scale model training frameworks** - - Supports training different tasks with minimal code, such as training - ImageNet with just 80 lines of code (original PyTorch examples require - 400 lines). - - Easily compatible with models from popular algorithm libraries like TIMM, - TorchVision, and Detectron2. +- [ColossalAI](../common_usage/large_model_training.md#colossalai) +- [DeepSpeed](../common_usage/large_model_training.md#deepspeed) +- [FSDP](../common_usage/large_model_training.md#fullyshardeddataparallel-fsdp) -2. **Open architecture with unified interfaces**: +**Supports a variety of training strategies** - - Handles different tasks with a unified API: you can implement a method - once and apply it to all compatible models. - - Supports various backend devices through a simple, high-level - abstraction. Currently, MMEngine supports model training on Nvidia CUDA, - Mac MPS, AMD, MLU, and other devices. +- [Mixed Precision Training](../common_usage/speed_up_training.md#mixed-precision-training) +- [Gradient Accumulation](../common_usage/save_gpu_memory.md#gradient-accumulation) +- [Gradient Checkpointing](../common_usage/save_gpu_memory.md#gradient-checkpointing) -3. **Customizable training process**: +**Provides a user-friendly configuration system** - - Defines a highly modular training engine with "Lego"-like composability. - - Offers a rich set of components and strategies. - - Total control over the training process with different levels of APIs. +- [Pure Python-style configuration files, easy to navigate](../advanced_tutorials/config.md#a-pure-python-style-configuration-file-beta) +- [Plain-text-style configuration files, supporting JSON and YAML](../advanced_tutorials/config.html) + +**Covers mainstream training monitoring platforms** + +- [TensorBoard](../common_usage/visualize_training_log.md#tensorboard) | [WandB](../common_usage/visualize_training_log.md#wandb) | [MLflow](../common_usage/visualize_training_log.md#mlflow-wip) +- [ClearML](../common_usage/visualize_training_log.md#clearml) | [Neptune](../common_usage/visualize_training_log.md#neptune) | [DVCLive](../common_usage/visualize_training_log.md#dvclive) | [Aim](../common_usage/visualize_training_log.md#aim) ## Architecture diff --git a/docs/zh_cn/get_started/introduction.md b/docs/zh_cn/get_started/introduction.md index e39581515c..34fd28630a 100644 --- a/docs/zh_cn/get_started/introduction.md +++ b/docs/zh_cn/get_started/introduction.md @@ -1,22 +1,33 @@ # 介绍 -MMEngine 是一个基于 PyTorch 实现的,用于训练深度学习模型的基础库,支持在 Linux、Windows、macOS 上运行。它具有如下三个特性: +MMEngine 是一个基于 PyTorch 实现的,用于训练深度学习模型的基础库,支持在 Linux、Windows、macOS 上运行。它的亮点如下: -1. **通用且强大的执行器**: +**集成主流的大模型训练框架** - - 支持用少量代码训练不同的任务,例如仅使用 80 行代码就可以训练 ImageNet(原始 PyTorch 示例需要 400 行)。 - - 轻松兼容流行的算法库(如 TIMM、TorchVision 和 Detectron2)中的模型。 +- [ColossalAI](../common_usage/large_model_training.md#colossalai) +- [DeepSpeed](../common_usage/large_model_training.md#deepspeed) +- [FSDP](../common_usage/large_model_training.md#fullyshardeddataparallel-fsdp) -2. **接口统一的开放架构**: +**支持丰富的训练策略** - - 使用统一的接口处理不同的算法任务,例如,实现一个方法并应用于所有的兼容性模型。 - - 上下游的对接更加统一便捷,在为上层算法库提供统一抽象的同时,支持多种后端设备。目前 MMEngine 支持 Nvidia CUDA、Mac MPS、AMD、MLU 等设备进行模型训练。 +- [混合精度训练(Mixed Precision Training)](../common_usage/speed_up_training.md#混合精度训练) +- [梯度累积(Gradient Accumulation)](../common_usage/save_gpu_memory.md#梯度累加) +- [梯度检查点(Gradient Checkpointing)](../common_usage/save_gpu_memory.md#梯度检查点) -3. **可定制的训练流程**: +**提供易用的配置系统** - - 定义了“乐高”式的训练流程。 - - 提供了丰富的组件和策略。 - - 使用不同等级的 API 控制训练过程。 +- [纯 Python 风格的配置文件,易于跳转](../advanced_tutorials/config.md#纯-python-风格的配置文件beta) +- [纯文本风格的配置文件,支持 JSON 和 YAML](../advanced_tutorials/config.md) + +**覆盖主流的训练监测平台** + +- [TensorBoard](../common_usage/visualize_training_log.md#tensorboard) | [WandB](../common_usage/visualize_training_log.md#wandb) | [MLflow](../common_usage/visualize_training_log.md#mlflow-wip) +- [ClearML](../common_usage/visualize_training_log.md#clearml) | [Neptune](../common_usage/visualize_training_log.md#neptune) | [DVCLive](../common_usage/visualize_training_log.md#dvclive) | [Aim](../common_usage/visualize_training_log.md#aim) + +**兼容主流的训练芯片** + +- 英伟达 CUDA | 苹果 MPS +- 华为 Ascend | 寒武纪 MLU | 摩尔线程 MUSA ## 架构 diff --git a/requirements/docs.txt b/requirements/docs.txt index a0d0e05000..ebde0ef9d3 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,8 +1,8 @@ -docutils==0.17.1 +docutils==0.18.1 myst-parser opencv-python -e git+https://github.com/open-mmlab/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme -sphinx==4.5.0 +sphinx==6.2.1 sphinx-copybutton sphinx-tabs sphinx_markdown_tables