Ver código fonte

repair bug in time_cls (#2125)

liuhongen1234567 1 ano atrás
pai
commit
80cca077aa

+ 9 - 9
docs/pipeline_usage/tutorials/time_series_pipelines/time_series_classification.md

@@ -40,7 +40,7 @@ PaddleX 所提供的预训练的模型产线均可以快速体验效果,你可
 一行命令即可快速体验时序分类产线效果,使用 [测试文件](https://paddle-model-ecology.bj.bcebos.com/paddlex/ts/demo_ts/ts_cls.csv),并将 `--input` 替换为本地路径,进行预测
 
 ```
-paddlex --pipeline ts_classification --input ts_cls.csv --device gpu:0
+paddlex --pipeline ts_cls --input ts_cls.csv --device gpu:0
 ```
 参数说明:
 
@@ -56,18 +56,18 @@ paddlex --pipeline ts_classification --input ts_cls.csv --device gpu:0
    <summary> 👉点击展开</summary>
 
 ```
-paddlex --get_pipeline_yaml ts_classification
+paddlex --get_pipeline_yaml ts_cls
 ```
 执行后,时序分类产线配置文件将被保存在当前路径。若您希望自定义保存位置,可执行如下命令(假设自定义保存位置为* ./my_path*):
 
 ```
-paddlex --get_pipeline_config ts_classification --config_save_path ./my_path
+paddlex --get_pipeline_config ts_cls --config_save_path ./my_path
 ```
 
-获取产线配置文件后,可将 `--pipeline` 替换为配置文件保存路径,即可使配置文件生效。例如,若配置文件保存路径为 `./ts_classification.yaml`,只需执行:
+获取产线配置文件后,可将 `--pipeline` 替换为配置文件保存路径,即可使配置文件生效。例如,若配置文件保存路径为 `./ts_cls.yaml`,只需执行:
 
 ```
-paddlex --pipeline ./ts_classification.yaml --input ts_cls.csv
+paddlex --pipeline ./ts_cls.yaml --input ts_cls.csv
 ```
 其中,`--model`、`--device` 等参数无需指定,将使用配置文件中的参数。若依然指定了参数,将以指定的参数为准。
 
@@ -87,7 +87,7 @@ sample
 ```python
 from paddlex import create_pipeline
 
-pipeline = create_pipeline(pipeline="ts_classification")
+pipeline = create_pipeline(pipeline="ts_cls")
 
 output = pipeline.predict("ts_cls.csv")
 for res in output:
@@ -129,7 +129,7 @@ for res in output:
 
 若您获取了配置文件,即可对时序分类产线各项配置进行自定义,只需要修改 `create_pipeline` 方法中的 `pipeline` 参数值为产线配置文件路径即可。
 
-例如,若您的配置文件保存在 `./my_path/ts_classification.yaml` ,则只需执行:
+例如,若您的配置文件保存在 `./my_path/ts_cls.yaml` ,则只需执行:
 
 ```python
 from paddlex import create_pipeline
@@ -564,11 +564,11 @@ PaddleX 支持英伟达 GPU、昆仑芯 XPU、昇腾 NPU和寒武纪 MLU 等多
 例如,您使用英伟达 GPU 进行时序分类产线的推理,使用的 Python 命令为:
 
 ```
-paddlex --pipeline ts_classification --input ts_cls.csv --device gpu:0
+paddlex --pipeline ts_cls --input ts_cls.csv --device gpu:0
 ```
 此时,若您想将硬件切换为昇腾 NPU,仅需对 Python 命令中的 `--device` 进行修改即可:
 
 ```
-paddlex --pipeline ts_classification --input ts_cls.csv --device npu:0
+paddlex --pipeline ts_cls --input ts_cls.csv --device npu:0
 ```
 若您想在更多种类的硬件上使用通用时序分类产线,请参考[PaddleX多硬件使用指南](../../../other_devices_support/installation_other_devices.md)。

+ 9 - 9
docs/pipeline_usage/tutorials/time_series_pipelines/time_series_classification_en.md

@@ -41,7 +41,7 @@ Experience the effects of the time series classification pipeline quickly with a
 Experience the image anomaly detection pipeline with a single command,Use the [test file](https://paddle-model-ecology.bj.bcebos.com/paddlex/ts/demo_ts/ts_cls.csv), and replace `--input` with the local path to perform prediction.
 
 ```bash
-paddlex --pipeline ts_classification --input ts_cls.csv --device gpu:0
+paddlex --pipeline ts_cls --input ts_cls.csv --device gpu:0
 ```
 Parameter Explanation:
 
@@ -57,18 +57,18 @@ When executing the above command, the default time series classification pipelin
    <summary> 👉Click to Expand</summary>
 
 ```bash
-paddlex --get_pipeline_yaml ts_classification
+paddlex --get_pipeline_yaml ts_cls
 ```
 After execution, the time series classification pipeline configuration file will be saved in the current path. If you wish to customize the save location, you can execute the following command (assuming the custom save location is `./my_path`):
 
 ```bash
-paddlex --get_pipeline_config ts_classification --config_save_path ./my_path
+paddlex --get_pipeline_config ts_cls --config_save_path ./my_path
 ```
 
 After obtaining the pipeline configuration file, you can replace `--pipeline` with the configuration file save path to make the configuration file take effect. For example, if the configuration file save path is `./ts_ad.yaml`, simply execute:
 
 ```bash
-paddlex --pipeline ./ts_classification.yaml --input ts_cls.csv
+paddlex --pipeline ./ts_cls.yaml --input ts_cls.csv
 ```
 
 In this command, parameters such as `--model` and `--device` are not required to be specified, as they will use the parameters defined in the configuration file. If these parameters are specified, the specified values will take precedence.
@@ -90,7 +90,7 @@ A few lines of code can complete rapid inference for production lines. Taking th
 ```python
 from paddlex import create_pipeline
 
-pipeline = create_pipeline(pipeline="ts_classification")
+pipeline = create_pipeline(pipeline="ts_cls")
 
 output = pipeline.predict("ts_cls.csv")
 for res in output:
@@ -133,11 +133,11 @@ In the above Python script, the following steps are executed:
 
 If you have a configuration file, you can customize the configurations of the image anomaly detection pipeline by simply modifying the `pipeline` parameter in the `create_pipeline` method to the path of the pipeline configuration file.
 
-For example, if your configuration file is saved at `./my_path/ts_classification.yaml`, you only need to execute:
+For example, if your configuration file is saved at `./my_path/ts_cls.yaml`, you only need to execute:
 
 ```python
 from paddlex import create_pipeline
-pipeline = create_pipeline(pipeline="./my_path/ts_classification.yaml")
+pipeline = create_pipeline(pipeline="./my_path/ts_cls.yaml")
 output = pipeline.predict("ts_cls.csv")
 for res in output:
     res.print()  # Print the structured output of prediction
@@ -567,12 +567,12 @@ PaddleX supports various mainstream hardware devices such as NVIDIA GPUs, Kunlun
 For example, if you use an NVIDIA GPU for time series classification pipeline inference, the Python command is:
 
 ```bash
-paddlex --pipeline ts_classification --input ts_cls.csv --device gpu:0
+paddlex --pipeline ts_cls --input ts_cls.csv --device gpu:0
 ``````
 At this point, if you wish to switch the hardware to Ascend NPU, simply modify the `--device` flag in the Python command as follows:
 
 ```bash
-paddlex --pipeline ts_classification --input ts_cls.csv --device npu:0
+paddlex --pipeline ts_cls --input ts_cls.csv --device npu:0
 ```
 
 If you intend to use the General Time Series Classification Pipeline on a wider range of hardware, please refer to the [PaddleX Multi-Hardware Usage Guide](../../../other_devices_support/installation_other_devices_en.md).