Skip to content

Commit 0ae325a

Browse files
author
Preetam Joshi
committed
Fixing model creation bug in evaluate
1 parent f21961b commit 0ae325a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

aimon/decorators/evaluate.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,13 @@ def evaluate(
226226
if not headers:
227227
raise ValueError("Headers must be a non-empty list")
228228

229+
am_model = client.models.create(
230+
name=model.name,
231+
type=model.model_type,
232+
description="This model is named {} and is of type {}".format(model.name, model.model_type),
233+
metadata=model.metadata
234+
)
235+
229236
# Create application and models
230237
am_app = client.applications.create(
231238
name=application.name,
@@ -235,13 +242,6 @@ def evaluate(
235242
metadata=application.metadata
236243
)
237244

238-
am_model = client.models.create(
239-
name=model.name,
240-
type=model.model_type,
241-
description="This model is named {} and is of type {}".format(model.name, model.model_type),
242-
metadata=model.metadata
243-
)
244-
245245
# Create or retrieve the dataset collection
246246
am_dataset_collection = client.datasets.collection.retrieve(name=dataset_collection_name)
247247

0 commit comments

Comments
 (0)