nnsight.schema#
- class nnsight.schema.Config.ApiConfigModel(*, HOST: str = 'ndif.dev', SSL: bool = True, APIKEY: str | None = None, JOB_ID: str | None = None)[source]#
- 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]] = {'APIKEY': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'HOST': FieldInfo(annotation=str, required=False, default='ndif.dev'), 'JOB_ID': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'SSL': FieldInfo(annotation=bool, required=False, default=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.
- class nnsight.schema.Config.AppConfigModel(*, LOGGING: bool = False, REMOTE_LOGGING: bool = True)[source]#
- 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]] = {'LOGGING': FieldInfo(annotation=bool, required=False, default=False), 'REMOTE_LOGGING': FieldInfo(annotation=bool, required=False, default=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.
- class nnsight.schema.Config.ConfigModel(*, API: ApiConfigModel = ApiConfigModel(HOST='ndif.dev', SSL=True, APIKEY=None, JOB_ID=None), APP: AppConfigModel = AppConfigModel(LOGGING=False, REMOTE_LOGGING=True))[source]#
- 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': FieldInfo(annotation=ApiConfigModel, required=False, default=ApiConfigModel(HOST='ndif.dev', SSL=True, APIKEY=None, JOB_ID=None)), 'APP': FieldInfo(annotation=AppConfigModel, required=False, default=AppConfigModel(LOGGING=False, REMOTE_LOGGING=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.
- class nnsight.schema.Request.RequestModel(*, object: str | Session | Tracer | SessionModel | TracerModel, model_key: str, id: str = None, received: datetime = None, session_id: str | None = None)[source]#
- 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, 'protected_namespaces': ()}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'id': FieldInfo(annotation=str, required=False, default=None), 'model_key': FieldInfo(annotation=str, required=True), 'object': FieldInfo(annotation=Union[str, Annotated[Session, AfterValidator], Annotated[Tracer, AfterValidator], SessionModel, TracerModel], required=True), 'received': FieldInfo(annotation=datetime, required=False, default=None), 'session_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}#
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 nnsight.schema.Response.ResponseModel(*, id: str, status: JobStatus, description: str, received: datetime = None, session_id: str | None = None)[source]#
- class JobStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
- 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]] = {'description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'received': FieldInfo(annotation=datetime, required=False, default=None), 'session_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'status': FieldInfo(annotation=ResponseModel.JobStatus, 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.
- class nnsight.schema.Response.ResultModel(*, id: str, value: Any = None)[source]#
- 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]] = {'id': FieldInfo(annotation=str, required=True), 'value': FieldInfo(annotation=Any, required=False, default=None)}#
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 nnsight.schema.format.types.BaseNNsightModel(*, type_name: Literal['TYPE_NAME'])[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'type_name': FieldInfo(annotation=Literal['TYPE_NAME'], 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.
- class nnsight.schema.format.types.DictModel(*, type_name: Literal['TYPE_NAME'])[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'type_name': FieldInfo(annotation=Literal['DICT'], required=False, default='DICT'), 'values': FieldInfo(annotation=Dict[str, Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]]], 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.
- class nnsight.schema.format.types.EllipsisModel(*, type_name: Literal['ELLIPSIS'] = 'ELLIPSIS')[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'type_name': FieldInfo(annotation=Literal['ELLIPSIS'], required=False, default='ELLIPSIS')}#
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 nnsight.schema.format.types.FunctionModel(*, type_name: Literal['FUNCTION'] = 'FUNCTION', function_name: str)[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'function_name': FieldInfo(annotation=str, required=True), 'type_name': FieldInfo(annotation=Literal['FUNCTION'], required=False, default='FUNCTION')}#
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 nnsight.schema.format.types.GraphModel(*, type_name: Literal['TYPE_NAME'])[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'id': FieldInfo(annotation=int, required=True), 'nodes': FieldInfo(annotation=Dict[str, Union[NodeModel, Annotated[Node, AfterValidator]]], required=True), 'sequential': FieldInfo(annotation=bool, required=True), 'type_name': FieldInfo(annotation=Literal['GRAPH'], required=False, default='GRAPH')}#
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 nnsight.schema.format.types.IteratorModel(*, type_name: Literal['TYPE_NAME'])[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'data': FieldInfo(annotation=Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]], required=True), 'graph': FieldInfo(annotation=Union[GraphModel, Annotated[Graph, AfterValidator]], required=True), 'type_name': FieldInfo(annotation=Literal['ITERATOR'], required=False, default='ITERATOR')}#
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 nnsight.schema.format.types.ListModel(*, type_name: Literal['TYPE_NAME'])[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'type_name': FieldInfo(annotation=Literal['LIST'], required=False, default='LIST'), 'values': FieldInfo(annotation=List[Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]]], 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.
- class nnsight.schema.format.types.NodeModel(*, type_name: Literal['TYPE_NAME'])[source]#
- class Reference(*, type_name: Literal['NODE_REFERENCE'] = 'NODE_REFERENCE', name: str)[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True), 'type_name': FieldInfo(annotation=Literal['NODE_REFERENCE'], required=False, default='NODE_REFERENCE')}#
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.
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'args': FieldInfo(annotation=List[Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]]], required=False, default=[]), 'condition': FieldInfo(annotation=Union[NoneType, Annotated[Node, AfterValidator], NodeModel.Reference], required=False, default=None), 'kwargs': FieldInfo(annotation=Dict[str, Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]]], required=False, default={}), 'name': FieldInfo(annotation=str, required=True), 'target': FieldInfo(annotation=Union[FunctionModel, Annotated[Union[builtin_function_or_method, function, method_descriptor, type], AfterValidator]], required=True), 'type_name': FieldInfo(annotation=Literal['NODE'], required=False, default='NODE')}#
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 nnsight.schema.format.types.SessionModel(*, type_name: Literal['TYPE_NAME'])[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'graph': FieldInfo(annotation=Union[GraphModel, Annotated[Graph, AfterValidator]], required=True), 'type_name': FieldInfo(annotation=Literal['SESSION'], required=False, default='SESSION')}#
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 nnsight.schema.format.types.SliceModel(*, type_name: Literal['TYPE_NAME'])[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'start': FieldInfo(annotation=Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]], required=True), 'step': FieldInfo(annotation=Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]], required=True), 'stop': FieldInfo(annotation=Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]], required=True), 'type_name': FieldInfo(annotation=Literal['SLICE'], required=False, default='SLICE')}#
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 nnsight.schema.format.types.TensorModel(*, type_name: Literal['TENSOR'] = 'TENSOR', values: List, dtype: str)[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'dtype': FieldInfo(annotation=str, required=True), 'type_name': FieldInfo(annotation=Literal['TENSOR'], required=False, default='TENSOR'), 'values': FieldInfo(annotation=List, 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.
- class nnsight.schema.format.types.TracerModel(*, type_name: Literal['TYPE_NAME'])[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'graph': FieldInfo(annotation=Union[GraphModel, Annotated[Graph, AfterValidator]], required=True), 'invoker_inputs': FieldInfo(annotation=List[Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]]], required=True), 'kwargs': FieldInfo(annotation=Dict[str, Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]]], required=True), 'type_name': FieldInfo(annotation=Literal['TRACER'], required=False, default='TRACER')}#
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 nnsight.schema.format.types.TupleModel(*, type_name: Literal['TYPE_NAME'])[source]#
- 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}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'type_name': FieldInfo(annotation=Literal['TUPLE'], required=False, default='TUPLE'), 'values': FieldInfo(annotation=List[Union[int, float, str, bool, NoneType, Annotated[Union[TracerModel, IteratorModel, SessionModel, NodeModel.Reference, SliceModel, TensorModel, TupleModel, ListModel, DictModel, EllipsisModel], FieldInfo(annotation=NoneType, required=True, discriminator='type_name')], Annotated[Tracer, AfterValidator], Annotated[Iterator, AfterValidator], Annotated[Session, AfterValidator], Annotated[Node, AfterValidator], Annotated[slice, AfterValidator], Annotated[Tensor, AfterValidator], Annotated[tuple, Strict(strict=True), AfterValidator], Annotated[list, AfterValidator], Annotated[dict, AfterValidator], Annotated[ellipsis, AfterValidator]]], 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.