[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-open-mmlab--mmengine":3,"tool-open-mmlab--mmengine":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",146793,2,"2026-04-08T23:32:35",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108111,"2026-04-08T11:23:26",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":73,"owner_website":77,"owner_url":78,"languages":79,"stars":88,"forks":89,"last_commit_at":90,"license":91,"difficulty_score":32,"env_os":92,"env_gpu":93,"env_ram":92,"env_deps":94,"category_tags":100,"github_topics":101,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":108,"updated_at":109,"faqs":110,"releases":140},5788,"open-mmlab\u002Fmmengine","mmengine","OpenMMLab Foundational Library for Training Deep Learning Models","MMEngine 是 OpenMMLab 推出的基于 PyTorch 的深度学习模型训练基础库。它作为 OpenMMLab 全家桶的核心训练引擎，不仅支撑了涵盖计算机视觉等多个领域的数百种算法，也具备通用性，可广泛应用于非 OpenMMLab 的深度学习项目中。\n\n在深度学习研发中，开发者常需重复编写数据加载、模型训练循环、日志记录及分布式训练等底层代码，既耗时又易出错。MMEngine 通过高度模块化设计，将这些通用流程封装为简洁易用的接口，让研究人员和算法工程师能专注于核心模型结构的创新与实验，大幅降低开发门槛并提升迭代效率。\n\n这款工具特别适合从事深度学习算法研究的科研人员、需要快速验证新想法的开发者，以及希望构建标准化训练流程的工程团队。其技术亮点包括灵活的配置系统、强大的执行器（Runner）机制以统一管理训练流程，以及对多种可视化后端和分布式训练策略的原生支持。无论是初学者还是资深专家，都能利用 MMEngine 更高效地搭建稳健的深度学习训练管道。","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_e598cf7dc769.jpg\" width=\"600\"\u002F>\n  \u003Cdiv>&nbsp;\u003C\u002Fdiv>\n  \u003Cdiv align=\"center\">\n    \u003Cb>\u003Cfont size=\"5\">OpenMMLab website\u003C\u002Ffont>\u003C\u002Fb>\n    \u003Csup>\n      \u003Ca href=\"https:\u002F\u002Fopenmmlab.com\">\n        \u003Ci>\u003Cfont size=\"4\">HOT\u003C\u002Ffont>\u003C\u002Fi>\n      \u003C\u002Fa>\n    \u003C\u002Fsup>\n    &nbsp;&nbsp;&nbsp;&nbsp;\n    \u003Cb>\u003Cfont size=\"5\">OpenMMLab platform\u003C\u002Ffont>\u003C\u002Fb>\n    \u003Csup>\n      \u003Ca href=\"https:\u002F\u002Fplatform.openmmlab.com\">\n        \u003Ci>\u003Cfont size=\"4\">TRY IT OUT\u003C\u002Ffont>\u003C\u002Fi>\n      \u003C\u002Fa>\n    \u003C\u002Fsup>\n  \u003C\u002Fdiv>\n  \u003Cdiv>&nbsp;\u003C\u002Fdiv>\n\n[![PyPI - Python Version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fmmengine)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fmmengine\u002F)\n[![pytorch](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpytorch-1.6~2.1-yellow)](#installation)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fmmengine)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fmmengine)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fopen-mmlab\u002Fmmengine.svg)](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fblob\u002Fmain\u002FLICENSE)\n\n[Introduction](#introduction) |\n[Installation](#installation) |\n[Get Started](#get-started) |\n[📘Documentation](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002F) |\n[🤔Reporting Issues](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fissues\u002Fnew\u002Fchoose)\n\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n\nEnglish | [简体中文](README_zh-CN.md)\n\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fopenmmlab.medium.com\u002F\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_062337b0e5ec.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F25839884\u002F218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png\" width=\"3%\" alt=\"\" \u002F>\n  \u003Ca href=\"https:\u002F\u002Fdiscord.com\u002Fchannels\u002F1037617289144569886\u002F1073056342287323168\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_6342e5371027.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F25839884\u002F218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png\" width=\"3%\" alt=\"\" \u002F>\n  \u003Ca href=\"https:\u002F\u002Ftwitter.com\u002FOpenMMLab\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_04c3beda0b07.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F25839884\u002F218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png\" width=\"3%\" alt=\"\" \u002F>\n  \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fopenmmlab\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_204fe79b5a90.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F25839884\u002F218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png\" width=\"3%\" alt=\"\" \u002F>\n  \u003Ca href=\"https:\u002F\u002Fspace.bilibili.com\u002F1293512903\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_8655b6233577.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F25839884\u002F218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png\" width=\"3%\" alt=\"\" \u002F>\n  \u003Ca href=\"https:\u002F\u002Fwww.zhihu.com\u002Fpeople\u002Fopenmmlab\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_447c4737c11f.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## What's New\n\nv0.10.6 was released on 2025-01-13.\n\nHighlights:\n\n- Support custom `artifact_location` in MLflowVisBackend [#1505](#1505)\n- Enable `exclude_frozen_parameters` for `DeepSpeedEngine._zero3_consolidated_16bit_state_dict` [#1517](#1517)\n\nRead [Changelog](.\u002Fdocs\u002Fen\u002Fnotes\u002Fchangelog.md#v0104-2342024) for more details.\n\n## Introduction\n\nMMEngine 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:\n\n**Integrate mainstream large-scale model training frameworks**\n\n- [ColossalAI](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Flarge_model_training.html#colossalai)\n- [DeepSpeed](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Flarge_model_training.html#deepspeed)\n- [FSDP](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Flarge_model_training.html#fullyshardeddataparallel-fsdp)\n\n**Supports a variety of training strategies**\n\n- [Mixed Precision Training](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fspeed_up_training.html#mixed-precision-training)\n- [Gradient Accumulation](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fsave_gpu_memory.html#gradient-accumulation)\n- [Gradient Checkpointing](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fsave_gpu_memory.html#gradient-checkpointing)\n\n**Provides a user-friendly configuration system**\n\n- [Pure Python-style configuration files, easy to navigate](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fconfig.html#a-pure-python-style-configuration-file-beta)\n- [Plain-text-style configuration files, supporting JSON and YAML](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fconfig.html)\n\n**Covers mainstream training monitoring platforms**\n\n- [TensorBoard](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#tensorboard) | [WandB](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#wandb) | [MLflow](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#mlflow-wip)\n- [ClearML](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#clearml) | [Neptune](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#neptune) | [DVCLive](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#dvclive) | [Aim](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#aim)\n\n## Installation\n\n\u003Cdetails>\n\u003Csummary>Supported PyTorch Versions\u003C\u002Fsummary>\n\n| MMEngine           | PyTorch      | Python         |\n| ------------------ | ------------ | -------------- |\n| main               | >=1.6 \\\u003C=2.1 | >=3.8, \\\u003C=3.11 |\n| >=0.9.0, \\\u003C=0.10.4 | >=1.6 \\\u003C=2.1 | >=3.8, \\\u003C=3.11 |\n\n\u003C\u002Fdetails>\n\nBefore installing MMEngine, please ensure that PyTorch has been successfully installed following the [official guide](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F).\n\nInstall MMEngine\n\n```bash\npip install -U openmim\nmim install mmengine\n```\n\nVerify the installation\n\n```bash\npython -c 'from mmengine.utils.dl_utils import collect_env;print(collect_env())'\n```\n\n## Get Started\n\nTaking the training of a ResNet-50 model on the CIFAR-10 dataset as an example, we will use MMEngine to build a complete, configurable training and validation process in less than 80 lines of code.\n\n\u003Cdetails>\n\u003Csummary>Build Models\u003C\u002Fsummary>\n\nFirst, we need to define a **model** which 1) inherits from `BaseModel` and 2) accepts an additional argument `mode` in the `forward` method, in addition to those arguments related to the dataset.\n\n- During training, the value of `mode` is \"loss\", and the `forward` method should return a `dict` containing the key \"loss\".\n- During validation, the value of `mode` is \"predict\", and the forward method should return results containing both predictions and labels.\n\n```python\nimport torch.nn.functional as F\nimport torchvision\nfrom mmengine.model import BaseModel\n\nclass MMResNet50(BaseModel):\n    def __init__(self):\n        super().__init__()\n        self.resnet = torchvision.models.resnet50()\n\n    def forward(self, imgs, labels, mode):\n        x = self.resnet(imgs)\n        if mode == 'loss':\n            return {'loss': F.cross_entropy(x, labels)}\n        elif mode == 'predict':\n            return x, labels\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Build Datasets\u003C\u002Fsummary>\n\nNext, we need to create **Dataset**s and **DataLoader**s for training and validation.\nIn this case, we simply use built-in datasets supported in TorchVision.\n\n```python\nimport torchvision.transforms as transforms\nfrom torch.utils.data import DataLoader\n\nnorm_cfg = dict(mean=[0.491, 0.482, 0.447], std=[0.202, 0.199, 0.201])\ntrain_dataloader = DataLoader(batch_size=32,\n                              shuffle=True,\n                              dataset=torchvision.datasets.CIFAR10(\n                                  'data\u002Fcifar10',\n                                  train=True,\n                                  download=True,\n                                  transform=transforms.Compose([\n                                      transforms.RandomCrop(32, padding=4),\n                                      transforms.RandomHorizontalFlip(),\n                                      transforms.ToTensor(),\n                                      transforms.Normalize(**norm_cfg)\n                                  ])))\nval_dataloader = DataLoader(batch_size=32,\n                            shuffle=False,\n                            dataset=torchvision.datasets.CIFAR10(\n                                'data\u002Fcifar10',\n                                train=False,\n                                download=True,\n                                transform=transforms.Compose([\n                                    transforms.ToTensor(),\n                                    transforms.Normalize(**norm_cfg)\n                                ])))\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Build Metrics\u003C\u002Fsummary>\n\nTo validate and test the model, we need to define a **Metric** called accuracy to evaluate the model. This metric needs to inherit from `BaseMetric` and implements the `process` and `compute_metrics` methods.\n\n```python\nfrom mmengine.evaluator import BaseMetric\n\nclass Accuracy(BaseMetric):\n    def process(self, data_batch, data_samples):\n        score, gt = data_samples\n        # Save the results of a batch to `self.results`\n        self.results.append({\n            'batch_size': len(gt),\n            'correct': (score.argmax(dim=1) == gt).sum().cpu(),\n        })\n    def compute_metrics(self, results):\n        total_correct = sum(item['correct'] for item in results)\n        total_size = sum(item['batch_size'] for item in results)\n        # Returns a dictionary with the results of the evaluated metrics,\n        # where the key is the name of the metric\n        return dict(accuracy=100 * total_correct \u002F total_size)\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Build a Runner\u003C\u002Fsummary>\n\nFinally, we can construct a **Runner** with previously defined `Model`, `DataLoader`, and `Metrics`, with some other configs, as shown below.\n\n```python\nfrom torch.optim import SGD\nfrom mmengine.runner import Runner\n\nrunner = Runner(\n    model=MMResNet50(),\n    work_dir='.\u002Fwork_dir',\n    train_dataloader=train_dataloader,\n    # a wrapper to execute back propagation and gradient update, etc.\n    optim_wrapper=dict(optimizer=dict(type=SGD, lr=0.001, momentum=0.9)),\n    # set some training configs like epochs\n    train_cfg=dict(by_epoch=True, max_epochs=5, val_interval=1),\n    val_dataloader=val_dataloader,\n    val_cfg=dict(),\n    val_evaluator=dict(type=Accuracy),\n)\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Launch Training\u003C\u002Fsummary>\n\n```python\nrunner.train()\n```\n\n\u003C\u002Fdetails>\n\n## Learn More\n\n\u003Cdetails>\n\u003Csummary>Tutorials\u003C\u002Fsummary>\n\n- [Runner](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Frunner.html)\n- [Dataset and DataLoader](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fdataset.html)\n- [Model](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fmodel.html)\n- [Evaluation](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fevaluation.html)\n- [OptimWrapper](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Foptim_wrapper.html)\n- [Parameter Scheduler](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fparam_scheduler.html)\n- [Hook](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fhook.html)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Advanced tutorials\u003C\u002Fsummary>\n\n- [Registry](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fregistry.html)\n- [Config](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fconfig.html)\n- [BaseDataset](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fbasedataset.html)\n- [Data Transform](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fdata_transform.html)\n- [Weight Initialization](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Finitialize.html)\n- [Visualization](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fvisualization.html)\n- [Abstract Data Element](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fdata_element.html)\n- [Distribution Communication](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fdistributed.html)\n- [Logging](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Flogging.html)\n- [File IO](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Ffileio.html)\n- [Global manager (ManagerMixin)](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fmanager_mixin.html)\n- [Use modules from other libraries](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fcross_library.html)\n- [Test Time Agumentation](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Ftest_time_augmentation.html)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Examples\u003C\u002Fsummary>\n\n- [Train a GAN](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fexamples\u002Ftrain_a_gan.html)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Common Usage\u003C\u002Fsummary>\n\n- [Resume Training](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fresume_training.html)\n- [Speed up Training](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fspeed_up_training.html)\n- [Save Memory on GPU](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fsave_gpu_memory.html)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Design\u003C\u002Fsummary>\n\n- [Hook](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Fhook.html)\n- [Runner](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Frunner.html)\n- [Evaluation](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Fevaluation.html)\n- [Visualization](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Fvisualization.html)\n- [Logging](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Flogging.html)\n- [Infer](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Finfer.html)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Migration guide\u003C\u002Fsummary>\n\n- [Migrate Runner from MMCV to MMEngine](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fmigration\u002Frunner.html)\n- [Migrate Hook from MMCV to MMEngine](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fmigration\u002Fhook.html)\n- [Migrate Model from MMCV to MMEngine](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fmigration\u002Fmodel.html)\n- [Migrate Parameter Scheduler from MMCV to MMEngine](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fmigration\u002Fparam_scheduler.html)\n- [Migrate Data Transform to OpenMMLab 2.0](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fmigration\u002Ftransform.html)\n\n\u003C\u002Fdetails>\n\n## Contributing\n\nWe appreciate all contributions to improve MMEngine. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for the contributing guideline.\n\n## Citation\n\nIf you find this project useful in your research, please consider cite:\n\n```\n@article{mmengine2022,\n  title   = {{MMEngine}: OpenMMLab Foundational Library for Training Deep Learning Models},\n  author  = {MMEngine Contributors},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine}},\n  year={2022}\n}\n```\n\n## License\n\nThis project is released under the [Apache 2.0 license](LICENSE).\n\n## Ecosystem\n\n- [APES: Attention-based Point Cloud Edge Sampling](https:\u002F\u002Fgithub.com\u002FJunweiZheng93\u002FAPES)\n- [DiffEngine: diffusers training toolbox with mmengine](https:\u002F\u002Fgithub.com\u002Fokotaku\u002Fdiffengine)\n\n## Projects in OpenMMLab\n\n- [MIM](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmim): MIM installs OpenMMLab packages.\n- [MMCV](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmcv): OpenMMLab foundational library for computer vision.\n- [MMEval](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmeval): A unified evaluation library for multiple machine learning libraries.\n- [MMPreTrain](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmpretrain): OpenMMLab pre-training toolbox and benchmark.\n- [MMagic](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmagic): Open**MM**Lab **A**dvanced, **G**enerative and **I**ntelligent **C**reation toolbox.\n- [MMDetection](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmdetection): OpenMMLab detection toolbox and benchmark.\n- [MMYOLO](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmyolo): OpenMMLab YOLO series toolbox and benchmark.\n- [MMDetection3D](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmdetection3d): OpenMMLab's next-generation platform for general 3D object detection.\n- [MMRotate](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmrotate): OpenMMLab rotated object detection toolbox and benchmark.\n- [MMTracking](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmtracking): OpenMMLab video perception toolbox and benchmark.\n- [MMPose](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmpose): OpenMMLab pose estimation toolbox and benchmark.\n- [MMSegmentation](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmsegmentation): OpenMMLab semantic segmentation toolbox and benchmark.\n- [MMOCR](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmocr): OpenMMLab text detection, recognition, and understanding toolbox.\n- [MMHuman3D](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmhuman3d): OpenMMLab 3D human parametric model toolbox and benchmark.\n- [MMSelfSup](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmselfsup): OpenMMLab self-supervised learning toolbox and benchmark.\n- [MMFewShot](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmfewshot): OpenMMLab fewshot learning toolbox and benchmark.\n- [MMAction2](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmaction2): OpenMMLab's next-generation action understanding toolbox and benchmark.\n- [MMFlow](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmflow): OpenMMLab optical flow toolbox and benchmark.\n- [MMDeploy](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmdeploy): OpenMMLab model deployment framework.\n- [MMRazor](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmrazor): OpenMMLab model compression toolbox and benchmark.\n- [Playground](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fplayground): A central hub for gathering and showcasing amazing projects built upon OpenMMLab.\n","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_e598cf7dc769.jpg\" width=\"600\"\u002F>\n  \u003Cdiv>&nbsp;\u003C\u002Fdiv>\n  \u003Cdiv align=\"center\">\n    \u003Cb>\u003Cfont size=\"5\">OpenMMLab 官网\u003C\u002Ffont>\u003C\u002Fb>\n    \u003Csup>\n      \u003Ca href=\"https:\u002F\u002Fopenmmlab.com\">\n        \u003Ci>\u003Cfont size=\"4\">热门\u003C\u002Ffont>\u003C\u002Fi>\n      \u003C\u002Fa>\n    \u003C\u002Fsup>\n    &nbsp;&nbsp;&nbsp;&nbsp;\n    \u003Cb>\u003Cfont size=\"5\">OpenMMLab 平台\u003C\u002Ffont>\u003C\u002Fb>\n    \u003Csup>\n      \u003Ca href=\"https:\u002F\u002Fplatform.openmmlab.com\">\n        \u003Ci>\u003Cfont size=\"4\">立即体验\u003C\u002Ffont>\u003C\u002Fi>\n      \u003C\u002Fa>\n    \u003C\u002Fsup>\n  \u003C\u002Fdiv>\n  \u003Cdiv>&nbsp;\u003C\u002Fdiv>\n\n[![PyPI - Python 版本](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fmmengine)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fmmengine\u002F)\n[![pytorch](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpytorch-1.6~2.1-yellow)](#installation)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fmmengine)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fmmengine)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fopen-mmlab\u002Fmmengine.svg)](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fblob\u002Fmain\u002FLICENSE)\n\n[简介](#introduction) |\n[安装](#installation) |\n[快速入门](#get-started) |\n[📘文档](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002F) |\n[🤔提交问题](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fissues\u002Fnew\u002Fchoose)\n\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n\nEnglish | [简体中文](README_zh-CN.md)\n\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fopenmmlab.medium.com\u002F\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_062337b0e5ec.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F25839884\u002F218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png\" width=\"3%\" alt=\"\" \u002F>\n  \u003Ca href=\"https:\u002F\u002Fdiscord.com\u002Fchannels\u002F1037617289144569886\u002F1073056342287323168\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_6342e5371027.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F25839884\u002F218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png\" width=\"3%\" alt=\"\" \u002F>\n  \u003Ca href=\"https:\u002F\u002Ftwitter.com\u002FOpenMMLab\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_04c3beda0b07.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F25839884\u002F218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png\" width=\"3%\" alt=\"\" \u002F>\n  \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fopenmmlab\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_204fe79b5a90.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F25839884\u002F218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png\" width=\"3%\" alt=\"\" \u002F>\n  \u003Ca href=\"https:\u002F\u002Fspace.bilibili.com\u002F1293512903\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_8655b6233577.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F25839884\u002F218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png\" width=\"3%\" alt=\"\" \u002F>\n  \u003Ca href=\"https:\u002F\u002Fwww.zhihu.com\u002Fpeople\u002Fopenmmlab\" style=\"text-decoration:none;\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_readme_447c4737c11f.png\" width=\"3%\" alt=\"\" \u002F>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## 最新动态\n\nv0.10.6 于 2025年1月13日发布。\n\n亮点：\n\n- 支持在 MLflowVisBackend 中自定义 `artifact_location` [#1505](#1505)\n- 为 `DeepSpeedEngine._zero3_consolidated_16bit_state_dict` 启用 `exclude_frozen_parameters` [#1517](#1517)\n\n更多详情请参阅 [Changelog](.\u002Fdocs\u002Fen\u002Fnotes\u002Fchangelog.md#v0104-2342024)。\n\n## 简介\n\nMMEngine 是一个基于 PyTorch 的深度学习模型训练基础库。它是所有 OpenMMLab 代码库的训练引擎，支持多个研究领域的数百种算法。此外，MMEngine 也可广泛应用于非 OpenMMLab 项目。其主要特点如下：\n\n**集成主流大规模模型训练框架**\n\n- [ColossalAI](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Flarge_model_training.html#colossalai)\n- [DeepSpeed](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Flarge_model_training.html#deepspeed)\n- [FSDP](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Flarge_model_training.html#fullyshardeddataparallel-fsdp)\n\n**支持多种训练策略**\n\n- [混合精度训练](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fspeed_up_training.html#mixed-precision-training)\n- [梯度累积](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fsave_gpu_memory.html#gradient-accumulation)\n- [梯度检查点](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fsave_gpu_memory.html#gradient-checkpointing)\n\n**提供用户友好的配置系统**\n\n- [纯 Python 风格的配置文件，易于理解](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fconfig.html#a-pure-python-style-configuration-file-beta)\n- [纯文本风格的配置文件，支持 JSON 和 YAML](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fconfig.html)\n\n**覆盖主流训练监控平台**\n\n- [TensorBoard](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#tensorboard) | [WandB](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#wandb) | [MLflow](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#mlflow-wip)\n- [ClearML](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#clearml) | [Neptune](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#neptune) | [DVCLive](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#dvclive) | [Aim](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html#aim)\n\n## 安装\n\n\u003Cdetails>\n\u003Csummary>支持的 PyTorch 版本\u003C\u002Fsummary>\n\n| MMEngine           | PyTorch      | Python         |\n| ------------------ | ------------ | -------------- |\n| main               | >=1.6 \\\u003C=2.1 | >=3.8, \\\u003C=3.11 |\n| >=0.9.0, \\\u003C=0.10.4 | >=1.6 \\\u003C=2.1 | >=3.8, \\\u003C=3.11 |\n\n\u003C\u002Fdetails>\n\n在安装 MMEngine 之前，请确保已按照 [官方指南](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F) 成功安装 PyTorch。\n\n安装 MMEngine\n\n```bash\npip install -U openmim\nmim install mmengine\n```\n\n验证安装\n\n```bash\npython -c 'from mmengine.utils.dl_utils import collect_env;print(collect_env())'\n```\n\n## 开始使用\n\n以在 CIFAR-10 数据集上训练 ResNet-50 模型为例，我们将使用 MMEngine 在不到 80 行代码中构建一个完整且可配置的训练和验证流程。\n\n\u003Cdetails>\n\u003Csummary>构建模型\u003C\u002Fsummary>\n\n首先，我们需要定义一个 **模型**，它需要：1) 继承自 `BaseModel`；2) 在 `forward` 方法中除了接收与数据集相关的参数外，还需接受一个额外的参数 `mode`。\n\n- 在训练阶段，`mode` 的值为 `\"loss\"`，此时 `forward` 方法应返回一个包含键 `\"loss\"` 的字典。\n- 在验证阶段，`mode` 的值为 `\"predict\"`，此时 `forward` 方法应返回同时包含预测结果和标签的结果。\n\n```python\nimport torch.nn.functional as F\nimport torchvision\nfrom mmengine.model import BaseModel\n\nclass MMResNet50(BaseModel):\n    def __init__(self):\n        super().__init__()\n        self.resnet = torchvision.models.resnet50()\n\n    def forward(self, imgs, labels, mode):\n        x = self.resnet(imgs)\n        if mode == 'loss':\n            return {'loss': F.cross_entropy(x, labels)}\n        elif mode == 'predict':\n            return x, labels\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>构建数据集\u003C\u002Fsummary>\n\n接下来，我们需要为训练和验证创建 **Dataset** 和 **DataLoader**。在本例中，我们直接使用 TorchVision 中支持的内置数据集。\n\n```python\nimport torchvision.transforms as transforms\nfrom torch.utils.data import DataLoader\n\nnorm_cfg = dict(mean=[0.491, 0.482, 0.447], std=[0.202, 0.199, 0.201])\ntrain_dataloader = DataLoader(batch_size=32,\n                              shuffle=True,\n                              dataset=torchvision.datasets.CIFAR10(\n                                  'data\u002Fcifar10',\n                                  train=True,\n                                  download=True,\n                                  transform=transforms.Compose([\n                                      transforms.RandomCrop(32, padding=4),\n                                      transforms.RandomHorizontalFlip(),\n                                      transforms.ToTensor(),\n                                      transforms.Normalize(**norm_cfg)\n                                  ])))\nval_dataloader = DataLoader(batch_size=32,\n                            shuffle=False,\n                            dataset=torchvision.datasets.CIFAR10(\n                                'data\u002Fcifar10',\n                                train=False,\n                                download=True,\n                                transform=transforms.Compose([\n                                    transforms.ToTensor(),\n                                    transforms.Normalize(**norm_cfg)\n                                ])))\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>构建评估指标\u003C\u002Fsummary>\n\n为了对模型进行验证和测试，我们需要定义一个名为准确率的 **Metric** 来评估模型性能。该指标需要继承自 `BaseMetric`，并实现 `process` 和 `compute_metrics` 方法。\n\n```python\nfrom mmengine.evaluator import BaseMetric\n\nclass Accuracy(BaseMetric):\n    def process(self, data_batch, data_samples):\n        score, gt = data_samples\n        # 将一个批次的结果保存到 `self.results`\n        self.results.append({\n            'batch_size': len(gt),\n            'correct': (score.argmax(dim=1) == gt).sum().cpu(),\n        })\n    def compute_metrics(self, results):\n        total_correct = sum(item['correct'] for item in results)\n        total_size = sum(item['batch_size'] for item in results)\n        # 返回一个包含评估指标结果的字典，键为指标名称\n        return dict(accuracy=100 * total_correct \u002F total_size)\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>构建 Runner\u003C\u002Fsummary>\n\n最后，我们可以使用之前定义的 `Model`、`DataLoader` 和 `Metrics`，结合其他配置，构建一个 **Runner**，如下所示。\n\n```python\nfrom torch.optim import SGD\nfrom mmengine.runner import Runner\n\nrunner = Runner(\n    model=MMResNet50(),\n    work_dir='.\u002Fwork_dir',\n    train_dataloader=train_dataloader,\n    # 用于执行反向传播和梯度更新等操作的包装器\n    optim_wrapper=dict(optimizer=dict(type=SGD, lr=0.001, momentum=0.9)),\n    # 设置一些训练配置，例如训练轮数\n    train_cfg=dict(by_epoch=True, max_epochs=5, val_interval=1),\n    val_dataloader=val_dataloader,\n    val_cfg=dict(),\n    val_evaluator=dict(type=Accuracy),\n)\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>启动训练\u003C\u002Fsummary>\n\n```python\nrunner.train()\n```\n\n\u003C\u002Fdetails>\n\n## 了解更多\n\n\u003Cdetails>\n\u003Csummary>教程\u003C\u002Fsummary>\n\n- [Runner](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Frunner.html)\n- [数据集与DataLoader](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fdataset.html)\n- [模型](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fmodel.html)\n- [评估](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fevaluation.html)\n- [OptimWrapper](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Foptim_wrapper.html)\n- [参数调度器](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fparam_scheduler.html)\n- [Hook](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fhook.html)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>高级教程\u003C\u002Fsummary>\n\n- [Registry](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fregistry.html)\n- [配置](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fconfig.html)\n- [BaseDataset](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fbasedataset.html)\n- [数据变换](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fdata_transform.html)\n- [权重初始化](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Finitialize.html)\n- [可视化](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fvisualization.html)\n- [抽象数据元素](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fdata_element.html)\n- [分布式通信](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fdistributed.html)\n- [日志记录](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Flogging.html)\n- [文件IO](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Ffileio.html)\n- [全局管理器（ManagerMixin）](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fmanager_mixin.html)\n- [使用其他库的模块](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fcross_library.html)\n- [测试时增强](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Ftest_time_augmentation.html)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>示例\u003C\u002Fsummary>\n\n- [训练一个GAN](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fexamples\u002Ftrain_a_gan.html)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>常见用法\u003C\u002Fsummary>\n\n- [恢复训练](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fresume_training.html)\n- [加速训练](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fspeed_up_training.html)\n- [节省GPU显存](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fsave_gpu_memory.html)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>设计\u003C\u002Fsummary>\n\n- [Hook](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Fhook.html)\n- [Runner](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Frunner.html)\n- [评估](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Fevaluation.html)\n- [可视化](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Fvisualization.html)\n- [日志记录](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Flogging.html)\n- [推理](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fdesign\u002Finfer.html)\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>迁移指南\u003C\u002Fsummary>\n\n- [将MMCV中的Runner迁移到MMEngine](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fmigration\u002Frunner.html)\n- [将MMCV中的Hook迁移到MMEngine](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fmigration\u002Fhook.html)\n- [将MMCV中的模型迁移到MMEngine](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fmigration\u002Fmodel.html)\n- [将MMCV中的参数调度器迁移到MMEngine](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fmigration\u002Fparam_scheduler.html)\n- [将数据变换迁移到OpenMMLab 2.0](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fmigration\u002Ftransform.html)\n\n\u003C\u002Fdetails>\n\n## 贡献\n\n我们非常感谢所有对MMEngine改进的贡献。请参阅[CONTRIBUTING.md](CONTRIBUTING.md)以获取贡献指南。\n\n## 引用\n\n如果您在研究中发现本项目有用，请考虑引用：\n\n```\n@article{mmengine2022,\n  title   = {{MMEngine}: OpenMMLab用于训练深度学习模型的基础库},\n  author  = {MMEngine贡献者},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine}},\n  year={2022}\n}\n```\n\n## 许可证\n\n本项目采用[Apache 2.0许可证](LICENSE)发布。\n\n## 生态系统\n\n- [APES: 基于注意力的点云边缘采样](https:\u002F\u002Fgithub.com\u002FJunweiZheng93\u002FAPES)\n- [DiffEngine: 使用mmengine的diffusers训练工具箱](https:\u002F\u002Fgithub.com\u002Fokotaku\u002Fdiffengine)\n\n## OpenMMLab中的项目\n\n- [MIM](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmim): MIM用于安装OpenMMLab的相关软件包。\n- [MMCV](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmcv): OpenMMLab计算机视觉领域的基础库。\n- [MMEval](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmeval): 一个用于多种机器学习框架的统一评估库。\n- [MMPreTrain](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmpretrain): OpenMMLab预训练工具箱及基准测试平台。\n- [MMagic](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmagic): Open**MM**Lab **A**dvanced, **G**enerative和**I**ntelligent **C**reation工具箱。\n- [MMDetection](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmdetection): OpenMMLab目标检测工具箱及基准测试平台。\n- [MMYOLO](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmyolo): OpenMMLab YOLO系列工具箱及基准测试平台。\n- [MMDetection3D](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmdetection3d): OpenMMLab下一代通用3D目标检测平台。\n- [MMRotate](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmrotate): OpenMMLab旋转目标检测工具箱及基准测试平台。\n- [MMTracking](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmtracking): OpenMMLab视频感知工具箱及基准测试平台。\n- [MMPose](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmpose): OpenMMLab人体姿态估计工具箱及基准测试平台。\n- [MMSegmentation](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmsegmentation): OpenMMLab语义分割工具箱及基准测试平台。\n- [MMOCR](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmocr): OpenMMLab文本检测、识别和理解工具箱。\n- [MMHuman3D](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmhuman3d): OpenMMLab3D人体参数化模型工具箱及基准测试平台。\n- [MMSelfSup](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmselfsup): OpenMMLab自监督学习工具箱及基准测试平台。\n- [MMFewShot](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmfewshot): OpenMMLab少样本学习工具箱及基准测试平台。\n- [MMAction2](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmaction2): OpenMMLab下一代动作理解工具箱及基准测试平台。\n- [MMFlow](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmflow): OpenMMLab光流计算工具箱及基准测试平台。\n- [MMDeploy](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmdeploy): OpenMMLab模型部署框架。\n- [MMRazor](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmrazor): OpenMMLab模型压缩工具箱及基准测试平台。\n- [Playground](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fplayground): 一个汇集并展示基于OpenMMLab构建的优秀项目的中心平台。","# MMEngine 快速上手指南\n\nMMEngine 是 OpenMMLab 开源的基于 PyTorch 的深度学习模型训练基础库。它提供了灵活的配置系统、主流的大模型训练框架支持（如 DeepSpeed、FSDP）以及丰富的训练策略，适用于从入门到大规模模型训练的各类场景。\n\n## 1. 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux, Windows, macOS\n*   **Python**: 3.8 ~ 3.11\n*   **PyTorch**: 1.6 ~ 2.1 (请先参考 [PyTorch 官方指南](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F) 安装对应版本的 PyTorch)\n*   **CUDA**: 根据您的显卡驱动和 PyTorch 版本选择合适的 CUDA 版本（可选，用于 GPU 加速）\n\n## 2. 安装步骤\n\n推荐使用 `openmim` 工具进行安装，它能自动处理依赖关系。\n\n**步骤 1：安装 openmim**\n```bash\npip install -U openmim\n```\n\n**步骤 2：安装 MMEngine**\n```bash\nmim install mmengine\n```\n\n> **提示**：如果下载速度较慢，可以添加国内镜像源加速：\n> ```bash\n> pip install -U openmim -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n> mim install mmengine\n> ```\n\n**步骤 3：验证安装**\n运行以下命令检查是否安装成功及查看环境信息：\n```bash\npython -c 'from mmengine.utils.dl_utils import collect_env;print(collect_env())'\n```\n若无报错并输出了环境配置信息，则说明安装成功。\n\n## 3. 基本使用\n\n以下示例展示如何使用 MMEngine 在 CIFAR-10 数据集上训练一个 ResNet-50 模型。整个流程包含定义模型、数据加载、评估指标和启动训练四个步骤。\n\n### 第一步：定义模型\n继承 `BaseModel` 并重写 `forward` 方法，需支持 `mode` 参数以区分训练（计算 loss）和验证（返回预测结果）。\n\n```python\nimport torch.nn.functional as F\nimport torchvision\nfrom mmengine.model import BaseModel\n\nclass MMResNet50(BaseModel):\n    def __init__(self):\n        super().__init__()\n        self.resnet = torchvision.models.resnet50()\n\n    def forward(self, imgs, labels, mode):\n        x = self.resnet(imgs)\n        if mode == 'loss':\n            return {'loss': F.cross_entropy(x, labels)}\n        elif mode == 'predict':\n            return x, labels\n```\n\n### 第二步：准备数据\n构建训练集和验证集的 `DataLoader`。此处直接使用 TorchVision 内置的 CIFAR-10 数据集。\n\n```python\nimport torchvision.transforms as transforms\nfrom torch.utils.data import DataLoader\n\nnorm_cfg = dict(mean=[0.491, 0.482, 0.447], std=[0.202, 0.199, 0.201])\n\ntrain_dataloader = DataLoader(\n    batch_size=32,\n    shuffle=True,\n    dataset=torchvision.datasets.CIFAR10(\n        'data\u002Fcifar10',\n        train=True,\n        download=True,\n        transform=transforms.Compose([\n            transforms.RandomCrop(32, padding=4),\n            transforms.RandomHorizontalFlip(),\n            transforms.ToTensor(),\n            transforms.Normalize(**norm_cfg)\n        ]))\n)\n\nval_dataloader = DataLoader(\n    batch_size=32,\n    shuffle=False,\n    dataset=torchvision.datasets.CIFAR10(\n        'data\u002Fcifar10',\n        train=False,\n        download=True,\n        transform=transforms.Compose([\n            transforms.ToTensor(),\n            transforms.Normalize(**norm_cfg)\n        ]))\n)\n```\n\n### 第三步：定义评估指标\n继承 `BaseMetric` 实现准确率计算，需实现 `process`（处理单批次数据）和 `compute_metrics`（汇总计算）方法。\n\n```python\nfrom mmengine.evaluator import BaseMetric\n\nclass Accuracy(BaseMetric):\n    def process(self, data_batch, data_samples):\n        score, gt = data_samples\n        # 将单批次结果保存至 self.results\n        self.results.append({\n            'batch_size': len(gt),\n            'correct': (score.argmax(dim=1) == gt).sum().cpu(),\n        })\n    \n    def compute_metrics(self, results):\n        total_correct = sum(item['correct'] for item in results)\n        total_size = sum(item['batch_size'] for item in results)\n        # 返回包含指标名称和结果的字典\n        return dict(accuracy=100 * total_correct \u002F total_size)\n```\n\n### 第四步：构建 Runner 并启动训练\n使用 `Runner` 统一管理模型、数据、优化器和训练配置，一键启动训练。\n\n```python\nfrom torch.optim import SGD\nfrom mmengine.runner import Runner\n\nrunner = Runner(\n    model=MMResNet50(),\n    work_dir='.\u002Fwork_dir',\n    train_dataloader=train_dataloader,\n    # 配置优化器包装器\n    optim_wrapper=dict(optimizer=dict(type=SGD, lr=0.001, momentum=0.9)),\n    # 配置训练轮数等参数\n    train_cfg=dict(by_epoch=True, max_epochs=5, val_interval=1),\n    val_dataloader=val_dataloader,\n    val_cfg=dict(),\n    val_evaluator=dict(type=Accuracy),\n)\n\n# 开始训练\nrunner.train()\n```","某计算机视觉算法团队正在基于 PyTorch 研发一套新的缺陷检测系统，需要快速验证多种前沿模型架构并部署到生产环境。\n\n### 没有 mmengine 时\n- **重复造轮子**：每次切换新模型（如从 Faster R-CNN 换到 YOLO），都需要重新编写数据加载、训练循环和日志记录代码，耗时且易出错。\n- **配置管理混乱**：超参数硬编码在脚本中，调整学习率或批次大小需修改多处代码，难以复现实验结果。\n- **分布式训练门槛高**：实现多卡或多机训练需手动处理进程通信和梯度同步，调试复杂，普通算法工程师难以上手。\n- **生态割裂**：想要尝试 OpenMMLab 社区的最新算法，因接口不统一，集成成本极高，往往只能望而却步。\n\n### 使用 mmengine 后\n- **统一训练范式**：借助 mmengine 的标准执行器（Runner），只需修改配置文件即可无缝切换不同模型，核心训练逻辑无需改动。\n- **配置即代码**：采用统一的配置文件管理所有实验参数，支持继承与复用，轻松实现实验版本控制和一键复现。\n- **开箱即用的分布式能力**：内置对 DeepSpeed 等加速引擎的支持，仅需简单配置即可启动大规模分布式训练，大幅降低并行开发难度。\n- **无缝对接开放生态**：作为 OpenMMLab 系列算法库的底层引擎，可直接调用数百种预置算法模块，快速构建高性能检测方案。\n\nmmengine 通过标准化深度学习训练流程，让算法团队从繁琐的工程基建中解放出来，专注于模型创新与业务落地。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-mmlab_mmengine_e598cf7d.jpg","open-mmlab","OpenMMLab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fopen-mmlab_7c171dd7.png","",null,"https:\u002F\u002Fopenmmlab.com","https:\u002F\u002Fgithub.com\u002Fopen-mmlab",[80,84],{"name":81,"color":82,"percentage":83},"Python","#3572A5",99.9,{"name":85,"color":86,"percentage":87},"Dockerfile","#384d54",0.1,1465,447,"2026-04-08T04:40:05","Apache-2.0","未说明","非强制依赖，但训练深度学习模型通常需 NVIDIA GPU；支持 CUDA 的 PyTorch 版本范围为 1.6~2.1（对应 CUDA 版本视具体 PyTorch 安装而定）",{"notes":95,"python":96,"dependencies":97},"安装前需先按官方指南成功安装 PyTorch。该工具是 OpenMMLab 系列算法库的基础训练引擎，支持多种大规模模型训练框架（如 DeepSpeed, FSDP, ColossalAI）及混合精度训练等策略。建议使用 pip 或 openmim 进行安装。","3.8 ~ 3.11",[98,99,64],"torch>=1.6, \u003C=2.1","openmim",[14,15,13],[102,103,104,105,106,107],"computer-vision","deep-learning","pytorch","ai","machine-learning","python","2026-03-27T02:49:30.150509","2026-04-09T12:33:44.890142",[111,116,121,126,130,135],{"id":112,"question_zh":113,"answer_zh":114,"source_url":115},26230,"如何在构建重复对象时避免每次手动处理错误，或者如何获取当前注册的实例？","可以使用 `get_current_instance()` 函数来获取当前实例。虽然 `VISUALIZERS.build`、`build_from_cfg(VISUALIZERS, cfg)` 和 `get_instance` 功能类似，但如果你已经构建了注册表且想直接获取当前实例而不需要显式传递参数，`get_current_instance()` 是更便捷的选择。","https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fissues\u002F673",{"id":117,"question_zh":118,"answer_zh":119,"source_url":120},26231,"在 MMSegmentation 1.x 中使用 `SegLocalVisualizer._draw_sem_seg` 可视化语义分割图时，为什么会出现边界模糊或颜色叠加异常的问题？","该问题通常是由于 `Visualizer._draw_sem_seg()` 中重复调用了 `draw_binary_masks()` 和 `draw_texts()` 导致的。在 MMEngine 中，`draw_binary_masks` 只会对掩码区域添加加权颜色，非掩码区域保留原始像素。如果每个像素都属于某个类别（即没有“非掩码”区域），多次调用可能导致颜色混合异常。解决方法是修改 `_draw_sem_seg()` 方法，确保只进行一次绘制调用，或自定义 Visualizer 来控制绘制逻辑。","https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fissues\u002F741",{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},26232,"如果配置中 `randomness.seed=None`，运行实验后如何得知实际使用的随机种子值？","可以通过访问 `runner.seed` 属性来获取实际使用的随机种子。首先需要获取 Runner 实例，例如使用 `runner = Runner.from_cfg(cfg)`。此外，种子值通常也会打印在日志中，方便后续追溯。","https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fissues\u002F1147",{"id":127,"question_zh":128,"answer_zh":129,"source_url":125},26233,"如何在自定义 Metric 类或其他模块中访问 Runner 实例的属性（如 work_dir 或 seed）？","可以通过 `Runner.from_cfg(cfg)` 获取 Runner 实例，然后直接访问其属性，例如 `runner.work_dir` 或 `runner.seed`。可以参考 `examples\u002Fdistributed_training.py` 中的示例代码来了解具体用法。",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},26234,"分布式训练时导入 config 文件出现 'EOFError: Ran out of input' 错误，可能与 yapf 有关，如何解决？","该问题通常是由于多进程同时导入 yapf 模块导致的竞争条件。一个可行的临时解决方案是使用等待机制控制各进程的导入顺序。例如：\n```python\nimport time\nimport os\n\ndef wait_before_import_config():\n    t = int(os.environ.get('LOCAL_RANK', 0))\n    time.sleep(t * 0.5)\n\ndef wait_after_import_config():\n    t = int(os.environ.get('WORLD_SIZE', 0)) - int(os.environ.get('LOCAL_RANK', 0))\n    time.sleep(t * 0.5)\n\nwait_before_import_config()\nfrom mmengine.config import Config\nwait_after_import_config()\n```\n这样可以确保各进程依次导入配置，避免冲突。","https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fissues\u002F1480",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},26235,"项目是否有官方沟通渠道以便讨论路线图或协作事宜？","是的，项目维护者邀请用户加入 Discord 群组进行进一步交流，链接为：https:\u002F\u002Fdiscord.gg\u002FjkP6Ru6UTj。这是讨论路线图、协作和其他问题的推荐渠道。","https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fissues\u002F765",[141,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235],{"id":142,"version":143,"summary_zh":76,"released_at":144},167774,"v0.11.0rc2","2025-12-23T04:41:48",{"id":146,"version":147,"summary_zh":148,"released_at":149},167775,"v0.11.0rc1","只需更新 PyPI 中的索引，v0.11.0rc0 的部署失败了……","2025-12-11T08:18:00",{"id":151,"version":152,"summary_zh":153,"released_at":154},167776,"v0.11.0rc0","## 变更内容\n* [增强] 将 `import yapf` 移至函数内部，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1652 中完成\n* [增强] 屏蔽可选优化器的导入错误，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1660 中完成\n* [增强] 默认使用 opencv-python-headless，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1663 中完成\n* [修复] 修复 Python 3.12 中的配置错误，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1669 中完成\n* [修复] 使用 `weights_only=Flase` 加载检查点，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1670 中完成\n* [测试] 修复单元测试，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1671 中完成\n* [测试] 移除 `numpy>=2.0.0` 中的 `numpy.compact`，由 @MGAMZ 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1672 中完成\n* [修复] 正确处理配置中的 `compile.disable`，由 @MGAMZ 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1674 中完成\n* [修复] 将已弃用的 `pkg_resources` 替换为 `importlib`，由 @MGAMZ 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1676 中完成\n\n## 新贡献者\n* @MGAMZ 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1672 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.10.7...v0.11.0rc0","2025-11-25T09:33:51",{"id":156,"version":157,"summary_zh":158,"released_at":159},167777,"v0.10.7","## 变更内容\n* 由 @C1rN09 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1625 中更新了 deploy.yml 文件\n* [增强] 支持手动触发 CI，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1626 中实现\n* [增强] 支持手动触发部署 CI，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1627 中实现\n* [修复] 修复部署 CI，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1628 中完成\n* [修复] 移除 `build_function.py` 中的 PyTorch 依赖，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1632 中完成\n* 由 @tenacioustommy 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1636 中修复了 CI 问题\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.10.6...v0.10.7","2025-03-04T12:22:42",{"id":161,"version":162,"summary_zh":163,"released_at":164},167778,"v0.10.6","## 变更内容\n* [修复] 由 HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1598 中修复了 lint 问题\n* 修复：在 finally 块中返回，由 tibor-reiss 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1596 中完成\n* 修复 pytest≥8.2 时的错误，由 tenacioustommy 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1601 中完成\n* 修复 Adafactor 优化器在 PyTorch 2.5 上的问题，并提升兼容性，由 tenacioustommy 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1600 中完成\n* 确保配置文件中的类型正确，由 tenacioustommy 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1602 中完成\n* 版本升级至 v0.10.6，由 HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1623 中完成\n\n## 新贡献者\n* tibor-reiss 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1596 中完成了首次贡献\n* tenacioustommy 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1601 中完成了首次贡献","2025-01-13T11:22:33",{"id":166,"version":167,"summary_zh":168,"released_at":169},167779,"v0.10.5","## 变更内容\n* [功能] 支持在验证过程中计算损失，由 @fanqiNO1 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1503 中实现\n* [修复] 修复内置模块检查问题，由 @HAOCHENYE 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1571 中修复\n\n## 新贡献者\n* @ClowDragon 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1537 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.10.4...v0.10.5","2024-09-20T07:44:12",{"id":171,"version":172,"summary_zh":173,"released_at":174},167780,"v0.10.4","# v0.10.4 (2024年4月23日)\n\n## 新特性与改进\n\n- 在 MLflowVisBackend 中支持自定义 `artifact_location`。由 [@daavoo](https:\u002F\u002Fgithub.com\u002Fdaavoo) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1505 中实现。\n- 在 README 中添加了支持的 PyTorch 版本信息。由 [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1512 中完成。\n- 训练完成后自动执行评估。由 [@LZHgrla](https:\u002F\u002Fgithub.com\u002FLZHgrla) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1529 中实现。\n- 为 `DeepSpeedEngine._zero3_consolidated_16bit_state_dict` 启用 `exclude_frozen_parameters` 功能。由 [@LZHgrla](https:\u002F\u002Fgithub.com\u002FLZHgrla) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1517 中完成。\n\n## Bug 修复\n\n- 修复警告捕获问题。由 [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1494 中解决。\n- 移除 codeowners 文件。由 [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1496 中完成。\n- 修复 ReadTheDocs 的配置问题。由 [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1511 中解决。\n- 使用 `paramwise_cfg` 时删除冻结参数。由 [@LZHgrla](https:\u002F\u002Fgithub.com\u002FLZHgrla) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1441 中修复。\n\n## 文档\n\n- 优化 mmengine 简介。由 [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1479 中完成。\n- 修复拼写错误。由 [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1481 中修正。\n- 修复拼写错误并移除全角 Unicode 字符。由 [@evdcush](https:\u002F\u002Fgithub.com\u002Fevdcush) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1488 中完成。\n- 修复 Config 的 docstring。由 [@MambaWong](https:\u002F\u002Fgithub.com\u002FMambaWong) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1506 中修正。\n- 修复拼写错误。由 [@hiramf](https:\u002F\u002Fgithub.com\u002Fhiramf) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1532 中完成。\n\n## 新贡献者\n* [@daavoo](https:\u002F\u002Fgithub.com\u002Fdaavoo) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1505 中完成了首次贡献。\n* [@hiramf](https:\u002F\u002Fgithub.com\u002Fhiramf) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1532 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.10.3...v0.10.4","2024-04-23T03:30:37",{"id":176,"version":177,"summary_zh":178,"released_at":179},167781,"v0.10.3","### 新特性与改进\n\n- 增加对 musa 设备的支持，由 [@hanhaowen-mt](https:\u002F\u002Fgithub.com\u002Fhanhaowen-mt) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1453 中实现。\n- 支持 DeepSpeed 的 `save_optimizer=False` 选项，由 [@LZHgrla](https:\u002F\u002Fgithub.com\u002FLZHgrla) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1474 中实现。\n- 更新可视化工具的文档字符串，由 [@Anm-pinellia](https:\u002F\u002Fgithub.com\u002FAnm-pinellia) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1476 中完成。\n\n### Bug 修复\n\n- 修复 `Config.to_dict` 方法，由 [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1465 中完成。\n- 修复迭代恢复功能，由 [@LZHgrla](https:\u002F\u002Fgithub.com\u002FLZHgrla) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1471 中完成。\n- 修复 `dist.collect_results`，使其保留所有进程的结果，由 [@LZHgrla](https:\u002F\u002Fgithub.com\u002FLZHgrla) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1469 中完成。\n\n### 文档\n\n- 添加 ProfilerHook 的使用说明，由 [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1466 中完成。\n- 修正 DDP 训练文档中关于 nnodes 的描述，由 [@XiwuChen](https:\u002F\u002Fgithub.com\u002FXiwuChen) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1462 中完成。\n\n## 新贡献者\n* @XiwuChen 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1462 中完成了首次贡献。\n* @hanhaowen-mt 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1453 中完成了首次贡献。\n* @Anm-pinellia 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1476 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.10.2...v0.10.3","2024-01-24T04:49:47",{"id":181,"version":182,"summary_zh":183,"released_at":184},167782,"v0.10.2","# v0.10.2 (2023年12月26日)\n\n## 新特性与改进\n\n- 由 [@shun001](https:\u002F\u002Fgithub.com\u002Fshun001) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1459 中实现，支持使用 NPU 后端进行多节点分布式训练。\n- 由 [@del-zhenwu](https:\u002F\u002Fgithub.com\u002Fdel-zhenwu) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1438 中实现，使用 `ImportError` 替代 `ModuleNotFoundError`。\n\n## Bug 修复\n\n- 由 [@SCZwangxiao](https:\u002F\u002Fgithub.com\u002FSCZwangxiao) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1447 中修复了 `BaseStrategy` 中 `load_model_state_dict` 的 bug。\n- 由 [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1440 中修复了 ColossalAIStrategy 中的放置策略问题。\n\n## 新贡献者\n* @del-zhenwu 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1438 中完成了首次贡献。\n* @SCZwangxiao 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1447 中完成了首次贡献。\n* @shun001 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1459 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.10.1...v0.10.2","2023-12-26T08:35:29",{"id":186,"version":187,"summary_zh":188,"released_at":189},167783,"v0.10.1","# v0.10.1 (2023年11月22日)\n\n## Bug 修复\n\n- 修复在没有 OpenCV 的情况下运行 `collect_env` 的问题，由 [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1434 中完成\n- 修复 `deploy.yml` 文件，由 [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1431 中完成\n\n## 文档\n\n- 添加从源码构建 mmengine-lite 的说明，由 [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1435 中完成\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.10.0...v0.10.1","2023-11-22T03:15:22",{"id":191,"version":192,"summary_zh":193,"released_at":194},167784,"v0.10.0","# v0.10.0 (2023年11月21日)\n\n## 新特性与改进\n\n- 支持在不依赖 OpenCV 的情况下安装 mmengine，由 [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1429 中实现。\n- 为 `DeepSpeedStrategy` 的 `resume` 方法添加了 `exclude_frozen_parameters` 参数支持，由 [@LZHgrla](https:\u002F\u002Fgithub.com\u002FLZHgrla) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1424 中实现。\n\n## Bug 修复\n\n- 修复 colo 优化器包装器中的 bug，由 [@HIT-cwh](https:\u002F\u002Fgithub.com\u002FHIT-cwh) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1426 中完成。\n- 修复 `SingleDeviceStrategy` 中的 `scale_lr` 问题，由 [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1428 中完成。\n- 修复针对 PyTorch 2.1.0 的 CI 测试问题，由 [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) 在 https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1418 中完成。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.9.1...v0.10.0","2023-11-21T02:31:00",{"id":196,"version":197,"summary_zh":198,"released_at":199},167785,"v0.9.1","# v0.9.1 (03\u002F11\u002F2023)\r\n\r\n## New Features & Enhancements\r\n\r\n- Add `exclude_frozen_parameters` for `DeepSpeedStrategy` by [@LZHgrla](https:\u002F\u002Fgithub.com\u002FLZHgrla) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1415\r\n- Enhance inputs_to_half in DeepSpeedStrategy by [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1400\r\n- Support slurm distributed training for mlu devices by [@POI-WX](https:\u002F\u002Fgithub.com\u002FPOI-WX) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1396\r\n- Add torch 2.1.0 checking in CI by [@YiyaoYang1](https:\u002F\u002Fgithub.com\u002FYiyaoYang1) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1389\r\n\r\n## Bug Fixes\r\n\r\n- Fix new config in visualizer by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1390\r\n- Fix func params using without init in OneCycleLR (#1401) by [@whlook](https:\u002F\u002Fgithub.com\u002Fwhlook) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1403\r\n- Fix a bug when module is missing in low version of bitsandbytes by [@Ben-Louis](https:\u002F\u002Fgithub.com\u002FBen-Louis) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1388\r\n- Fix ConcatDataset raising error when metainfo is np.array by [@jonbakerfish](https:\u002F\u002Fgithub.com\u002Fjonbakerfish) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1407\r\n\r\n## Docs\r\n\r\n- Rename master to main by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1397\r\n\r\n## New Contributors\r\n\r\n- @POI-WX made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1396\r\n- @YiyaoYang1 made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1389\r\n- @whlook made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1403\r\n- @Ben-Louis made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1388\r\n- @jonbakerfish made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1407\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.9.0...v0.9.1","2023-11-03T08:16:01",{"id":201,"version":202,"summary_zh":203,"released_at":204},167786,"v0.9.0","# v0.9.0 (10\u002F10\u002F2023)\r\n\r\n## Highlights\r\n\r\n- Support training with [ColossalAI](https:\u002F\u002Fcolossalai.org\u002F). Refer to the [Training Large Models](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Flarge_model_training.html#colossalai) for more detailed usages.\r\n- Support gradient checkpointing. Refer to the [Save Memory on GPU](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fsave_gpu_memory.html#gradient-checkpointing) for more details.\r\n- Supports multiple visualization backends, including `NeptuneVisBackend`, `DVCLiveVisBackend` and `AimVisBackend`. Refer to [Visualization Backends](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fvisualize_training_log.html) for more details.\r\n\r\n## New Features & Enhancements\r\n\r\n- Add a text translation example by [@Desjajja](https:\u002F\u002Fgithub.com\u002FDesjajja) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1283\r\n- Add `NeptuneVisBackend` by [@wangerlie](https:\u002F\u002Fgithub.com\u002Fwangerlie) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1311\r\n- Add ColossalAI strategy by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1299\r\n- Add collect_results support for Ascend NPU by [@xuuyangg](https:\u002F\u002Fgithub.com\u002Fxuuyangg) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1309\r\n- Unify the parameter style of DeepSpeedStrategy by [@LZHgrla](https:\u002F\u002Fgithub.com\u002FLZHgrla) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1320\r\n- Add progressbar rich by [@Dominic23331](https:\u002F\u002Fgithub.com\u002FDominic23331) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1157\r\n- Support using other file handlers by [@KevinNuNu](https:\u002F\u002Fgithub.com\u002FKevinNuNu) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1188\r\n- Refine error message by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1338\r\n- Implement gradient checkpointing by [@zeyuanyin](https:\u002F\u002Fgithub.com\u002Fzeyuanyin) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1319\r\n- Add `DVCLiveVisBackend` by [@RangeKing](https:\u002F\u002Fgithub.com\u002FRangeKing) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1336\r\n- Add `AimVisBackend` by [@RangeKing](https:\u002F\u002Fgithub.com\u002FRangeKing) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1347\r\n- Support bitsandbytes by [@okotaku](https:\u002F\u002Fgithub.com\u002Fokotaku) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1357\r\n- Support `Adafactor` Optimizer by [@okotaku](https:\u002F\u002Fgithub.com\u002Fokotaku) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1361\r\n- Add unit tests for autocast with Ascend device by [@6Vvv](https:\u002F\u002Fgithub.com\u002F6Vvv) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1363\r\n- Support metainfo of dataset can be a generic dict-like Mapping by [@hiyyg](https:\u002F\u002Fgithub.com\u002Fhiyyg) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1378\r\n- Support for installing minimal runtime dependencies by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1362\r\n- Support setting the number of iterations in `Runner` for each epoch by [@ShuRaymond](https:\u002F\u002Fgithub.com\u002FShuRaymond) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1292\r\n- Support using gradient checkpointing in FSDP by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1382\r\n\r\n## Docs\r\n\r\n- Add README for examples by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1295\r\n- Add a new ecosystem in README by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1296\r\n- Fix typo by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1298\r\n- Add an image for Neptune by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1312\r\n- Fix docs of ColossalAI by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1315\r\n- Update QRCode by [@crazysteeaam](https:\u002F\u002Fgithub.com\u002Fcrazysteeaam) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1328\r\n- Add activation checkpointing usage by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1341\r\n- Fix typo by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1348\r\n- Update the usage of bitsandbytes in Chinese documents by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1359\r\n- Fix doc typo our_dir in LoggerHook by [@wangg12](https:\u002F\u002Fgithub.com\u002Fwangg12) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1373\r\n- Add the contributing doc in pr template by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1380\r\n- Update the version info by [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1383\r\n- Fix typo by [@fanqiNO1](https:\u002F\u002Fgithub.com\u002FfanqiNO1) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1385\r\n\r\n## Bug Fixes\r\n\r\n- Ignore examples in CI by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1297\r\n- Fix multi-card issue in ","2023-10-10T11:02:43",{"id":206,"version":207,"summary_zh":208,"released_at":209},167787,"v0.8.5","## v0.8.5 (25\u002F09\u002F2023)\r\n\r\n### Bug fixes\r\n\r\n- Optional removal of the `verify` parameter in `yapf`, ensuring compatibility across different `yapf` versions by [@okotaku](https:\u002F\u002Fgithub.com\u002Fokotaku) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1365\r\n","2023-09-25T08:25:06",{"id":211,"version":212,"summary_zh":213,"released_at":214},167788,"v0.8.4","## v0.8.4 (03\u002F08\u002F2023)\r\n\r\n### New Features & Enhancements\r\n\r\n- Support callable `collate_fn` for FlexibleRunner by [@LZHgrla](https:\u002F\u002Fgithub.com\u002FLZHgrla) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1284\r\n\r\n### Bug fixes\r\n\r\n- Skip adding `vis_backends` when `save_dir` is not set by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1289\r\n- Fix dumping pure python style config in colab by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1290\r\n\r\n### Docs\r\n\r\n- Find unused parameters by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1288\r\n\r\n## New Contributors\r\n* @LZHgrla made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1284\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.8.3...v0.8.4","2023-08-03T15:43:10",{"id":216,"version":217,"summary_zh":218,"released_at":219},167789,"v0.8.3","## v0.8.3 (31\u002F07\u002F2023)\r\n\r\n### Highlights\r\n\r\n- Support enabling `efficient_conv_bn_eval` for efficient convolution and batch normalization. See [save memory on gpu](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fcommon_usage\u002Fsave_gpu_memory.html#save-memory-on-gpu) for more details\r\n- Add [Llama2 finetune example](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Ftree\u002Fmain\u002Fexamples\u002Fllama2)\r\n- Support multi-node distributed training with MLU backend\r\n\r\n### New Features & Enhancements\r\n\r\n- Enable `efficient_conv_bn_eval` for memory saving convolution and batch normalization by [@youkaichao](https:\u002F\u002Fgithub.com\u002Fyoukaichao) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1202, https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1251 and https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1259\r\n- Add Llama2 example by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1264\r\n- Compare the difference of two configs by [@gachiemchiep](https:\u002F\u002Fgithub.com\u002Fgachiemchiep) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1260\r\n- Enable explicit error for deepspeed not installed by [@Li-Qingyun](https:\u002F\u002Fgithub.com\u002FLi-Qingyun) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1240\r\n- Support skipping initialization in `BaseModule` by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1263\r\n- Add parameter `save_begin` to control when to save checkpoints by [@KerwinKai](https:\u002F\u002Fgithub.com\u002FKerwinKai) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1271\r\n- Support multi-node distributed training with MLU backend by [@josh6688](https:\u002F\u002Fgithub.com\u002Fjosh6688) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1266\r\n- Enhance error message thrown by Config, build function and `ConfigDict.items` by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1272, https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1270 and https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1088\r\n- Add the `loop_stage` runtime information in `message_hub` by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1277\r\n- Fix Visualizer that built `vis_backends` will not be used when `save_dir` is `None` by [@Xinyu302](https:\u002F\u002Fgithub.com\u002FXinyu302) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1275\r\n\r\n### Bug fixes\r\n\r\n- Fix scalar check in RuntimeInfoHook by [@i-aki-y](https:\u002F\u002Fgithub.com\u002Fi-aki-y) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1250\r\n- Move data preprocessor to target device in FSDPStrategy by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1261\r\n\r\n### Docs\r\n\r\n- Add ecosystem in README by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1247\r\n- Add short explanation about registry scope by [@mmeendez8](https:\u002F\u002Fgithub.com\u002Fmmeendez8) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1114\r\n- Add the data flow of Runner in README by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1257\r\n- Introduce how to customize distributed training settings [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1279\r\n\r\n### New Contributors\r\n* @youkaichao made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1202\r\n* @mmeendez8 made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1114\r\n* @Xinyu302 made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1275\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.8.2...v0.8.3","2023-07-31T09:19:54",{"id":221,"version":222,"summary_zh":223,"released_at":224},167790,"v0.8.2","### Bug fixes\r\n\r\n- Fix pickling the Python style config by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1241\r\n- Fix the logic of setting `lazy_import` by [@Li-Qingyun](https:\u002F\u002Fgithub.com\u002FLi-Qingyun) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1239\r\n\r\n## New Contributors\r\n* @Li-Qingyun made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1239\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.8.1...v0.8.2","2023-07-12T03:00:12",{"id":226,"version":227,"summary_zh":228,"released_at":229},167791,"v0.8.1","### New Features & Enhancements\r\n\r\n- Accelerate `Config.dump` and support converting Lazyxxx to string in `ConfigDict.to_dict`by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1232\r\n\r\n### Bug fixes\r\n\r\n- FSDP should call `_get_ignored_modules` by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1235\r\n\r\n### Docs\r\n\r\n- Add a document to introduce how to train a large model by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1228\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.8.0...v0.8.1","2023-07-06T02:21:39",{"id":231,"version":232,"summary_zh":233,"released_at":234},167792,"v0.8.0","## v0.8.0 (07\u002F03\u002F2023)\r\n\r\n### Highlights\r\n\r\n- Support training with [FSDP](https:\u002F\u002Fpytorch.org\u002Ftutorials\u002Fintermediate\u002FFSDP_adavnced_tutorial.html?highlight=fsdp) and [DeepSpeed](https:\u002F\u002Fwww.deepspeed.ai\u002F). Refer to the [example](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fblob\u002Fmain\u002Fexamples\u002Fdistributed_training_with_flexible_runner.py) for more detailed usages.\r\n\r\n- Introduce the pure Python style configuration file:\r\n\r\n  - Support navigating to base configuration file in IDE\r\n  - Support navigating to base variable in IDE\r\n  - Support navigating to source code of class in IDE\r\n  - Support inheriting two configuration files containing the same field\r\n  - Load the configuration file without other third-party requirements\r\n\r\n  Refer to the [tutorial](https:\u002F\u002Fmmengine.readthedocs.io\u002Fen\u002Flatest\u002Fadvanced_tutorials\u002Fconfig.html#a-pure-python-style-configuration-file-beta) for more detailed usages.\r\n\r\n  ![new-config-en](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fassets\u002F57566630\u002F7eb41748-9374-488f-901e-fcd7f0d3c8a1)\r\n\r\n### New Features & Enhancements\r\n\r\n- Support training with FSDP by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1213\r\n- Add `FlexibleRunner` and `Strategies`, and support training with DeepSpeed by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1183\r\n- Support pure Python style configuration file by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1071\r\n- Learning rate in log can show the base learning rate of optimizer by [@AkideLiu](https:\u002F\u002Fgithub.com\u002FAkideLiu) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1019\r\n- Refine the error message when auto_scale_lr is not set correctly by [@alexander-soare](https:\u002F\u002Fgithub.com\u002Falexander-soare) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1181\r\n- WandbVisBackend supports updating config by [@zgzhengSEU](https:\u002F\u002Fgithub.com\u002FzgzhengSEU) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F977\r\n\r\n### Bug fixes\r\n\r\n- CheckpointHook should check whether file exists before removing it by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1198\r\n- Fix undefined variable error in Runner by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1219\r\n\r\n### Docs\r\n\r\n- Add a document to introduce how to debug with vscode by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1212\r\n- Update English introduction by [@evdcush](https:\u002F\u002Fgithub.com\u002Fevdcush) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1189\r\n- Fix parameter typing error in document by [@syo093c](https:\u002F\u002Fgithub.com\u002Fsyo093c) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1201\r\n- Fix gpu collection during evaluation by [@edkair](https:\u002F\u002Fgithub.com\u002Fedkair) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1208\r\n- Fix a comment in runner tutorial by [@joihn](https:\u002F\u002Fgithub.com\u002Fjoihn) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1210\r\n\r\n## New Contributors\r\n* @alexander-soare made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1181\r\n* @zgzhengSEU made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F977\r\n* @AkideLiu made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1019\r\n* @syo093c made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1201\r\n* @edkair made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1208\r\n* @joihn made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1210\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.7.4...v0.8.0","2023-07-03T12:30:47",{"id":236,"version":237,"summary_zh":238,"released_at":239},167793,"v0.7.4","## v0.7.4 (06\u002F03\u002F2023)\r\n\r\n### Highlights\r\n\r\n- Support using `ClearML` to record experiment data\r\n- Add `Sophia` optimizers\r\n\r\n### New Features & Enhancements\r\n\r\n- Add visualize backend for clearml by [@gachiemchiep](https:\u002F\u002Fgithub.com\u002Fgachiemchiep) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1091\r\n- Support Sophia optimizers by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1170\r\n- Refactor unittest syncbuffer by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F813\r\n- Allow `ann_file`, `data_root` is `None` for `BaseDataset` by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F850\r\n- Enable full precision training on Ascend NPU by [@Ginray](https:\u002F\u002Fgithub.com\u002FGinray) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1109\r\n- Creating a text classification example by [@TankNee](https:\u002F\u002Fgithub.com\u002FTankNee) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1122\r\n- Add option to log selected config only by [@KickCellarDoor](https:\u002F\u002Fgithub.com\u002FKickCellarDoor) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1159\r\n- Add an option to control whether to show progress bar in BaseInference by [@W-ZN](https:\u002F\u002Fgithub.com\u002FW-ZN) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1135\r\n- Support dipu device by [@CokeDong](https:\u002F\u002Fgithub.com\u002FCokeDong) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1127\r\n- Let unit tests not affect each other by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1169\r\n- Add support for full wandb's `define_metric` arguments by [@i-aki-y](https:\u002F\u002Fgithub.com\u002Fi-aki-y) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1099\r\n\r\n### Bug fixes\r\n\r\n- Fix the incorrect device of inputs in get_model_complexity_info by [@CescMessi](https:\u002F\u002Fgithub.com\u002FCescMessi) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1130\r\n- Correctly saves `_metadata` of `state_dict` when saving checkpoints by [@Bomsw](https:\u002F\u002Fgithub.com\u002FBomsw) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1131\r\n- Correctly record random seed in log by [@Shiyang980713](https:\u002F\u002Fgithub.com\u002FShiyang980713) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1152\r\n- Close MLflowVisBackend only if active by [@zimonitrome](https:\u002F\u002Fgithub.com\u002Fzimonitrome) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1151\r\n- Fix `ProfileHook` cannot profile ddp-training by [@HAOCHENYE](https:\u002F\u002Fgithub.com\u002FHAOCHENYE) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1140\r\n- Handle the case for Multi-Instance GPUs when using `cuda_visible_devices` by [@adrianjoshua-strutt](https:\u002F\u002Fgithub.com\u002Fadrianjoshua-strutt) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1164\r\n- Fix attribute error when parsing `CUDA_VISIBLE_DEVICES` in logger [@Xiangxu-0103](https:\u002F\u002Fgithub.com\u002FXiangxu-0103) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1172\r\n\r\n### Docs\r\n\r\n- Translate `infer.md` by [@Hongru-Xiao](https:\u002F\u002Fgithub.com\u002FHongru-Xiao) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1121\r\n- Fix a missing comma in `tutorials\u002Frunner.md` by [@gy-7](https:\u002F\u002Fgithub.com\u002Fgy-7) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1146\r\n- Fix typo in comment by [@YQisme](https:\u002F\u002Fgithub.com\u002FYQisme) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1154\r\n- Translate `data_element.md` by [@xin-li-67](https:\u002F\u002Fgithub.com\u002Fxin-li-67) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1067\r\n- Add the usage of clearml by [@zhouzaida](https:\u002F\u002Fgithub.com\u002Fzhouzaida) in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1180\r\n\r\n## New Contributors\r\n* @CescMessi made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1130\r\n* @Bomsw made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1131\r\n* @Hongru-Xiao made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1121\r\n* @TankNee made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1122\r\n* @W-ZN made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1135\r\n* @gy-7 made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1146\r\n* @YQisme made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1154\r\n* @Shiyang980713 made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1152\r\n* @KickCellarDoor made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1159\r\n* @CokeDong made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1127\r\n* @zimonitrome made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1151\r\n* @adrianjoshua-strutt made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1164\r\n* @gachiemchiep made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1091\r\n* @i-aki-y made their first contribution in https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fpull\u002F1099\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmengine\u002Fcompare\u002Fv0.7.3...v0.7.4","2023-06-03T15:54:18"]