Skip to content

Commit

Permalink
새로운 모델 개발 model: efficientnet
Browse files Browse the repository at this point in the history
  • Loading branch information
duri-wip committed Oct 9, 2024
1 parent c00c5e1 commit df6f879
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/StageAlias.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,13 @@ def produce_alias(evaluation_metric):
print(model_uri)
mlflow.register_model(model_uri, name='Production',
tags={'model_name': model_name,'evaluation_metric': evaluation_metric})

final_version = client.search_model_versions("name='Production'")

if len(final_version) > 1:
print("운영 모델이 2개 이상입니다.")
else:
run_id = final_version[0].run_id
model_name = final_version[0].tags.get('model_name')
model_uri=f"runs:/{run_id}/{model_name}"
print(model_uri)

0 comments on commit df6f879

Please sign in to comment.