Commit 6ca950f 1 parent c62198e commit 6ca950f Copy full SHA for 6ca950f
File tree 1 file changed +11
-1
lines changed
dagshub_annotation_converter/converters
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,19 @@ def export_to_fs(
193
193
with open (annotation_filename , "w" ) as f :
194
194
f .write (annotation_content )
195
195
196
- context . train_path , context . val_path , context . test_path = _guess_train_val_test_split (
196
+ guessed_train_path , guessed_val_path , guessed_test_path = _guess_train_val_test_split (
197
197
list (grouped_annotations .keys ())
198
198
)
199
+
200
+ # Don't accidentally override with Nones. If we find Nones, then assume YOLO should train on the whole dataset
201
+ if guessed_train_path is not None :
202
+ context .train_path = guessed_train_path
203
+
204
+ if guessed_val_path is not None :
205
+ context .val_path = guessed_val_path
206
+
207
+ context .test_path = guessed_test_path
208
+
199
209
yaml_file_path = export_path / meta_file
200
210
with open (yaml_file_path , "w" ) as yaml_f :
201
211
yaml_f .write (context .get_yaml_content ())
You can’t perform that action at this time.
0 commit comments