graflag.models
Data models for GraFlag API responses.
- class graflag.models.ClusterInfo(manager_ip: str, is_connected: bool, swarm_initialized: bool, worker_nodes: Dict[str, str]]=<factory>, shared_dir: str = '', shared_contents: List[str] = <factory>, services: List[Dict] = <factory>, error: str | None = None)[source]
Bases:
objectCluster status information.
- manager_ip: str
- is_connected: bool
- swarm_initialized: bool
- worker_nodes: List[Dict[str, str]]
- services: List[Dict]
- error: str | None = None
- class graflag.models.MethodInfo(name: str, description: str = '', source_code: str = '', integration: str = '', image: str = '', supported_data: str = '', parameters: Dict[str, ~typing.Any]=<factory>, has_dockerfile: bool = False, has_env: bool = False)[source]
Bases:
objectMethod metadata.
- name: str
- description: str = ''
- source_code: str = ''
- integration: str = ''
upstream(the image runs the authors’ implementation) orreimplementation(this repository’s code, written from the paper). Empty for a method whose.envpredates the key – rendered as “unstated”, which is what it is, rather than assumed to be either.
- image: str = ''
The shared image this method builds from, from
IMAGE=in its.env. Empty when the method builds its own – which is the common case; the seventeenbond_*methods sharebond_base.
- supported_data: str = ''
- parameters: Dict[str, Any]
- has_dockerfile: bool = False
- has_env: bool = False
- class graflag.models.DatasetInfo(name: str, path: str = '', size_mb: float = 0.0, file_count: int = 0)[source]
Bases:
objectDataset metadata.
- name: str
- path: str = ''
- size_mb: float = 0.0
- file_count: int = 0
- class graflag.models.ExperimentInfo(name: str, method: str, dataset: str, timestamp: str, status: str, has_results: bool = False, has_evaluation: bool = False, results_path: str | None = None, evaluation_path: str | None = None, service_name: str | None = None)[source]
Bases:
objectExperiment metadata and status.
- name: str
- method: str
- dataset: str
- timestamp: str
- status: str
- has_results: bool = False
- has_evaluation: bool = False
- results_path: str | None = None
- evaluation_path: str | None = None
- service_name: str | None = None
- class graflag.models.ExperimentResults(experiment_name: str, method_name: str, dataset: str, metadata: Dict[str, ~typing.Any]=<factory>, execution_time_ms: float | None = None, peak_memory_mb: float | None = None, peak_gpu_memory_mb: float | None = None, result_type: str | None = None, scores_available: bool = False)[source]
Bases:
objectParsed experiment results.
- experiment_name: str
- method_name: str
- dataset: str
- metadata: Dict[str, Any]
- execution_time_ms: float | None = None
- peak_memory_mb: float | None = None
- peak_gpu_memory_mb: float | None = None
- result_type: str | None = None
- scores_available: bool = False
- class graflag.models.EvaluationResults(experiment_name: str, metrics: Dict[str, float]=<factory>, plots_available: List[str] = <factory>, evaluation_path: str | None = None)[source]
Bases:
objectParsed evaluation results.
- experiment_name: str
- metrics: Dict[str, float]
- plots_available: List[str]
- evaluation_path: str | None = None
- class graflag.models.ServiceCleanupResult(experiment: str, removed: bool, reason: str)[source]
Bases:
objectOutcome of considering one finished service for removal.
- experiment: str
- removed: bool
- reason: str
- class graflag.models.ClearItem(kind: str, name: str, reason: str, size_bytes: int = 0, removed: bool = False)[source]
Bases:
objectOne thing graflag clear considered removing, and why.
Every candidate is reported whether or not it was removed, so a dry run and an applied run print the same rows – the difference is removed.
- kind: str
experiment | dataset | image | registry | stray
- name: str
- reason: str
The evidence for the verdict, in the words the report prints.
- size_bytes: int = 0
Bytes on disk, 0 when not measured (registry repos before a GC).
- removed: bool = False
- class graflag.models.ClearReport(applied: bool, items: List[ClearItem] = <factory>, freed_bytes: int = 0, errors: List[str] = <factory>, registry_collected: bool = False)[source]
Bases:
objectWhat graflag clear found, and what it did about it.
- applied: bool
False for a dry run – nothing was removed.
- freed_bytes: int = 0
Bytes actually reclaimed. 0 on a dry run; on an applied run this is the sum over removed items, which for the registry counts only what a garbage collection actually freed, not the manifests deleted before it.
- errors: List[str]
a failure to remove one item must not abort the sweep or fail the caller.
- Type:
Non-fatal problems. Clearing is housekeeping
- registry_collected: bool = False
True when registry blobs were collected, which needs the registry stopped – see core.clear.
- class graflag.models.RunProgress(experiment_name: str, status: str, message: str = '', log_lines: List[str] = <factory>)[source]
Bases:
objectProgress information for run execution.
- experiment_name: str
- status: str
- message: str = ''
- log_lines: List[str]
- class graflag.models.VerificationReport(experiment_name: str, findings: Dict[str, str]]=<factory>, failed: int = 0, warned: int = 0, passed: int = 0, probe: Dict[str, ~typing.Any]=<factory>)[source]
Bases:
objectWhat graflag verify found in one experiment (see graflag.verify).
- experiment_name: str
- findings: List[Dict[str, str]]
…} per check, in the order they ran.
- Type:
One {“level”
- Type:
“ERROR” | “WARN” | “OK”, “message”
- failed: int = 0
- warned: int = 0
- passed: int = 0
- probe: Dict[str, Any]
counts, the reported and evaluated AUCs, the declared split. Never the scores themselves.
- Type:
The probe summary the findings were drawn from
- property ok: bool
True when no check failed. Warnings do not fail an experiment.