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

Proposal: Outsource installation of packages (models, data plugins) - WARNING - breaking API change #346

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

edwardchalstrey1
Copy link
Contributor

@edwardchalstrey1 edwardchalstrey1 commented Oct 12, 2022

Closes #253 (see discussion on this issue)

Idea here is to circumvent a lot of the problems we have around package installation for models in the catalog (and more recently data plugins) by completely removing this as a feature of scivision. This branch does that, and I've created a branch on the scivision_examples repo with the same name that updates the intro (Koala) notebook (see here) - take a look under the "Loading the model" header.

Essentially we raise a warning if the package is not installed that explains how to install it (we already had this warning in place in fact!).

I want to spark some discussion here, so feel free to voice your disagreements in the comments below!

TODO:

  • Update docs with this change
  • Update all gallery notebooks

Further idea

Perhaps there should be a function like:

get_install_code('scivision_classifier')

which simply prints out:

Copy the following line of code into a new notebook cell (or remove the "!" and run in a terminal window):
!pip install -e git+https://github.com/alan-turing-institute/scivision_classifier@main#egg=scivision_classifier

... or alternatively links to the package repo README for packages that are more complex to install

@quantumjot
Copy link
Collaborator

I think I'd be sad if this feature went away, esp. if we're targetting less experienced users. I'd rather have the info message (i.e. this PR) as a fallback if the package can't be installed automatically.

@edwardchalstrey1
Copy link
Contributor Author

I think I'd be sad if this feature went away, esp. if we're targetting less experienced users. I'd rather have the info message (i.e. this PR) as a fallback if the package can't be installed automatically.

@quantumjot that's understandable and it's the reason you added this feature to begin with - I think this somewhat comes at the expense of things being more likely to go wrong with installation where we try to automate it (due to dependencies etc) - my alternative idea for less experienced users which makes use of @ots22 UI feature: #325

@edwardchalstrey1
Copy link
Contributor Author

If we did merge this, we could also acknowledge the breaking change via switching to version 1.0.0. https://semver.org/

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

Successfully merging this pull request may close these issues.

[BUG] Reinstallation of models does not work as expected
4 participants