Skip to content

Commit beb807b

Browse files
authored
Revert TrainType typo (#1928)
* Fix Conflict * Fix conflict * Fix unit-tests * Fix cli tests * Fix cli tests * Fix type
1 parent 12e145c commit beb807b

File tree

76 files changed

+200
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+200
-198
lines changed

docs/source/guide/explanation/algorithms/classification/multi_class_classification.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Unlike other tasks, ``--val-data-root`` is not needed.
206206
$ otx train otx/algorithms/classification/configs/efficientnet_b0_cls_incr/template.yaml \
207207
--train-data-root=tests/assets/imagenet_dataset_class_incremental \
208208
params \
209-
--algo_backend.train_type=SELFSUPERVISED
209+
--algo_backend.train_type=Selfsupervised
210210
211211
After self-supervised training, pretrained weights can be use for supervised (incremental) learning like the below command:
212212

docs/source/guide/explanation/algorithms/segmentation/semantic_segmentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ To enable self-supervised training, the command below can be executed:
165165
$ otx train otx/algorithms/segmentation/configs/ocr_lite_hrnet_s_mod2/template.yaml \
166166
--train-data-roots=tests/assets/common_semantic_segmentation_dataset/train/images \
167167
params \
168-
--algo_backend.train_type=SELFSUPERVISED
168+
--algo_backend.train_type=Selfsupervised
169169
170170
After self-supervised training, pretrained weights can be use for supervised (incremental) learning like the below command:
171171

docs/source/guide/get_started/quick_start_guide/cli_commands.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Building workspace folder
9292
Comma-separated paths to unlabeled file list
9393
--task TASK The currently supported options: ('CLASSIFICATION', 'DETECTION', 'INSTANCE_SEGMENTATION', 'SEGMENTATION', 'ACTION_CLASSIFICATION', 'ACTION_DETECTION', 'ANOMALY_CLASSIFICATION', 'ANOMALY_DETECTION', 'ANOMALY_SEGMENTATION').
9494
--train-type TRAIN_TYPE
95-
The currently supported options: dict_keys(['INCREMENTAL', 'SEMISUPERVISED', 'SELFSUPERVISED']).
95+
The currently supported options: dict_keys(['Incremental', 'Semisupervised', 'Selfsupervised']).
9696
--work-dir WORK_DIR Location where the workspace.
9797
--model MODEL Enter the name of the model you want to use. (Ex. EfficientNet-B0).
9898
--backbone BACKBONE Available Backbone Type can be found using 'otx find --backbone {framework}'.
@@ -181,7 +181,7 @@ However, if you created a workspace with ``otx build``, the training process can
181181
--unlabeled-file-list UNLABELED_FILE_LIST
182182
Comma-separated paths to unlabeled file list
183183
--train-type TRAIN_TYPE
184-
The currently supported options: dict_keys(['INCREMENTAL', 'SEMISUPERVISED', 'SELFSUPERVISED']).
184+
The currently supported options: dict_keys(['Incremental', 'Semisupervised', 'Selfsupervised']).
185185
--load-weights LOAD_WEIGHTS
186186
Load model weights from previously saved checkpoint.
187187
--resume-from RESUME_FROM

docs/source/guide/tutorials/advanced/self_sl.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,23 @@ for **self-supervised learning** by running the following command:
6464

6565
.. code-block::
6666
67-
(otx) ...$ otx build --train-data-roots data/flower_photos --model MobileNet-V3-large-1x --train-type SELFSUPERVISED --work-dir otx-workspace-CLASSIFICATION-SELFSUPERVISED
67+
(otx) ...$ otx build --train-data-roots data/flower_photos --model MobileNet-V3-large-1x --train-type Selfsupervised --work-dir otx-workspace-CLASSIFICATION-Selfsupervised
6868
69-
[*] Workspace Path: otx-workspace-CLASSIFICATION-SELFSUPERVISED
69+
[*] Workspace Path: otx-workspace-CLASSIFICATION-Selfsupervised
7070
[*] Load Model Template ID: Custom_Image_Classification_MobileNet-V3-large-1x
71-
[*] Load Model Name: MobileNet-V3-large-1x[*] - Updated: otx-workspace-CLASSIFICATION-SELFSUPERVISED/selfsl/model.py
72-
[*] - Updated: otx-workspace-CLASSIFICATION-SELFSUPERVISED/selfsl/data_pipeline.py
73-
[*] - Updated: otx-workspace-CLASSIFICATION-SELFSUPERVISED/deployment.py
74-
[*] - Updated: otx-workspace-CLASSIFICATION-SELFSUPERVISED/hpo_config.yaml
75-
[*] - Updated: otx-workspace-CLASSIFICATION-SELFSUPERVISED/model_hierarchical.py
76-
[*] - Updated: otx-workspace-CLASSIFICATION-SELFSUPERVISED/model_multilabel.py
77-
[*] Update data configuration file to: otx-workspace-CLASSIFICATION-SELFSUPERVISED/data.yaml
71+
[*] Load Model Name: MobileNet-V3-large-1x[*] - Updated: otx-workspace-CLASSIFICATION-Selfsupervised/selfsl/model.py
72+
[*] - Updated: otx-workspace-CLASSIFICATION-Selfsupervised/selfsl/data_pipeline.py
73+
[*] - Updated: otx-workspace-CLASSIFICATION-Selfsupervised/deployment.py
74+
[*] - Updated: otx-workspace-CLASSIFICATION-Selfsupervised/hpo_config.yaml
75+
[*] - Updated: otx-workspace-CLASSIFICATION-Selfsupervised/model_hierarchical.py
76+
[*] - Updated: otx-workspace-CLASSIFICATION-Selfsupervised/model_multilabel.py
77+
[*] Update data configuration file to: otx-workspace-CLASSIFICATION-Selfsupervised/data.yaml
7878
7979
.. note::
8080

8181
Three things must be considered to set the workspace for self-supervised learning:
8282

83-
1. add ``--train-type SELFSUPERVISED`` in the command to get the training components for self-supervised learning,
83+
1. add ``--train-type Selfsupervised`` in the command to get the training components for self-supervised learning,
8484
2. update the path set as ``train-data-roots``,
8585
3. and add ``--work-dir`` to distinguish self-supervised learning workspace from supervised learning workspace.
8686

@@ -102,7 +102,7 @@ After the workspace creation, the workspace structure is as follows:
102102
│   ├── train
103103
│   └── val
104104
└── template.yaml
105-
otx-workspace-CLASSIFICATION-SELFSUPERVISED
105+
otx-workspace-CLASSIFICATION-Selfsupervised
106106
├── configuration.yaml
107107
├── data.yaml
108108
├── deployment.py
@@ -121,20 +121,20 @@ After the workspace creation, the workspace structure is as follows:
121121
For `VOC2012 dataset <http://host.robots.ox.ac.uk/pascal/VOC/voc2012>`_ used in :doc:`semantic segmentation tutorial <../base/how_to_train/semantic_segmentation>`, for example, the path ``data/VOCdevkit/VOC2012/JPEGImages`` must be set instead of ``data/VOCdevkit/VOC2012``.
122122

123123
Please refer to :ref:`Explanation of Self-Supervised Learning for Semantic Segmentation <selfsl_semantic_segmentation>`.
124-
And don't forget to add ``--train-type SELFSUPERVISED``.
124+
And don't forget to add ``--train-type Selfsupervised``.
125125

126126
.. code-block::
127127
128128
(otx) ...$ otx build --train-data-roots data/VOCdevkit/VOC2012/JPEGImages \
129129
--model Lite-HRNet-18-mod2 \
130-
--train-type SELFSUPERVISED
130+
--train-type Selfsupervised
131131
132132
4. To start training we need to call ``otx train``
133133
command in **self-supervised learning** workspace:
134134

135135
.. code-block::
136136
137-
(otx) ...$ cd otx-workspace-CLASSIFICATION-SELFSUPERVISED
137+
(otx) ...$ cd otx-workspace-CLASSIFICATION-Selfsupervised
138138
(otx) ...$ otx train --data ../otx-workspace-CLASSIFICATION/data.yaml
139139
140140
...
@@ -168,7 +168,7 @@ After pre-training progress, start fine-tuning by calling the below command with
168168
.. code-block::
169169
170170
(otx) ...$ cd ../otx-workspace-CLASSIFICATION
171-
(otx) ...$ otx train --load-weights ../otx-workspace-CLASSIFICATION-SELFSUPERVISED/models/weights.pth
171+
(otx) ...$ otx train --load-weights ../otx-workspace-CLASSIFICATION-Selfsupervised/models/weights.pth
172172
173173
...
174174

docs/source/guide/tutorials/advanced/semi_sl.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Enable via ``otx build``
7373
1. To enable semi-supervsied learning via ``otx build``, we need to add arguments ``--unlabeled-data-roots`` and ``--train-type``.
7474
OpenVINO™ Training Extensions receives the root path where unlabeled images are by ``--unlabeled-data-roots``.
7575

76-
We should put the path where unlabeled data are contained. It also provides us ``--train-type`` to select the type of training scheme. All we have to do for that is specifying it as **SEMISUPERVISED**.
76+
We should put the path where unlabeled data are contained. It also provides us ``--train-type`` to select the type of training scheme. All we have to do for that is specifying it as **Semisupervised**.
7777

7878
.. note::
7979

@@ -85,7 +85,7 @@ We should put the path where unlabeled data are contained. It also provides us `
8585

8686
.. code-block::
8787
88-
(otx) ...$ otx build --train-data-roots data/flower_photos --unlabeled-data-roots tests/assets/imagenet_dataset --model MobileNet-V3-large-1x --train-type SEMISUPERVISED
88+
(otx) ...$ otx build --train-data-roots data/flower_photos --unlabeled-data-roots tests/assets/imagenet_dataset --model MobileNet-V3-large-1x --train-type Semisupervised
8989
9090
9191
[*] Workspace Path: otx-workspace-CLASSIFICATION
@@ -107,14 +107,14 @@ command in our workspace:
107107
108108
(otx) ...$ otx train
109109
110-
In the train log, you can check that the train type is set to **SEMISUPERVISED** and related configurations are properly loaded as following:
110+
In the train log, you can check that the train type is set to **Semisupervised** and related configurations are properly loaded as following:
111111

112112
.. code-block::
113113
114114
...
115115
2023-02-22 06:21:54,492 | INFO : called _init_recipe()
116-
2023-02-22 06:21:54,492 | INFO : train type = SEMISUPERVISED
117-
2023-02-22 06:21:54,492 | INFO : train type = SEMISUPERVISED - loading training_extensions/otx/recipes/stages/classification/semisl.yaml
116+
2023-02-22 06:21:54,492 | INFO : train type = Semisupervised
117+
2023-02-22 06:21:54,492 | INFO : train type = Semisupervised - loading training_extensions/otx/recipes/stages/classification/semisl.yaml
118118
2023-02-22 06:21:54,500 | INFO : Replacing runner from EpochRunnerWithCancel to EpochRunnerWithCancel.
119119
2023-02-22 06:21:54,503 | INFO : initialized recipe = training_extensions/otx/recipes/stages/classification/semisl.yaml
120120
...
@@ -135,16 +135,16 @@ which is one of template-specific parameters (details are provided in `quick sta
135135
(otx) ...$ otx train otx/algorithms/classification/configs/mobilenet_v3_large_1_cls_incr/template.yaml \
136136
--train-data-roots data/flower_photos \
137137
--unlabeled-data-roots tests/assets/imagenet_dataset \
138-
params --algo_backend.train_type SEMISUPERVISED
138+
params --algo_backend.train_type Semisupervised
139139
140-
In the train log, you can check that the train type is set to **SEMISUPERVISED** and related configurations are properly loaded as following:
140+
In the train log, you can check that the train type is set to **Semisupervised** and related configurations are properly loaded as following:
141141

142142
.. code-block::
143143
144144
...
145145
2023-02-22 06:21:54,492 | INFO : called _init_recipe()
146-
2023-02-22 06:21:54,492 | INFO : train type = SEMISUPERVISED
147-
2023-02-22 06:21:54,492 | INFO : train type = SEMISUPERVISED - loading training_extensions/otx/recipes/stages/classification/semisl.yaml
146+
2023-02-22 06:21:54,492 | INFO : train type = Semisupervised
147+
2023-02-22 06:21:54,492 | INFO : train type = Semisupervised - loading training_extensions/otx/recipes/stages/classification/semisl.yaml
148148
2023-02-22 06:21:54,500 | INFO : Replacing runner from EpochRunnerWithCancel to EpochRunnerWithCancel.
149149
2023-02-22 06:21:54,503 | INFO : initialized recipe = training_extensions/otx/recipes/stages/classification/semisl.yaml
150150
...

otx/algorithms/action/configs/classification/configuration.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,20 +245,20 @@ algo_backend:
245245
header: Algo backend parameters
246246
train_type:
247247
affects_outcome_of: NONE
248-
default_value: INCREMENTAL
248+
default_value: Incremental
249249
description: Quantization preset that defines quantization scheme
250250
editable: false
251251
enum_name: TrainType
252252
header: Train type
253253
options:
254-
INCREMENTAL: "INCREMENTAL"
254+
Incremental: "Incremental"
255255
type: SELECTABLE
256256
ui_rules:
257257
action: DISABLE_EDITING
258258
operator: AND
259259
rules: []
260260
type: UI_RULES
261-
value: INCREMENTAL
261+
value: Incremental
262262
visible_in_ui: True
263263
warning: null
264264
mem_cache_size:

otx/algorithms/action/configs/classification/movinet/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ hyper_parameters:
4545
default_value: 1.0
4646
algo_backend:
4747
train_type:
48-
default_value: INCREMENTAL
48+
default_value: Incremental
4949

5050
# Training resources.
5151
max_nodes: 1

otx/algorithms/action/configs/classification/x3d/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ hyper_parameters:
4545
default_value: 1.0
4646
algo_backend:
4747
train_type:
48-
default_value: INCREMENTAL
48+
default_value: Incremental
4949

5050
# Training resources.
5151
max_nodes: 1

otx/algorithms/action/configs/detection/configuration.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,20 +245,20 @@ algo_backend:
245245
header: Algo backend parameters
246246
train_type:
247247
affects_outcome_of: NONE
248-
default_value: INCREMENTAL
248+
default_value: Incremental
249249
description: Quantization preset that defines quantization scheme
250250
editable: false
251251
enum_name: TrainType
252252
header: Train type
253253
options:
254-
INCREMENTAL: "INCREMENTAL"
254+
Incremental: "Incremental"
255255
type: SELECTABLE
256256
ui_rules:
257257
action: DISABLE_EDITING
258258
operator: AND
259259
rules: []
260260
type: UI_RULES
261-
value: INCREMENTAL
261+
value: Incremental
262262
visible_in_ui: True
263263
warning: null
264264
mem_cache_size:

otx/algorithms/action/configs/detection/x3d_fast_rcnn/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ hyper_parameters:
4545
default_value: 1.0
4646
algo_backend:
4747
train_type:
48-
default_value: INCREMENTAL
48+
default_value: Incremental
4949

5050
# Training resources.
5151
max_nodes: 1

0 commit comments

Comments
 (0)