Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_from failing on pytorch model #18

Closed
Matt3164 opened this issue Mar 2, 2023 · 1 comment
Closed

is_from failing on pytorch model #18

Matt3164 opened this issue Mar 2, 2023 · 1 comment

Comments

@Matt3164
Copy link
Collaborator

Matt3164 commented Mar 2, 2023

is_from method is only looling at the first element of the dependency model.

model = torch.hub.load("chenyaofo/pytorch-cifar-models", "cifar10_resnet20", pretrained=True)
is_from(model, "torch")
# returns False instead of True
# > class_parents = ['pytorch_cifar_models', 'torch', 'object']

It should look at all elements from class_parents and check if torch is in it. Maybe a unit test on models defined in the test of the TorchFeatureExtractor could be useful and reproduce the bug above.

@paulnovello
Copy link
Member

I patched the function in the very last PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants