Skip to content

load_pretrained_model dependency issues #522

@IFenton

Description

@IFenton

I've been working on trying to get the Scivision example gallery notebooks running (#83, and I've come across an issue with load_pretrained_model that is causing some problems.

Running load_pretrained_model(<url>, allow_install=True), if the model is not present, currently force installs both the model and its dependencies. As I understand it, this was intended as an intentional feature to make sure that the dependencies were updated to the required versions (#223). However the force reinstalling of dependencies is leading to issues with some of the scivision-examples-gallery notebooks (e.g. scivision-basic-usage-example #5, plant-phenotyping-classification #8). In both these cases, running load_pretrained_model causes the latest version of packages (tensorflow and timm respectively) to be installed. However, these versions are causing the errors in running the notebooks.

There seem to be a couple of possible options to fix this:

  • Install the model separately, whether in the environment.yml or in the terminal before running the notebook
  • Update the model requirements.txt to a pinned version of the package
  • Change load_pretrained_model so it doesn't force reinstall dependencies by default

Does anyone have any preferences on which is the best option?

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions