`is_from` failing on pytorch model
Matt3164 opened this issue · comments
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.
I patched the function in the very last PR.