diff --git a/docs/mindformers/docs/source_en/appendix/conf_files.md b/docs/mindformers/docs/source_en/appendix/conf_files.md index e8b7abba33c3abe0c355a9411fe9914173b9b9ad..d299a1288f5ab0dd2ea7ebf6974beb9bd487ecb9 100644 --- a/docs/mindformers/docs/source_en/appendix/conf_files.md +++ b/docs/mindformers/docs/source_en/appendix/conf_files.md @@ -240,6 +240,10 @@ MindSpore Transformers provides encapsulated Callbacks function class, mainly to | remove_redundancy | Whether to remove the redundancy for the checkpoint, default value is `False`. | bool | | checkpoint_format | The format of the checkpoint while saving the checkpoint, default value is `ckpt`. Either `ckpt` or `safetensors`. | str | +4. OnRequestExit + + Enabling the graceful exit feature requires configuration. For reference, please see [mindspore.train.OnRequestExit](https://www.mindspore.cn/docs/en/master/api_python/train/mindspore.train.OnRequestExit.html)。 + Multiple Callbacks function classes can be configured at the same time under the `callbacks` field. The following is an example of `callbacks` configuration. ```yaml diff --git a/docs/mindformers/docs/source_zh_cn/appendix/conf_files.md b/docs/mindformers/docs/source_zh_cn/appendix/conf_files.md index 96dcd64e21d364544666419aee87967de8c91596..5afa496251f8e051774bde1c2f0f798398b88dba 100644 --- a/docs/mindformers/docs/source_zh_cn/appendix/conf_files.md +++ b/docs/mindformers/docs/source_zh_cn/appendix/conf_files.md @@ -240,6 +240,10 @@ MindSpore Transformers提供封装后的Callbacks函数类,主要实现在模 | remove_redundancy | 是否去除模型权重的冗余,默认值为`False`。 | bool | | | | checkpoint_format | 保存的模型权重的格式,默认值为`ckpt`。可选`ckpt`,`safetensors`。 | str | +4. OnRequestExit + + 开启优雅退出功能需要设置,可以参考[mindspore.train.OnRequestExit](https://www.mindspore.cn/docs/zh-CN/master/api_python/train/mindspore.train.OnRequestExit.html)。 + 在`callbacks`字段下可同时配置多个Callbacks函数类,以下是`callbacks`配置示例。 ```yaml