From d1712c9b9499050601ad9b851062dbb37695db78 Mon Sep 17 00:00:00 2001 From: Duo <50307526+iProzd@users.noreply.github.com> Date: Fri, 22 Nov 2024 08:46:46 +0800 Subject: [PATCH] Chore(doc): merge multitask training doc (#4395) ## Summary by CodeRabbit - **Documentation** - Updated multi-task mode documentation to clarify the correct link for model freezing. - Enhanced fine-tuning documentation for TensorFlow and PyTorch, adding clarity on processes and configurations. - Consolidated multi-task training references in the documentation for easier navigation. - Removed deprecated TensorFlow multi-task training documentation, redirecting users to the PyTorch backend. - Revised multi-task training documentation to emphasize the transition to PyTorch as the sole supported backend. --- doc/freeze/freeze.md | 2 +- doc/train/finetuning.md | 2 +- doc/train/index.rst | 3 +-- doc/train/multi-task-training-tf.md | 5 ----- .../{multi-task-training-pt.md => multi-task-training.md} | 4 +++- 5 files changed, 6 insertions(+), 10 deletions(-) delete mode 100644 doc/train/multi-task-training-tf.md rename doc/train/{multi-task-training-pt.md => multi-task-training.md} (98%) diff --git a/doc/freeze/freeze.md b/doc/freeze/freeze.md index c3800917a6..f394b64283 100644 --- a/doc/freeze/freeze.md +++ b/doc/freeze/freeze.md @@ -24,7 +24,7 @@ $ dp --pt freeze -o model.pth in the folder where the model is trained. The output model is called `model.pth`. -In [multi-task mode](../train/multi-task-training-pt.md), you need to choose one available heads (e.g. `CHOSEN_BRANCH`) by `--head` +In [multi-task mode](../train/multi-task-training), you need to choose one available heads (e.g. `CHOSEN_BRANCH`) by `--head` to specify which model branch you want to freeze: ```bash diff --git a/doc/train/finetuning.md b/doc/train/finetuning.md index e50109318d..cf2f5fde4f 100644 --- a/doc/train/finetuning.md +++ b/doc/train/finetuning.md @@ -129,7 +129,7 @@ Then, prepare a suitable input script for multitask fine-tuning `multi_input.jso - Suppose the new dataset for fine-tuning is named `DOWNSTREAM_DATA`, and the datasets to be retained from multitask pre-trained model are `PRE_DATA1` and `PRE_DATA2`. One can: -1. Refer to the [`multi-task-training`](./multi-task-training-pt.md) document to prepare a multitask training script for two systems, +1. Refer to the [`multi-task-training`](./multi-task-training) document to prepare a multitask training script for two systems, ideally extracting parts (i.e. {ref}`model_dict `, {ref}`loss_dict `, {ref}`data_dict ` and {ref}`model_prob ` parts) corresponding to `PRE_DATA1` and `PRE_DATA2` directly from the training script of the pre-trained model. 2. For `DOWNSTREAM_DATA`, select a desired branch to fine-tune from (e.g., `PRE_DATA1`), copy the configurations of `PRE_DATA1` as the configuration for `DOWNSTREAM_DATA` and insert the corresponding data path into the {ref}`data_dict `, thereby generating a three-system multitask training script. diff --git a/doc/train/index.rst b/doc/train/index.rst index 78ee31e5cb..92e84b3000 100644 --- a/doc/train/index.rst +++ b/doc/train/index.rst @@ -8,8 +8,7 @@ Training training-advanced train-input parallel-training - multi-task-training-tf - multi-task-training-pt + multi-task-training tensorboard gpu-limitations finetuning diff --git a/doc/train/multi-task-training-tf.md b/doc/train/multi-task-training-tf.md deleted file mode 100644 index 9c19025f22..0000000000 --- a/doc/train/multi-task-training-tf.md +++ /dev/null @@ -1,5 +0,0 @@ -# Multi-task training {{ tensorflow_icon }} - -:::{warning} -We have deprecated TensorFlow backend multi-task training, please use the PyTorch one [here](multi-task-training-pt.md). -::: diff --git a/doc/train/multi-task-training-pt.md b/doc/train/multi-task-training.md similarity index 98% rename from doc/train/multi-task-training-pt.md rename to doc/train/multi-task-training.md index 2235e7c912..9d5b71592e 100644 --- a/doc/train/multi-task-training-pt.md +++ b/doc/train/multi-task-training.md @@ -4,7 +4,9 @@ **Supported backends**: PyTorch {{ pytorch_icon }} ::: - +:::{warning} +We have deprecated TensorFlow backend multi-task training, please use the PyTorch one. +::: ## Theory