nnsight.schema#

class nnsight.schema.format.types.BaseNNsightModel(*, type_name: Literal['TYPE_NAME'])[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.DictModel(*, type_name: Literal['TYPE_NAME'])[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.EllipsisModel(*, type_name: Literal['ELLIPSIS'] = 'ELLIPSIS')[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.FunctionModel(*, type_name: Literal['FUNCTION'] = 'FUNCTION', function_name: str)[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

exception nnsight.schema.format.types.FunctionWhitelistError[source]#
class nnsight.schema.format.types.GraphModel(*, type_name: Literal['TYPE_NAME'])[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.InterventionGraphModel(*, type_name: Literal['INTERVENTIONGRAPH'] = 'INTERVENTIONGRAPH', subset: List[int])[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.ListModel(*, type_name: Literal['TYPE_NAME'])[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.MemoReferenceModel(*, type_name: Literal['REFERENCE'] = 'REFERENCE', id: int)[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.NodeModel(*, type_name: Literal['TYPE_NAME'])[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.SliceModel(*, type_name: Literal['TYPE_NAME'])[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.SubGraphModel(*, type_name: Literal['SUBGRAPH'] = 'SUBGRAPH', subset: List[int])[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.TensorModel(*, type_name: Literal['TENSOR'] = 'TENSOR', values: List, dtype: str)[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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

class nnsight.schema.format.types.TupleModel(*, type_name: Literal['TYPE_NAME'])[source]#
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

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