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.
is_from
method is only looling at the first element of the dependency model.It should look at all elements from
class_parents
and check iftorch
is in it. Maybe a unit test on models defined in the test of theTorchFeatureExtractor
could be useful and reproduce the bug above.