Skip to content

Commit dff17b2

Browse files
Set default val_split to 0.2 for bundle trainer (#1118)
* set default val_split to 0.2 for bundle trainer Signed-off-by: tangy5 <[email protected]> * set default val_split to 0.2 for bundle trainer Signed-off-by: tangy5 <[email protected]> Signed-off-by: tangy5 <[email protected]> Co-authored-by: SACHIDANAND ALLE <[email protected]>
1 parent 2fddfbd commit dff17b2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

monailabel/tasks/train/bundle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def _partition_datalist(self, datalist, request, shuffle=False):
112112
datalist = [{"image": d["image"], "label": d["label"]} for d in datalist if d]
113113
logger.info(f"Total Records in Dataset: {len(datalist)}")
114114

115-
val_split = request.get("val_split", 0.0)
115+
val_split = request.get("val_split", 0.2)
116116
if val_split > 0.0:
117117
train_datalist, val_datalist = partition_dataset(
118118
datalist, ratios=[(1 - val_split), val_split], shuffle=shuffle

sample-apps/endoscopy/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,17 @@ export MONAI_LABEL_DATASTORE_PASSWORD=mypass
118118
monailabel start_server \
119119
--app workspace/endoscopy \
120120
--studies workspace/images \
121+
--conf models tooltracking \
121122
--conf epistemic_enabled true \
122-
--conf epistemic_top_k 3 \
123+
--conf epistemic_top_k 10 \
123124
--conf auto_finetune_models tooltracking \
124125
--conf auto_finetune_check_interval 30
125126
```
126127

128+
Note: the argument ```epistemic_top_k``` specifies the number of images to label in each iteration, provide a number above 5 if there is no externally provided validation data
129+
MONAI Label server will automatically split annotated data into train and validation by percentage. No external validation data and ```epistemic_top_k``` < 5 will lead to traning with no
130+
saved model.
131+
127132
#### Fetch and Publish latest model to CVAT/Nuclio
128133
After re-train the fine-tuned model meets all the conditions to be considered as a good model. You can push the model to cvat/nuclio function container.
129134
```bash

0 commit comments

Comments
 (0)