Closed kshitij12345 closed 4 days ago
Hi @kshitij12345 . Thank you for working on this. There are two aspects:
@kshitij12345 Just to add: I think if we don't have a better solution this week and this enables running HF/NeMo models, I'd probably be looking at taking it as a stop-gap thing.
Sounds good, I am looking at this a bit more. Also, if required - I will sync offline with you once. Thanks for having a look.
Fixes: #623
Example Snippet:
Output
To get this working, we require
Main changes -
class.__module__ + class.__qualname__
to avoid collision if there are two classes with same name from different module (can be seen in above snippet).tree_flatten_with_dataclass
which also flattens the dataclass so that we can see all the proxies that could be contained in a dataclass instance.symbol.py
to usetree_flatten_with_dataclass
instead oftree_flatten
which keeps the dataclass instances opaque.