예제 #1
0
class NodeGPUSchema(BaseSchema):
    index = fields.Int()
    name = fields.Str()
    uuid = UUID()
    memory = fields.Int()
    serial = fields.Str()
    cluster_node = UUID()

    @staticmethod
    def schema_config():
        return NodeGPUConfig
예제 #2
0
class ProjectSchema(BaseSchema):
    id = fields.Int(allow_none=True)
    name = fields.Str(validate=validate.Regexp(regex=NAME_REGEX))
    user = fields.Str(validate=validate.Regexp(regex=NAME_REGEX), allow_none=True)
    owner = fields.Str(validate=validate.Regexp(regex=NAME_REGEX), allow_none=True)
    unique_name = fields.Str(allow_none=True)
    uuid = UUID(allow_none=True)
    description = fields.Str(allow_none=True)
    tags = fields.List(fields.Str(), allow_none=True)
    is_public = fields.Boolean(allow_none=True)
    has_code = fields.Bool(allow_none=True)
    created_at = fields.LocalDateTime(allow_none=True)
    updated_at = fields.LocalDateTime(allow_none=True)
    num_experiments = fields.Int(allow_none=True)
    num_independent_experiments = fields.Int(allow_none=True)
    num_experiment_groups = fields.Int(allow_none=True)
    num_jobs = fields.Int(allow_none=True)
    num_builds = fields.Int(allow_none=True)
    has_tensorboard = fields.Bool(allow_none=True)
    has_notebook = fields.Bool(allow_none=True)
    experiment_groups = fields.Nested(GroupSchema, many=True, allow_none=True)
    experiments = fields.Nested(ExperimentSchema, many=True, allow_none=True)

    @staticmethod
    def schema_config():
        return ProjectConfig
예제 #3
0
class BaseJobSchema(BaseSchema):
    id = fields.Int(allow_none=True)
    uuid = UUID(allow_none=True)
    unique_name = fields.Str(allow_none=True)
    pod_id = fields.Str(allow_none=True)
    name = fields.Str(validate=validate.Regexp(regex=NAME_REGEX),
                      allow_none=True)
    user = fields.Str(validate=validate.Regexp(regex=NAME_REGEX),
                      allow_none=True)
    project = fields.Str(allow_none=True)
    build_job = fields.Str(allow_none=True)
    description = fields.Str(allow_none=True)
    tags = fields.List(fields.Str(), allow_none=True)
    last_status = fields.Str(allow_none=True)
    created_at = fields.LocalDateTime(allow_none=True)
    updated_at = fields.LocalDateTime(allow_none=True)
    started_at = fields.LocalDateTime(allow_none=True)
    finished_at = fields.LocalDateTime(allow_none=True)
    total_run = fields.Str(allow_none=True)
    is_clone = fields.Bool(allow_none=True)
    content = fields.Str(allow_none=True)
    is_managed = fields.Bool(allow_none=True)
    ttl = fields.Int(allow_none=True)
    resources = fields.Nested(PodResourcesSchema, allow_none=True)
    definition = fields.Dict(allow_none=True)

    @staticmethod
    def schema_config():
        return BaseJobConfig
예제 #4
0
class ContainerResourcesSchema(BaseSchema):
    job_uuid = UUID()
    experiment_uuid = UUID()
    job_name = fields.Str()
    container_id = fields.Str()
    n_cpus = fields.Int()
    cpu_percentage = fields.Float()
    percpu_percentage = fields.List(fields.Float(), allow_none=True)
    memory_used = fields.Int()
    memory_limit = fields.Int()
    gpu_resources = fields.Nested(
        ContainerGPUResourcesSchema, many=True, allow_none=True
    )

    @staticmethod
    def schema_config():
        return ContainerResourcesConfig
예제 #5
0
class DatasetSchema(BaseSchema):
    uuid = UUID()
    name = fields.Str()
    description = fields.Str(allow_none=True)
    is_public = fields.Boolean()

    @staticmethod
    def schema_config():
        return DatasetConfig
예제 #6
0
class JobLabelSchema(BaseSchema):
    app = fields.Str(allow_none=True)
    project_name = fields.Str()
    experiment_group_name = fields.Str(allow_none=True)
    experiment_name = fields.Str(allow_none=True)
    job_name = fields.Str(allow_none=True)
    project_uuid = UUID()
    experiment_group_uuid = UUID(allow_none=True)
    experiment_uuid = UUID(allow_none=True)
    job_uuid = UUID(allow_none=True)
    task_type = fields.Str(allow_none=True)
    task_idx = fields.Str(allow_none=True)
    role = fields.Str()
    type = fields.Str()

    @staticmethod
    def schema_config():
        return JobLabelConfig
예제 #7
0
class ExperimentMetricSchema(BaseSchema):
    id = fields.Int()
    uuid = UUID()
    experiment = fields.Int()
    created_at = fields.LocalDateTime()
    values = fields.Dict()

    @staticmethod
    def schema_config():
        return ExperimentMetricConfig
예제 #8
0
class DataSchema(BaseSchema):
    uuid = UUID()
    name = fields.Str()
    created_at = fields.LocalDateTime()
    description = fields.Str(allow_none=True)
    details = fields.Nested(DataDetailsSchema)
    version = fields.Str(allow_none=True)
    resource_id = fields.Str(allow_none=True)

    @staticmethod
    def schema_config():
        return DataConfig
예제 #9
0
class GroupStatusSchema(BaseSchema):
    id = fields.Int()
    uuid = UUID()
    experiment_group = fields.Int()
    created_at = fields.LocalDateTime()
    status = fields.Str()
    message = fields.Str(allow_none=True)
    details = fields.Dict(allow_none=True)

    @staticmethod
    def schema_config():
        return GroupStatusConfig
예제 #10
0
class ExperimentStatusSchema(BaseSchema):
    id = fields.Int()
    uuid = UUID()
    experiment = fields.Int()
    created_at = fields.LocalDateTime()
    status = fields.Str()
    message = fields.Str(allow_none=True)
    traceback = fields.Str(allow_none=True)

    @staticmethod
    def schema_config():
        return ExperimentStatusConfig
예제 #11
0
class JobStatusSchema(BaseSchema):
    id = fields.Int()
    uuid = UUID()
    job = fields.Int()
    created_at = fields.LocalDateTime()
    status = fields.Str()
    message = fields.Str(allow_none=True)
    traceback = fields.Str(allow_none=True)
    details = fields.Dict(allow_none=True)

    @staticmethod
    def schema_config():
        return JobStatusConfig
예제 #12
0
class ExperimentJobSchema(BaseSchema):
    id = fields.Int(allow_none=True)
    uuid = UUID()
    unique_name = fields.Str(allow_none=True)
    pod_id = fields.Str(allow_none=True)
    role = fields.Str(allow_none=True)
    experiment = fields.Int()
    experiment_name = fields.Str()
    last_status = fields.Str(allow_none=True)
    created_at = fields.LocalDateTime()
    updated_at = fields.LocalDateTime()
    started_at = fields.LocalDateTime(allow_none=True)
    finished_at = fields.LocalDateTime(allow_none=True)
    total_run = fields.Str(allow_none=True)
    resources = fields.Nested(PodResourcesSchema, allow_none=True)
    definition = fields.Dict(allow_none=True)

    @staticmethod
    def schema_config():
        return ExperimentJobConfig
예제 #13
0
class ClusterNodeSchema(BaseSchema):
    sequence = fields.Int(allow_none=True)
    name = fields.Str(allow_none=True)
    uuid = UUID()
    status = fields.Str(allow_none=True)
    hostname = fields.Str(allow_none=True)
    role = fields.Str(allow_none=True)
    memory = fields.Int(allow_none=True)
    cpu = fields.Float(allow_none=True)
    n_gpus = fields.Int(allow_none=True)
    kubelet_version = fields.Str(allow_none=True)
    docker_version = fields.Str(allow_none=True)
    os_image = fields.Str(allow_none=True)
    kernel_version = fields.Str(allow_none=True)
    schedulable_taints = fields.Bool(allow_none=True)
    schedulable_state = fields.Bool(allow_none=True)
    gpus = fields.Nested(NodeGPUSchema, many=True, allow_none=True)

    @staticmethod
    def schema_config():
        return ClusterNodeConfig
예제 #14
0
class GroupSchema(BaseSchema):
    id = fields.Int(allow_none=True)
    uuid = UUID(allow_none=True)
    name = fields.Str(validate=validate.Regexp(regex=NAME_REGEX),
                      allow_none=True)
    unique_name = fields.Str(allow_none=True)
    user = fields.Str(validate=validate.Regexp(regex=NAME_REGEX),
                      allow_none=True)
    project = fields.Str(allow_none=True)
    description = fields.Str(allow_none=True)
    content = fields.Str(allow_none=True)
    group_type = fields.Str(allow_none=True)
    search_algorithm = fields.Str(allow_none=True)
    tags = fields.List(fields.Str(), allow_none=True)
    created_at = fields.LocalDateTime(allow_none=True)
    updated_at = fields.LocalDateTime(allow_none=True)
    started_at = fields.LocalDateTime(allow_none=True)
    finished_at = fields.LocalDateTime(allow_none=True)
    total_run = fields.Str(allow_none=True)
    concurrency = fields.Int(allow_none=True)
    num_experiments = fields.Int(allow_none=True)
    num_scheduled_experiments = fields.Int(allow_none=True)
    num_pending_experiments = fields.Int(allow_none=True)
    num_running_experiments = fields.Int(allow_none=True)
    num_succeeded_experiments = fields.Int(allow_none=True)
    num_failed_experiments = fields.Int(allow_none=True)
    num_stopped_experiments = fields.Int(allow_none=True)
    last_status = fields.Str(allow_none=True)
    has_tensorboard = fields.Bool(allow_none=True)
    backend = fields.Str(allow_none=True)
    is_managed = fields.Bool(allow_none=True)
    experiments = fields.Nested(ExperimentSchema, many=True, allow_none=True)

    @staticmethod
    def schema_config():
        return GroupConfig
예제 #15
0
class ExperimentSchema(BaseSchema):
    id = fields.Int(allow_none=True)
    uuid = UUID(allow_none=True)
    unique_name = fields.Str(allow_none=True)
    user = fields.Str(validate=validate.Regexp(regex=NAME_REGEX),
                      allow_none=True)
    name = fields.Str(validate=validate.Regexp(regex=NAME_REGEX),
                      allow_none=True)
    project = fields.Str(allow_none=True)
    experiment_group = fields.Str(allow_none=True)
    build_job = fields.Str(allow_none=True)
    description = fields.Str(allow_none=True)
    last_status = fields.Str(allow_none=True)
    last_metric = fields.Dict(allow_none=True)
    backend = fields.Str(allow_none=True)
    framework = fields.Str(allow_none=True)
    created_at = fields.LocalDateTime(allow_none=True)
    updated_at = fields.LocalDateTime(allow_none=True)
    started_at = fields.LocalDateTime(allow_none=True)
    finished_at = fields.LocalDateTime(allow_none=True)
    total_run = fields.Str(allow_none=True)
    is_clone = fields.Bool(allow_none=True)
    has_tensorboard = fields.Bool(allow_none=True)
    content = fields.Str(allow_none=True)
    num_jobs = fields.Int(allow_none=True)
    params = fields.Dict(allow_none=True)
    tags = fields.List(fields.Str(), allow_none=True)
    resources = fields.Nested(PodResourcesSchema, allow_none=True)
    run_env = fields.Dict(allow_none=True)
    is_managed = fields.Bool(allow_none=True)
    ttl = fields.Int(allow_none=True)
    jobs = fields.Nested(ExperimentJobSchema, many=True, allow_none=True)

    @staticmethod
    def schema_config():
        return ExperimentConfig