Schemas

class lumigator_schemas.datasets.DatasetDownloadResponse(*, id: UUID, download_urls: list[str])
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.datasets.DatasetFormat(value)
class lumigator_schemas.datasets.DatasetResponse(*, id: UUID, filename: str, format: DatasetFormat, size: int, ground_truth: bool, run_id: UUID | None, generated: bool | None, generated_by: str | None, created_at: datetime)
model_config: ClassVar[ConfigDict] = {'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.Job(*, type: str | None = None, submission_id: str | None = None, driver_info: str | None = None, status: ~lumigator_schemas.jobs.JobStatus, entrypoint: str | None = None, message: str | None = None, error_type: str | None = None, start_time: ~datetime.datetime | None = None, end_time: ~datetime.datetime | None = None, metadata: dict = <factory>, runtime_env: dict = <factory>, driver_agent_http_address: str | None = None, driver_node_id: str | None = None, driver_exit_code: int | None = None, id: ~uuid.UUID, name: str, description: str, created_at: ~datetime.datetime, experiment_id: ~uuid.UUID | None = None, updated_at: ~datetime.datetime | None = None)

Job represents the composition of JobResponse and JobSubmissionResponse.

JobSubmissionResponse was formerly returned from some /health/jobs related endpoints, while JobResponse was used by /jobs related endpoints.

The only conflicting field in the two schemas is β€˜status’ which is consistent in what it intends to represent, but uses different types (JobStatus/str).

The Job type has both id and submission_id which will contain the same data.

NOTE: Job is intended to reduce breaking changes experienced by the UI and other consumers. Tt was not conceived as a type that will be around for long, as the API needs to be refactored to better support experiments.

model_config: ClassVar[ConfigDict] = {'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobAnnotateConfig(*, job_type: Literal[JobType.ANNOTATION] = JobType.ANNOTATION, task: str | None = 'summarization', store_to_dataset: bool = False)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobAnnotateCreate(*, name: str, description: str = '', dataset: UUID, max_samples: int = -1, job_config: JobAnnotateConfig)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobConfig(*, job_id: UUID, job_type: JobType, command: str, args: dict[str, Any] | None = None)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobCreate(*, name: str, description: str = '', dataset: UUID, max_samples: int = -1, job_config: JobEvalConfig | JobInferenceConfig | JobAnnotateConfig)

Job configuration dealing exclusively with backend job handling

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobEvalConfig(*, job_type: Literal[JobType.EVALUATION] = JobType.EVALUATION, metrics: list[str] = ['meteor', 'rouge', 'bertscore'])
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobEvalCreate(*, name: str, description: str = '', dataset: UUID, max_samples: int = -1, job_config: JobEvalConfig)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobEvent(*, job_id: UUID, job_type: JobType, status: JobStatus, detail: str | None = None)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobInferenceConfig(*, job_type: Literal[JobType.INFERENCE] = JobType.INFERENCE, model: str, provider: str, task: str | None = 'summarization', accelerator: str | None = 'auto', revision: str | None = 'main', use_fast: bool = True, trust_remote_code: bool = False, torch_dtype: str = 'auto', base_url: str | None = None, system_prompt: str | None = None, output_field: str | None = 'predictions', max_tokens: int = 1024, frequency_penalty: float = 0.0, temperature: float = 1.0, top_p: float = 1.0, store_to_dataset: bool = False, max_new_tokens: int = 500)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobInferenceCreate(*, name: str, description: str = '', dataset: UUID, max_samples: int = -1, job_config: JobInferenceConfig)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobLogsResponse(*, logs: str | None = None)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobResponse(*, id: UUID, name: str, description: str, status: JobStatus, created_at: datetime, experiment_id: UUID | None = None, updated_at: datetime | None = None)
model_config: ClassVar[ConfigDict] = {'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobResultDownloadResponse(*, id: UUID, download_url: str)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobResultObject(*, metrics: dict | None = {}, parameters: dict | None = {}, artifacts: dict | None = {})

This is a very loose definition of what data should be stored in the output settings.S3_JOB_RESULTS_FILENAME. As long as a job result file only has the fields defined here, it should be accepted by the backend.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobResultResponse(*, id: UUID, job_id: UUID)
model_config: ClassVar[ConfigDict] = {'from_attributes': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobResults(*, id: UUID, metrics: list[dict[str, Any]] | None = None, parameters: list[dict[str, Any]] | None = None, metric_url: str, artifact_url: str)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

lumigator_schemas.jobs.JobSpecificConfig = lumigator_schemas.jobs.JobEvalConfig | lumigator_schemas.jobs.JobInferenceConfig | lumigator_schemas.jobs.JobAnnotateConfig

Job configuration dealing exclusively with the Ray jobs

class lumigator_schemas.jobs.JobStatus(value)
class lumigator_schemas.jobs.JobSubmissionResponse(*, type: str | None = None, submission_id: str | None = None, driver_info: str | None = None, status: str | None = None, entrypoint: str | None = None, message: str | None = None, error_type: str | None = None, start_time: ~datetime.datetime | None = None, end_time: ~datetime.datetime | None = None, metadata: dict = <factory>, runtime_env: dict = <factory>, driver_agent_http_address: str | None = None, driver_node_id: str | None = None, driver_exit_code: int | None = None)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.jobs.JobType(value)
class lumigator_schemas.jobs.LowercaseEnum(value)

Can be used to ensure that values for enums are returned in lowercase.

class lumigator_schemas.extras.DeploymentType(value)
class lumigator_schemas.extras.HealthResponse(*, status: str, deployment_type: DeploymentType)
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class lumigator_schemas.extras.ListingResponse(*, total: int, items: list[ItemType])
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].