27 lines
720 B
Python
27 lines
720 B
Python
from clearml import Task, OutputModel
|
|
|
|
# 1. ClearML Task 초기화
|
|
task = Task.init(
|
|
project_name='Person_Attribute_Recognition',
|
|
task_name='Register_Person_Attr_Model',
|
|
)
|
|
|
|
# 2. Person Attribute 모델(net_last.pth) 등록
|
|
print('Registering Person Attribute Model (net_last.pth)...')
|
|
model_person_attr = OutputModel(
|
|
task=task,
|
|
name='person_attr_net_last',
|
|
framework='PyTorch',
|
|
)
|
|
model_person_attr.update_weights(
|
|
weights_filename='net_last.pth',
|
|
auto_delete_file=False,
|
|
async_enable=False,
|
|
)
|
|
model_person_attr.publish()
|
|
|
|
# 3. 생성된 Model ID 출력 (Serving 엔드포인트 연결 시 사용)
|
|
print('-' * 30)
|
|
print(f'Person Attr Model ID: {model_person_attr.id}')
|
|
print('-' * 30)
|