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_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__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_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_computed_fields': 'ClassVar[Dict[str, ComputedFieldInfo]]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[Dict[str, FieldInfo]]'}¶
- __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_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'gt4sd.properties.core.PropertyPredictorParameters'>, 'config': {'title': 'PropertyPredictorParameters'}, 'custom_init': False, 'metadata': {'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'gt4sd.properties.core.PropertyPredictorParameters'>, title=None), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'gt4sd.properties.core.PropertyPredictorParameters'>>]}, 'ref': 'gt4sd.properties.core.PropertyPredictorParameters:94662808870720', '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_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( 0x0000561867189f40, ), 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_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, strict: false, from_attributes: false, loc_by_alias: true, }, ), class: Py( 0x0000561867189f40, ), post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007f1ea71db950, ), 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_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {}¶
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.
- 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_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__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_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_computed_fields': 'ClassVar[Dict[str, ComputedFieldInfo]]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[Dict[str, FieldInfo]]'}¶
- __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_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'gt4sd.properties.core.S3Parameters'>, 'config': {'title': 'S3Parameters'}, 'custom_init': False, 'metadata': {'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'gt4sd.properties.core.S3Parameters'>, title=None), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'gt4sd.properties.core.S3Parameters'>>]}, 'ref': 'gt4sd.properties.core.S3Parameters:94662808875184', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'algorithm_application': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'algorithm_name': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'algorithm_type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'prediction', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'algorithm_version': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'domain': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, '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:94662808869760', '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_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( 0x000056186718b0b0, ), serializer: Fields( GeneralFieldsSerializer { fields: { "algorithm_name": SerField { key_py: Py( 0x00007f1ea52ce770, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, }, "domain": SerField { key_py: Py( 0x00007f1ea8dd1270, ), alias: None, alias_py: None, serializer: Some( Enum( EnumSerializer { class: Py( 0x0000561867189b80, ), serializer: Some( Str( StrSerializer, ), ), }, ), ), required: true, }, "algorithm_application": SerField { key_py: Py( 0x00007f1dcf4e0530, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, }, "algorithm_type": SerField { key_py: Py( 0x00007f1ea52cf4f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x00007f1dea152330, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, }, "algorithm_version": SerField { key_py: Py( 0x00007f1ea52ed250, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, }, }, 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_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="S3Parameters", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "algorithm_type", lookup_key: Simple { key: "algorithm_type", py_key: Py( 0x00007f1dce8bf9b0, ), path: LookupPath( [ S( "algorithm_type", Py( 0x00007f1dce8bf970, ), ), ], ), }, name_py: Py( 0x00007f1ea52cf4f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x00007f1dea152330, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x00007f1ea71db950, ), }, ), frozen: false, }, Field { name: "domain", lookup_key: Simple { key: "domain", py_key: Py( 0x00007f1dce8bf930, ), path: LookupPath( [ S( "domain", Py( 0x00007f1dce8bf8f0, ), ), ], ), }, name_py: Py( 0x00007f1ea8dd1270, ), validator: StrEnum( EnumValidator { phantom: PhantomData<_pydantic_core::validators::enum_::StrEnumValidator>, class: Py( 0x0000561867189b80, ), lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some( { "properties": 1, "molecules": 0, "crystals": 2, }, ), expected_py_dict: None, expected_py_values: None, values: [ Py( 0x00007f1dcea99230, ), Py( 0x00007f1dcea992a0, ), Py( 0x00007f1dcea99310, ), ], }, 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: Simple { key: "algorithm_name", py_key: Py( 0x00007f1dce8bf9f0, ), path: LookupPath( [ S( "algorithm_name", Py( 0x00007f1dce8bfa30, ), ), ], ), }, name_py: Py( 0x00007f1ea52ce770, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "algorithm_version", lookup_key: Simple { key: "algorithm_version", py_key: Py( 0x00007f1dce8c8580, ), path: LookupPath( [ S( "algorithm_version", Py( 0x00007f1dce8c8620, ), ), ], ), }, name_py: Py( 0x00007f1ea52ed250, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "algorithm_application", lookup_key: Simple { key: "algorithm_application", py_key: Py( 0x00007f1dce8c85d0, ), path: LookupPath( [ S( "algorithm_application", Py( 0x00007f1dce8c8670, ), ), ], ), }, name_py: Py( 0x00007f1dcf4e0530, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, ], model_name: "S3Parameters", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true, }, ), class: Py( 0x000056186718b0b0, ), post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007f1ea71db950, ), 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_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_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'])}¶
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.
- 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_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__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_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'api_token': <class 'str'>, 'model_computed_fields': 'ClassVar[Dict[str, ComputedFieldInfo]]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[Dict[str, FieldInfo]]'}¶
- __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_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'gt4sd.properties.core.ApiTokenParameters'>, 'config': {'title': 'ApiTokenParameters'}, 'custom_init': False, 'metadata': {'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'gt4sd.properties.core.ApiTokenParameters'>, title=None), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'gt4sd.properties.core.ApiTokenParameters'>>]}, 'ref': 'gt4sd.properties.core.ApiTokenParameters:94662808881872', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'api_token': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, '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_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( 0x000056186718cad0, ), serializer: Fields( GeneralFieldsSerializer { fields: { "api_token": SerField { key_py: Py( 0x00007f1de214f970, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, }, }, 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_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="ApiTokenParameters", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "api_token", lookup_key: Simple { key: "api_token", py_key: Py( 0x00007f1dce8d07f0, ), path: LookupPath( [ S( "api_token", Py( 0x00007f1dce8d05f0, ), ), ], ), }, name_py: Py( 0x00007f1de214f970, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, ], model_name: "ApiTokenParameters", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true, }, ), class: Py( 0x000056186718cad0, ), post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007f1ea71db950, ), 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_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'api_token': FieldInfo(annotation=str, required=True, description='The API token/key to access the service', examples=['apk-c9db......'])}¶
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.
- 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_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__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_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'host_ip': <class 'str'>, 'model_computed_fields': 'ClassVar[Dict[str, ComputedFieldInfo]]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[Dict[str, FieldInfo]]'}¶
- __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_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'gt4sd.properties.core.IpAdressParameters'>, 'config': {'title': 'IpAdressParameters'}, 'custom_init': False, 'metadata': {'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'gt4sd.properties.core.IpAdressParameters'>, title=None), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'gt4sd.properties.core.IpAdressParameters'>>]}, 'ref': 'gt4sd.properties.core.IpAdressParameters:94662808891968', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'host_ip': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, '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_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( 0x000056186718f240, ), serializer: Fields( GeneralFieldsSerializer { fields: { "host_ip": SerField { key_py: Py( 0x00007f1ea72d54b0, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, }, }, 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_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="IpAdressParameters", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "host_ip", lookup_key: Simple { key: "host_ip", py_key: Py( 0x00007f1dce8d1370, ), path: LookupPath( [ S( "host_ip", Py( 0x00007f1dce8d11b0, ), ), ], ), }, name_py: Py( 0x00007f1ea72d54b0, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, ], model_name: "IpAdressParameters", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true, }, ), class: Py( 0x000056186718f240, ), post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x00007f1ea71db950, ), 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_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_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'])}¶
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.
- 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'¶