Skip to content

Commit 5795620

Browse files
committed
Fix search models
1 parent 5f49669 commit 5795620

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

superannotate/ml/ml_funcs.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def run_training(
283283
if isinstance(base_model, dict):
284284
base_model = base_model['name']
285285
models = search_models(
286-
include_global=True, name=base_model
286+
include_global=True, name=base_model,type_= project_type_str_to_int(types[0]), task=_MODEL_TRAINING_TASKS[task]
287287
)
288288
if not models:
289289
raise SABaseException(
@@ -301,11 +301,13 @@ def run_training(
301301
0,
302302
f"The type of provided projects is {project_type}, and does not correspond to the type of provided model"
303303
)
304+
304305
if not hyperparameters:
305-
hyperparameters = {}
306-
for item in DEFAULT_HYPERPARAMETERS:
307-
if item not in hyperparameters:
308-
hyperparameters[item] = DEFAULT_HYPERPARAMETERS[item]
306+
hyperparameters = DEFAULT_HYPERPARAMETERS
307+
else:
308+
for item in DEFAULT_HYPERPARAMETERS:
309+
if item not in hyperparameters:
310+
hyperparameters[item] = DEFAULT_HYPERPARAMETERS[item]
309311

310312
project_ids = [i['id'] for i in projects]
311313
completed_images_data = _get_completed_images_counts(project_ids)

0 commit comments

Comments
 (0)