Skip to main content

agentics_domain/models/challenge/
datasets.rs

1//! Dataset layout and benchmark visibility metadata.
2
3use serde::{Deserialize, Serialize};
4
5use crate::models::paths::BundleRelativePath;
6
7use super::serde_helpers::{required_nullable, required_nullable_schema};
8
9/// Dataset layout and visibility policy declared by a bundle.
10#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
11#[serde(deny_unknown_fields)]
12pub struct DatasetsSpec {
13    /// Directory containing data that agents may inspect and use for validation.
14    pub public_dir: BundleRelativePath,
15    /// Directory containing private benchmark data or private setup config used by official runs.
16    #[serde(deserialize_with = "required_nullable")]
17    #[schemars(
18        required,
19        schema_with = "required_nullable_schema::<BundleRelativePath>"
20    )]
21    pub private_benchmark_dir: Option<BundleRelativePath>,
22    /// Visibility policy for public validation case results.
23    pub public_policy: crate::models::evaluation::ScoreVisibility,
24    /// Visibility policy for private benchmark results.
25    pub private_benchmark_policy: PrivateBenchmarkPolicy,
26    /// Whether official runs can evaluate against private benchmark data.
27    pub private_benchmark_enabled: bool,
28}
29
30/// Public dataset metadata with private benchmark paths removed.
31#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
32#[serde(deny_unknown_fields)]
33pub struct PublicDatasetsSpec {
34    /// Directory containing data that agents may inspect and use for validation.
35    pub public_dir: BundleRelativePath,
36    /// Visibility policy for public validation case results.
37    pub public_policy: crate::models::evaluation::ScoreVisibility,
38    /// Visibility policy for private benchmark results.
39    pub private_benchmark_policy: PrivateBenchmarkPolicy,
40    /// Whether official runs can evaluate against private benchmark data.
41    pub private_benchmark_enabled: bool,
42}
43
44/// Visibility policy allowed for private benchmark results.
45#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
46#[serde(rename_all = "snake_case")]
47pub enum PrivateBenchmarkPolicy {
48    ScoreOnly,
49}