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

Feature Request: Sugar for installing new learners #82

Open
RaphaelS1 opened this issue Apr 3, 2020 · 4 comments
Open

Feature Request: Sugar for installing new learners #82

RaphaelS1 opened this issue Apr 3, 2020 · 4 comments

Comments

@RaphaelS1
Copy link

It would be nice to have some functions like:

install_mlr3_learner("classif.ranger") -> `Learner`
install_mlr3_learners(c("classif.ranger", "classif.featureless")) -> `list`

Which on first run can automatically add the relevant code to install from drat and for additional runs can look up the learner id in the registry (#81) and then install the relevant packages. This would make it much easier for users to install a learner without needing to know the package name, and would interface very nicely with a registry.

Thanks!

@pat-s
Copy link
Member

pat-s commented Apr 4, 2020

We could think of adding this kind of smartness into lrn():

  1. Check if requested learner is available in the learner registry of the current session (i.e. has the learner package already been loaded)
    • If not, check if the learner package is installed at all
      • If the learner package is not yet installed, install it (printing a message that we are doing so)

All of this requires that the users have already access to mlr3learners.drat. This would be another step at the start to check if that condition is true. If not, we prompt the users to take action once and add the repo to their .Rprofile with the provided code in the mlr3learners.drat repo.

With all of the above, users could simply do lrn(<any learner id>) and things will just work in 99% of all cases (assuming they have set up the mlr3learners.drat logic once).

I don't think that we should introduce a new function for this but rather handle it in a smart way behind the scenes.

@RaphaelS1
Copy link
Author

That would be amazing

@adibender
Copy link
Collaborator

That would be amazing

Seconded! I've just spent ~15 minutes trying to understand how to use some learners in proba (since they moved to separate repos) and I was aware that some learners moved from proba to custom repos. Imagine how frustrating this would be for others.

@pat-s
Copy link
Member

pat-s commented Jun 24, 2020

Yeah, I did not have time yet to do this and not sure when I will have.

Happy to look over a PR that does what was outlined before :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants