qxmt.datasets.schema module

qxmt.datasets.schema module#

class qxmt.datasets.schema.Dataset(*, X_train, y_train, X_val, y_val, X_test, y_test, config)

Bases: BaseModel

Parameters:
  • X_train (Annotated[ndarray, PlainValidator(func=~qxmt.datasets.schema.validate, json_schema_input_type=~typing.Any), PlainSerializer(func=~qxmt.datasets.schema.serialize, return_type=PydanticUndefined, when_used=always)])

  • y_train (Annotated[ndarray, PlainValidator(func=~qxmt.datasets.schema.validate, json_schema_input_type=~typing.Any), PlainSerializer(func=~qxmt.datasets.schema.serialize, return_type=PydanticUndefined, when_used=always)])

  • X_val (Annotated[ndarray, PlainValidator(func=~qxmt.datasets.schema.validate, json_schema_input_type=~typing.Any), PlainSerializer(func=~qxmt.datasets.schema.serialize, return_type=PydanticUndefined, when_used=always)] | None)

  • y_val (Annotated[ndarray, PlainValidator(func=~qxmt.datasets.schema.validate, json_schema_input_type=~typing.Any), PlainSerializer(func=~qxmt.datasets.schema.serialize, return_type=PydanticUndefined, when_used=always)] | None)

  • X_test (Annotated[ndarray, PlainValidator(func=~qxmt.datasets.schema.validate, json_schema_input_type=~typing.Any), PlainSerializer(func=~qxmt.datasets.schema.serialize, return_type=PydanticUndefined, when_used=always)])

  • y_test (Annotated[ndarray, PlainValidator(func=~qxmt.datasets.schema.validate, json_schema_input_type=~typing.Any), PlainSerializer(func=~qxmt.datasets.schema.serialize, return_type=PydanticUndefined, when_used=always)])

  • config (DatasetConfig)

X_test: Annotated[ndarray, PlainValidator(func=validate, json_schema_input_type=Any), PlainSerializer(func=serialize, return_type=PydanticUndefined, when_used=always)]
X_train: Annotated[ndarray, PlainValidator(func=validate, json_schema_input_type=Any), PlainSerializer(func=serialize, return_type=PydanticUndefined, when_used=always)]
X_val: Annotated[ndarray, PlainValidator(func=validate, json_schema_input_type=Any), PlainSerializer(func=serialize, return_type=PydanticUndefined, when_used=always)] | None
config: DatasetConfig
model_config: ClassVar[ConfigDict] = {}

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

y_test: Annotated[ndarray, PlainValidator(func=validate, json_schema_input_type=Any), PlainSerializer(func=serialize, return_type=PydanticUndefined, when_used=always)]
y_train: Annotated[ndarray, PlainValidator(func=validate, json_schema_input_type=Any), PlainSerializer(func=serialize, return_type=PydanticUndefined, when_used=always)]
y_val: Annotated[ndarray, PlainValidator(func=validate, json_schema_input_type=Any), PlainSerializer(func=serialize, return_type=PydanticUndefined, when_used=always)] | None
qxmt.datasets.schema.serialize(v)
Parameters:

v (ndarray)

Return type:

list[list[float]]

qxmt.datasets.schema.validate(v)
Parameters:

v (Any)

Return type:

ndarray