gt4sd.properties.core module¶
Summary¶
Classes:
Property predictor based on a callable. |
|
Property predictor based on a callable that is configured using the provided parameters. |
|
An enumeration. |
|
PropertyPredictor base class. |
|
Abstract class for property computation. |
|
Reference¶
- class DomainSubmodule(value)[source]¶
Bases:
str
,Enum
An enumeration.
- molecules: str = 'molecules'¶
- properties: str = 'properties'¶
- crystals: str = 'crystals'¶
- _generate_next_value_(start, count, last_values)¶
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_value: the last value assigned or None
- __module__ = 'gt4sd.properties.core'¶
- __annotations__ = {'crystals': <class 'str'>, 'molecules': <class 'str'>, 'properties': <class 'str'>}¶
- __dict__ = mappingproxy({'_generate_next_value_': <function Enum._generate_next_value_>, '__module__': 'gt4sd.properties.core', '__annotations__': {'molecules': <class 'str'>, 'properties': <class 'str'>, 'crystals': <class 'str'>}, '__doc__': 'An enumeration.', '__dict__': <attribute '__dict__' of 'DomainSubmodule' objects>, '__weakref__': <attribute '__weakref__' of 'DomainSubmodule' objects>, '_member_names_': ['molecules', 'properties', 'crystals'], '_member_map_': {'molecules': <DomainSubmodule.molecules: 'molecules'>, 'properties': <DomainSubmodule.properties: 'properties'>, 'crystals': <DomainSubmodule.crystals: 'crystals'>}, '_member_type_': <class 'str'>, '_value2member_map_': {'molecules': <DomainSubmodule.molecules: 'molecules'>, 'properties': <DomainSubmodule.properties: 'properties'>, 'crystals': <DomainSubmodule.crystals: 'crystals'>}, 'molecules': <DomainSubmodule.molecules: 'molecules'>, 'properties': <DomainSubmodule.properties: 'properties'>, 'crystals': <DomainSubmodule.crystals: 'crystals'>, '__repr__': <function Enum.__repr__>, '__str__': <function Enum.__str__>, '__format__': <function Enum.__format__>, '__new__': <function Enum.__new__>})¶
- __weakref__¶
list of weak references to the object (if defined)
- _member_names_ = ['molecules', 'properties', 'crystals']¶
- _member_map_ = {'crystals': DomainSubmodule.crystals, 'molecules': DomainSubmodule.molecules, 'properties': DomainSubmodule.properties}¶
- _member_type_¶
alias of
str
- _value2member_map_ = {'crystals': DomainSubmodule.crystals, 'molecules': DomainSubmodule.molecules, 'properties': DomainSubmodule.properties}¶
- __doc__ = 'An enumeration.'¶
- class PropertyPredictorParameters(**data)[source]¶
Bases:
BaseModel
Abstract class for property computation.
- __dict__¶
- __pydantic_fields_set__: set[str]¶
The names of fields explicitly set during instantiation.
- __pydantic_extra__: dict[str, Any] | None¶
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_private__: dict[str, Any] | None¶
Values of private attributes set on the model instance.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[Dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_computed_fields__': 'ClassVar[Dict[str, ComputedFieldInfo]]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields__': 'ClassVar[Dict[str, FieldInfo]]', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[Dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_setattr_handlers__': 'ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]]', '__pydantic_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]'}¶
- __class_vars__: ClassVar[set[str]] = {}¶
The names of the class variables defined on the model.
- __doc__ = 'Abstract class for property computation.'¶
- __module__ = 'gt4sd.properties.core'¶
- __private_attributes__: ClassVar[Dict[str, ModelPrivateAttr]] = {}¶
Metadata about the private attributes of the model.
- __pydantic_complete__: ClassVar[bool] = True¶
Whether model building is completed, or if there are still undefined fields.
- __pydantic_computed_fields__: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'gt4sd.properties.core.PropertyPredictorParameters'>, 'config': {'title': 'PropertyPredictorParameters'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'gt4sd.properties.core.PropertyPredictorParameters'>>]}, 'ref': 'gt4sd.properties.core.PropertyPredictorParameters:94588850959472', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {}, 'model_name': 'PropertyPredictorParameters', 'type': 'model-fields'}, 'type': 'model'}¶
The core schema of the model.
- __pydantic_custom_init__: ClassVar[bool] = False¶
Whether the model has a custom __init__ method.
- __pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})¶
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_fields__: ClassVar[Dict[str, FieldInfo]] = {}¶
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.
- __pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}¶
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__: ClassVar[Dict[str, Any] | None] = None¶
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None¶
The name of the post-init method for the model, if defined.
- __pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model( ModelSerializer { class: Py( 0x000056072edc7470, ), serializer: Fields( GeneralFieldsSerializer { fields: {}, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 0, }, ), has_extra: false, root_model: false, name: "PropertyPredictorParameters", }, ), definitions=[])¶
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}¶
__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__
- __pydantic_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="PropertyPredictorParameters", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [], model_name: "PropertyPredictorParameters", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x000056072edc7470, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007fae32fe7a60, ), name: "PropertyPredictorParameters", }, ), definitions=[], cache_strings=True)¶
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__: ClassVar[Signature] = <Signature () -> None>¶
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __weakref__¶
list of weak references to the object (if defined)
- _abc_impl = <_abc._abc_data object>¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class S3Parameters(**data)[source]¶
Bases:
PropertyPredictorParameters
- algorithm_type: str¶
- domain: DomainSubmodule¶
- algorithm_name: str¶
- algorithm_version: str¶
- algorithm_application: str¶
- __dict__¶
- __pydantic_fields_set__: set[str]¶
The names of fields explicitly set during instantiation.
- __pydantic_extra__: dict[str, Any] | None¶
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_private__: dict[str, Any] | None¶
Values of private attributes set on the model instance.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[Dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_computed_fields__': 'ClassVar[Dict[str, ComputedFieldInfo]]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields__': 'ClassVar[Dict[str, FieldInfo]]', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[Dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_setattr_handlers__': 'ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]]', '__pydantic_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'algorithm_application': <class 'str'>, 'algorithm_name': <class 'str'>, 'algorithm_type': <class 'str'>, 'algorithm_version': <class 'str'>, 'domain': <enum 'DomainSubmodule'>, 'model_config': 'ClassVar[ConfigDict]'}¶
- __class_vars__: ClassVar[set[str]] = {}¶
The names of the class variables defined on the model.
- __doc__ = None¶
- __module__ = 'gt4sd.properties.core'¶
- __private_attributes__: ClassVar[Dict[str, ModelPrivateAttr]] = {}¶
Metadata about the private attributes of the model.
- __pydantic_complete__: ClassVar[bool] = True¶
Whether model building is completed, or if there are still undefined fields.
- __pydantic_computed_fields__: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'gt4sd.properties.core.S3Parameters'>, 'config': {'title': 'S3Parameters'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'gt4sd.properties.core.S3Parameters'>>]}, 'ref': 'gt4sd.properties.core.S3Parameters:94588850962208', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'algorithm_application': {'metadata': {'pydantic_js_updates': {'examples': ['Tox21']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'algorithm_name': {'metadata': {'pydantic_js_updates': {'description': 'Name of the algorithm', 'examples': ['MCA']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'algorithm_type': {'metadata': {}, 'schema': {'default': 'prediction', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'algorithm_version': {'metadata': {'pydantic_js_updates': {'description': 'Version of the algorithm', 'examples': ['v0']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'domain': {'metadata': {'pydantic_js_updates': {'description': 'Submodule of gt4sd.properties', 'examples': ['molecules']}}, 'schema': {'cls': <enum 'DomainSubmodule'>, 'members': [<DomainSubmodule.molecules: 'molecules'>, <DomainSubmodule.properties: 'properties'>, <DomainSubmodule.crystals: 'crystals'>], 'metadata': {'pydantic_js_functions': [<function GenerateSchema._enum_schema.<locals>.get_json_schema>]}, 'ref': 'gt4sd.properties.core.DomainSubmodule:94588850957920', 'sub_type': 'str', 'type': 'enum'}, 'type': 'model-field'}}, 'model_name': 'S3Parameters', 'type': 'model-fields'}, 'type': 'model'}¶
The core schema of the model.
- __pydantic_custom_init__: ClassVar[bool] = False¶
Whether the model has a custom __init__ method.
- __pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})¶
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_fields__: ClassVar[Dict[str, FieldInfo]] = {'algorithm_application': FieldInfo(annotation=str, required=True, examples=['Tox21']), 'algorithm_name': FieldInfo(annotation=str, required=True, description='Name of the algorithm', examples=['MCA']), 'algorithm_type': FieldInfo(annotation=str, required=False, default='prediction'), 'algorithm_version': FieldInfo(annotation=str, required=True, description='Version of the algorithm', examples=['v0']), 'domain': FieldInfo(annotation=DomainSubmodule, required=True, description='Submodule of gt4sd.properties', examples=['molecules'])}¶
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.
- __pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}¶
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__: ClassVar[Dict[str, Any] | None] = None¶
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None¶
The name of the post-init method for the model, if defined.
- __pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model( ModelSerializer { class: Py( 0x000056072edc7f20, ), serializer: Fields( GeneralFieldsSerializer { fields: { "algorithm_application": SerField { key_py: Py( 0x00007fad5a539d90, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "algorithm_version": SerField { key_py: Py( 0x00007fae310b4800, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "algorithm_name": SerField { key_py: Py( 0x00007fae313dc570, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "domain": SerField { key_py: Py( 0x00007fae34bd11f0, ), alias: None, alias_py: None, serializer: Some( Enum( EnumSerializer { class: Py( 0x000056072edc6e60, ), serializer: Some( Str( StrSerializer, ), ), }, ), ), required: true, serialize_by_alias: None, }, "algorithm_type": SerField { key_py: Py( 0x00007fae313dc0f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007fad807f17f0, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 5, }, ), has_extra: false, root_model: false, name: "S3Parameters", }, ), definitions=[])¶
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}¶
__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__
- __pydantic_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="S3Parameters", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "algorithm_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "algorithm_type", py_key: Py( 0x00007fad59940930, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x00007fae313dc0f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007fad807f17f0, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x00007fae32fe7a60, ), }, ), frozen: false, }, Field { name: "domain", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "domain", py_key: Py( 0x00007fad59941230, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x00007fae34bd11f0, ), validator: StrEnum( EnumValidator { phantom: PhantomData<_pydantic_core::validators::enum_::StrEnumValidator>, class: Py( 0x000056072edc6e60, ), lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some( { "crystals": 2, "molecules": 0, "properties": 1, }, ), expected_py_dict: None, expected_py_values: None, expected_py_primitives: Some( Py( 0x00007fad59940780, ), ), values: [ Py( 0x00007fad59925150, ), Py( 0x00007fad599251c0, ), Py( 0x00007fad59925230, ), ], }, missing: None, expected_repr: "'molecules', 'properties' or 'crystals'", strict: false, class_repr: "DomainSubmodule", name: "str-enum[DomainSubmodule]", }, ), frozen: false, }, Field { name: "algorithm_name", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "algorithm_name", py_key: Py( 0x00007fad59941270, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x00007fae313dc570, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "algorithm_version", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "algorithm_version", py_key: Py( 0x00007fad59931f20, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x00007fae310b4800, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "algorithm_application", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "algorithm_application", py_key: Py( 0x00007fad59931fc0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x00007fad5a539d90, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, ], model_name: "S3Parameters", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x000056072edc7f20, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007fae32fe7a60, ), name: "S3Parameters", }, ), definitions=[], cache_strings=True)¶
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__: ClassVar[Signature] = <Signature (*, algorithm_type: str = 'prediction', domain: gt4sd.properties.core.DomainSubmodule, algorithm_name: str, algorithm_version: str, algorithm_application: str) -> None>¶
The synthesized __init__ [Signature][inspect.Signature] of the model.
- _abc_impl = <_abc._abc_data object>¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ApiTokenParameters(**data)[source]¶
Bases:
PropertyPredictorParameters
- api_token: str¶
- __dict__¶
- __pydantic_fields_set__: set[str]¶
The names of fields explicitly set during instantiation.
- __pydantic_extra__: dict[str, Any] | None¶
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_private__: dict[str, Any] | None¶
Values of private attributes set on the model instance.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[Dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_computed_fields__': 'ClassVar[Dict[str, ComputedFieldInfo]]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields__': 'ClassVar[Dict[str, FieldInfo]]', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[Dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_setattr_handlers__': 'ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]]', '__pydantic_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'api_token': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]'}¶
- __class_vars__: ClassVar[set[str]] = {}¶
The names of the class variables defined on the model.
- __doc__ = None¶
- __module__ = 'gt4sd.properties.core'¶
- __private_attributes__: ClassVar[Dict[str, ModelPrivateAttr]] = {}¶
Metadata about the private attributes of the model.
- __pydantic_complete__: ClassVar[bool] = True¶
Whether model building is completed, or if there are still undefined fields.
- __pydantic_computed_fields__: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'gt4sd.properties.core.ApiTokenParameters'>, 'config': {'title': 'ApiTokenParameters'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'gt4sd.properties.core.ApiTokenParameters'>>]}, 'ref': 'gt4sd.properties.core.ApiTokenParameters:94588850972976', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'api_token': {'metadata': {'pydantic_js_updates': {'description': 'The API token/key to access the service', 'examples': ['apk-c9db......']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}}, 'model_name': 'ApiTokenParameters', 'type': 'model-fields'}, 'type': 'model'}¶
The core schema of the model.
- __pydantic_custom_init__: ClassVar[bool] = False¶
Whether the model has a custom __init__ method.
- __pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})¶
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_fields__: ClassVar[Dict[str, FieldInfo]] = {'api_token': FieldInfo(annotation=str, required=True, description='The API token/key to access the service', examples=['apk-c9db......'])}¶
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.
- __pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}¶
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__: ClassVar[Dict[str, Any] | None] = None¶
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None¶
The name of the post-init method for the model, if defined.
- __pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model( ModelSerializer { class: Py( 0x000056072edca930, ), serializer: Fields( GeneralFieldsSerializer { fields: { "api_token": SerField { key_py: Py( 0x00007fad6d550ff0, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 1, }, ), has_extra: false, root_model: false, name: "ApiTokenParameters", }, ), definitions=[])¶
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}¶
__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__
- __pydantic_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="ApiTokenParameters", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "api_token", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "api_token", py_key: Py( 0x00007fad59941930, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x00007fad6d550ff0, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, ], model_name: "ApiTokenParameters", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x000056072edca930, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007fae32fe7a60, ), name: "ApiTokenParameters", }, ), definitions=[], cache_strings=True)¶
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__: ClassVar[Signature] = <Signature (*, api_token: str) -> None>¶
The synthesized __init__ [Signature][inspect.Signature] of the model.
- _abc_impl = <_abc._abc_data object>¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class IpAdressParameters(**data)[source]¶
Bases:
PropertyPredictorParameters
- host_ip: str¶
- __dict__¶
- __pydantic_fields_set__: set[str]¶
The names of fields explicitly set during instantiation.
- __pydantic_extra__: dict[str, Any] | None¶
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_private__: dict[str, Any] | None¶
Values of private attributes set on the model instance.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[Dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_computed_fields__': 'ClassVar[Dict[str, ComputedFieldInfo]]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields__': 'ClassVar[Dict[str, FieldInfo]]', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[Dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_setattr_handlers__': 'ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]]', '__pydantic_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'host_ip': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]'}¶
- __class_vars__: ClassVar[set[str]] = {}¶
The names of the class variables defined on the model.
- __doc__ = None¶
- __module__ = 'gt4sd.properties.core'¶
- __private_attributes__: ClassVar[Dict[str, ModelPrivateAttr]] = {}¶
Metadata about the private attributes of the model.
- __pydantic_complete__: ClassVar[bool] = True¶
Whether model building is completed, or if there are still undefined fields.
- __pydantic_computed_fields__: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'gt4sd.properties.core.IpAdressParameters'>, 'config': {'title': 'IpAdressParameters'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'gt4sd.properties.core.IpAdressParameters'>>]}, 'ref': 'gt4sd.properties.core.IpAdressParameters:94588850977536', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'host_ip': {'metadata': {'pydantic_js_updates': {'description': 'The host IP address to access the service', 'examples': ['xx.xx.xxx.xxx']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}}, 'model_name': 'IpAdressParameters', 'type': 'model-fields'}, 'type': 'model'}¶
The core schema of the model.
- __pydantic_custom_init__: ClassVar[bool] = False¶
Whether the model has a custom __init__ method.
- __pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})¶
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_fields__: ClassVar[Dict[str, FieldInfo]] = {'host_ip': FieldInfo(annotation=str, required=True, description='The host IP address to access the service', examples=['xx.xx.xxx.xxx'])}¶
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.
- __pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}¶
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__: ClassVar[Dict[str, Any] | None] = None¶
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None¶
The name of the post-init method for the model, if defined.
- __pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model( ModelSerializer { class: Py( 0x000056072edcbb00, ), serializer: Fields( GeneralFieldsSerializer { fields: { "host_ip": SerField { key_py: Py( 0x00007fae330d6df0, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 1, }, ), has_extra: false, root_model: false, name: "IpAdressParameters", }, ), definitions=[])¶
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}¶
__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__
- __pydantic_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="IpAdressParameters", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "host_ip", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "host_ip", py_key: Py( 0x00007fad59942230, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x00007fae330d6df0, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, ], model_name: "IpAdressParameters", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x000056072edcbb00, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007fae32fe7a60, ), name: "IpAdressParameters", }, ), definitions=[], cache_strings=True)¶
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__: ClassVar[Signature] = <Signature (*, host_ip: str) -> None>¶
The synthesized __init__ [Signature][inspect.Signature] of the model.
- _abc_impl = <_abc._abc_data object>¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PropertyPredictor(parameters=PropertyPredictorParameters())[source]¶
Bases:
object
PropertyPredictor base class.
- __init__(parameters=PropertyPredictorParameters())[source]¶
Construct a PropertyPredictor using the related parameters. :type parameters:
PropertyPredictorParameters
:param parameters: parameters to configure the predictor.
- __call__(sample)[source]¶
Call the PropertyPredictor.
- Parameters
sample (
Any
) – a sample to use for predicting the property of interest.- Return type
Example
An example for predicting properties:
property_predictor = PropertyPredictor(parameters) value = property_predictor(sample)
- __dict__ = mappingproxy({'__module__': 'gt4sd.properties.core', '__doc__': 'PropertyPredictor base class.', '__init__': <function PropertyPredictor.__init__>, '__call__': <function PropertyPredictor.__call__>, '__dict__': <attribute '__dict__' of 'PropertyPredictor' objects>, '__weakref__': <attribute '__weakref__' of 'PropertyPredictor' objects>, '__annotations__': {}})¶
- __doc__ = 'PropertyPredictor base class.'¶
- __module__ = 'gt4sd.properties.core'¶
- __weakref__¶
list of weak references to the object (if defined)
- class CallablePropertyPredictor(callable_fn, parameters=PropertyPredictorParameters())[source]¶
Bases:
PropertyPredictor
Property predictor based on a callable.
- __init__(callable_fn, parameters=PropertyPredictorParameters())[source]¶
Construct a PropertyPredictor using the related parameters. :type parameters:
PropertyPredictorParameters
:param parameters: parameters to configure the predictor.
- __call__(sample)[source]¶
Call the PropertyPredictor.
- Parameters
sample (
Any
) – a sample to use for predicting the property of interest.- Returns
Property predicted by the predictor.
- Return type
Example
An example for predicting properties:
property_predictor = CallablePropertyPredictor(callable_fn=lambda a: id(a), parameters) value = property_predictor(sample)
- __annotations__ = {}¶
- __doc__ = 'Property predictor based on a callable.'¶
- __module__ = 'gt4sd.properties.core'¶
- class ConfigurableCallablePropertyPredictor(callable_fn, parameters=PropertyPredictorParameters())[source]¶
Bases:
CallablePropertyPredictor
Property predictor based on a callable that is configured using the provided parameters.
- __call__(sample)[source]¶
Call the PropertyPredictor.
- Parameters
sample (
Any
) – a sample to use for predicting the property of interest.- Return type
Example
An example for predicting properties:
property_predictor = CallablePropertyPredictor(callable_fn=lambda a, b: id(a), parameters) value = property_predictor(sample)
- __annotations__ = {}¶
- __doc__ = 'Property predictor based on a callable that is configured using the provided parameters.'¶
- __module__ = 'gt4sd.properties.core'¶