ViCCo-Group / thingsvision

Python package for extracting representations from state-of-the-art computer vision models

Home Page:https://vicco-group.github.io/thingsvision/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix error thrown when passing `None` as `model_parameters` for `get_extractor`

andropar opened this issue · comments

The model_parameters argument for get_extractor is set to None as the default. This will cause an error when omitting it from the function call, as the extractors that use it will attempt to get values from it with .get(), which only works with dictionaries.

An easy, ugly fix would be to just use model_parameters = {} instead, which should be fine. Otherwise we have to check for None somewhere.

Could you submit a PR that does the easy fix and we'll figure out a more elegant solution in the future?