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
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
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
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
class DatasetSchema(BaseSchema): uuid = UUID() name = fields.Str() description = fields.Str(allow_none=True) is_public = fields.Boolean() @staticmethod def schema_config(): return DatasetConfig
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
class ExperimentMetricSchema(BaseSchema): id = fields.Int() uuid = UUID() experiment = fields.Int() created_at = fields.LocalDateTime() values = fields.Dict() @staticmethod def schema_config(): return ExperimentMetricConfig
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
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
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
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
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
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
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
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