clearml-server/server/apimodels/models.py
allegroai 4f2564d33a Add Artifacts support, changed tags to system_tags and added user tags
Add hyper parameter sorting
Add min/max value for all time series metrics
2019-09-24 21:35:41 +03:00

45 lines
1.4 KiB
Python

from jsonmodels import models, fields
from six import string_types
from apimodels import ListField, DictField
from apimodels.base import UpdateResponse
from apimodels.tasks import PublishResponse as TaskPublishResponse
class CreateModelRequest(models.Base):
name = fields.StringField(required=True)
uri = fields.StringField(required=True)
labels = DictField(value_types=string_types+(int,), required=True)
tags = ListField(items_types=string_types)
system_tags = ListField(items_types=string_types)
comment = fields.StringField()
public = fields.BoolField(default=False)
project = fields.StringField()
parent = fields.StringField()
framework = fields.StringField()
design = DictField()
ready = fields.BoolField(default=True)
ui_cache = DictField()
task = fields.StringField()
class CreateModelResponse(models.Base):
id = fields.StringField(required=True)
created = fields.BoolField(required=True)
class PublishModelRequest(models.Base):
model = fields.StringField(required=True)
force_publish_task = fields.BoolField(default=False)
publish_task = fields.BoolField(default=True)
class ModelTaskPublishResponse(models.Base):
id = fields.StringField(required=True)
data = fields.EmbeddedField(TaskPublishResponse)
class PublishModelResponse(UpdateResponse):
published_task = fields.EmbeddedField(ModelTaskPublishResponse)
updated = fields.IntField()