Error

File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/torch/_export/serde/serialize.py", line 1139, in

self.serialize_module_call_signature(entry.signature)

File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/torch/_export/serde/serialize.py", line 1128, in serialize_module_call_signature

out_spec=treespec_dumps(module_call_signature.out_spec, TREESPEC_VERSION),

File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/torch/utils/_pytree.py", line 1436, in treespec_dumps

json_spec = _SUPPORTED_PROTOCOLS[protocol].treespec_to_json(treespec)

File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/torch/utils/_pytree.py", line 1365, in _treespec_to_json

raise NotImplementedError(

NotImplementedError: No registered serialization name for found. Please update your _register_pytree_node call with a `serialized_type_name` kwarg.

Solution

Locate the place in your code (or in the relevant library's code if you have access to modify it) where the _register_pytree_node call is made for the Transformer2DModelOutput class. Update it to include the serialized_type_name keyword argument.