qxmt.experiment.schema module

qxmt.experiment.schema module#

class qxmt.experiment.schema.ExperimentDB(*, name, desc, working_dirc, experiment_dirc, runs)

Bases: BaseModel

Parameters:
  • name (str)

  • desc (str)

  • working_dirc (Path)

  • experiment_dirc (Path)

  • runs (list[RunRecord])

desc: str
experiment_dirc: Path
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

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

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

model_fields: ClassVar[Dict[str, FieldInfo]] = {'desc': FieldInfo(annotation=str, required=True), 'experiment_dirc': FieldInfo(annotation=Path, required=True), 'name': FieldInfo(annotation=str, required=True), 'runs': FieldInfo(annotation=list[RunRecord], required=True), 'working_dirc': FieldInfo(annotation=Path, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

name: str
runs: list[RunRecord]
working_dirc: Path
class qxmt.experiment.schema.RunArtifact(*, run_id, dataset, model)

Bases: BaseModel

Parameters:
  • run_id (int)

  • dataset (Dataset)

  • model (BaseMLModel)

dataset: Dataset
model: BaseMLModel
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}

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

model_fields: ClassVar[Dict[str, FieldInfo]] = {'dataset': FieldInfo(annotation=Dataset, required=True), 'model': FieldInfo(annotation=BaseMLModel, required=True), 'run_id': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

run_id: int
class qxmt.experiment.schema.RunRecord(*, run_id, desc, execution_time, commit_id, config_path, evaluation)

Bases: BaseModel

Parameters:
  • run_id (int)

  • desc (str)

  • execution_time (str)

  • commit_id (str)

  • config_path (Path | str)

  • evaluation (dict[str, float])

commit_id: str
config_path: Path | str
desc: str
evaluation: dict[str, float]
execution_time: str
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}

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

model_fields: ClassVar[Dict[str, FieldInfo]] = {'commit_id': FieldInfo(annotation=str, required=True), 'config_path': FieldInfo(annotation=Union[Path, str], required=True), 'desc': FieldInfo(annotation=str, required=True), 'evaluation': FieldInfo(annotation=dict[str, float], required=True), 'execution_time': FieldInfo(annotation=str, required=True), 'run_id': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

run_id: int