@@ -281,6 +281,49 @@ class ExperimentConfig(BaseModel):
281281 )
282282
283283
284+ class OCICoordinates (BaseModel ):
285+ """OCI artifact coordinates for persistence."""
286+
287+ oci_host : str = Field (..., description = "OCI registry host (e.g., 'quay.io')" )
288+ oci_repository : str = Field (
289+ ..., description = "OCI repository (e.g., 'my-org/my-repo')"
290+ )
291+ oci_tag : str | None = Field (default = None , description = "OCI tag (e.g., 'eval-123')" )
292+ oci_subject : str | None = Field (
293+ default = None ,
294+ description = "Optional OCI subject identifier (in same registry and repo)" ,
295+ )
296+ annotations : dict [str , str ] = Field (
297+ default_factory = dict , description = "Custom annotations"
298+ )
299+
300+
301+ class OCIConnectionConfig (BaseModel ):
302+ """K8s connection configuration for OCI registry authentication."""
303+
304+ connection : str = Field (
305+ ...,
306+ description = "Name of a K8s Secret (type kubernetes.io/dockerconfigjson) for OCI registry auth" ,
307+ )
308+
309+
310+ class EvaluationExportsOCI (BaseModel ):
311+ """OCI export configuration for an evaluation job."""
312+
313+ coordinates : OCICoordinates = Field (..., description = "OCI artifact coordinates" )
314+ k8s : OCIConnectionConfig | None = Field (
315+ default = None , description = "K8s connection for OCI registry auth"
316+ )
317+
318+
319+ class EvaluationExports (BaseModel ):
320+ """Optional exports configuration for an evaluation job."""
321+
322+ oci : EvaluationExportsOCI | None = Field (
323+ default = None , description = "OCI export configuration"
324+ )
325+
326+
284327class JobSubmissionRequest (BaseModel ):
285328 """Request to submit an evaluation job.
286329
@@ -303,6 +346,10 @@ class JobSubmissionRequest(BaseModel):
303346 default = None ,
304347 description = "MLFlow experiment configuration. When provided, the evaluation job will be tracked in MLFlow." ,
305348 )
349+ exports : EvaluationExports | None = Field (
350+ default = None ,
351+ description = "Optional exports configuration (e.g., OCI artifact persistence)" ,
352+ )
306353
307354 @model_validator (mode = "after" )
308355 def check_benchmarks_or_collection (self ) -> "JobSubmissionRequest" :
@@ -344,6 +391,10 @@ class EvaluationJob(BaseModel):
344391 default = None ,
345392 description = "MLFlow experiment configuration" ,
346393 )
394+ exports : EvaluationExports | None = Field (
395+ default = None ,
396+ description = "Optional exports configuration" ,
397+ )
347398
348399 # Convenience properties to access nested fields
349400 @property
@@ -398,37 +449,6 @@ class EvaluationResponse(BaseModel):
398449 duration_seconds : float = Field (..., description = "Total evaluation time" )
399450
400451
401- class OCICoordinates (BaseModel ):
402- """OCI artifact coordinates for persistence."""
403-
404- oci_host : str = Field (
405- ..., description = "OCI registry host (e.g., 'quay.io')" , examples = ["quay.io" ]
406- )
407- oci_repository : str = Field (
408- ...,
409- description = "OCI repository (e.g., 'my-org/my-repo')" ,
410- examples = ["my-org/my-repo" ],
411- )
412- oci_tag : str | None = Field (
413- default = None , description = "OCI tag (e.g., 'eval-123')" , examples = ["eval-123" ]
414- )
415- oci_subject : str | None = Field (
416- default = None ,
417- description = "Optional OCI subject identifier (in same registry and repo)" ,
418- examples = ["quay.io/my-org/my-repo:model" ],
419- )
420- annotations : dict [str , str ] = Field (
421- default_factory = dict ,
422- description = "Custom annotations" ,
423- examples = [
424- {
425- "model" : "quay.io/my-org/my-repo:model" ,
426- "some" : "value" ,
427- }
428- ],
429- )
430-
431-
432452class EvaluationJobFilesLocation (BaseModel ):
433453 """Files location for persisting as OCI artifacts for an evaluation job."""
434454
0 commit comments