clearml-server/apiserver/apimodels/pipelines.py

22 lines
612 B
Python
Raw Normal View History

2022-03-15 14:28:59 +00:00
from jsonmodels import models, fields
2023-07-26 15:23:05 +00:00
from jsonmodels.validators import Length
2022-03-15 14:28:59 +00:00
from apiserver.apimodels import ListField
class Arg(models.Base):
name = fields.StringField(required=True)
value = fields.StringField(required=True)
2023-07-26 15:23:05 +00:00
class DeleteRunsRequest(models.Base):
project = fields.StringField(required=True)
ids = ListField([str], required=True, validators=[Length(1)])
2022-03-15 14:28:59 +00:00
class StartPipelineRequest(models.Base):
task = fields.StringField(required=True)
queue = fields.StringField(required=True)
args = ListField(Arg)
verify_watched_queue = fields.BoolField(default=False)