Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mlr3learners/mlr3learners.drat
drat repository for mlr3learners
https://github.com/mlr3learners/mlr3learners.drat
Last synced: about 2 months ago
JSON representation
drat repository for mlr3learners
- Host: GitHub
- URL: https://github.com/mlr3learners/mlr3learners.drat
- Owner: mlr3learners
- License: lgpl-2.1
- Archived: true
- Created: 2020-01-15T22:03:13.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-08T15:52:39.000Z (over 4 years ago)
- Last Synced: 2024-08-13T07:14:53.261Z (5 months ago)
- Language: R
- Homepage:
- Size: 87.1 MB
- Stars: 8
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
- jimsghstars - mlr3learners/mlr3learners.drat - drat repository for mlr3learners (R)
README
---
output: github_document
---## Deprecated
* `mlr3learners.drat` is now deprecated. The majority of learners in this organisation now live in [mlr3extralearners](https://github.com/mlr-org/mlr3extralearners). # mlr3learners.drat
* `mlr3learners.drat` is no longer being maintained and will **stop functioning on 1st January 2021**.
* Only [mlr3learners.lightgbm](https://github.com/mlr3learners/mlr3learners.lightgbm) is still being maintained in this organisation, for stable releases of all other learners please see [mlr3extralearners](https://github.com/mlr-org/mlr3extralearners).# mlr3learners.drat
[`drat`](https://github.com/eddelbuettel/drat) package repository for the [mlr3learners.drat](https://github.com/mlr3learners/mlr3learners.drat) project.
Install mlr3 learners from this repository using```{r, eval = FALSE}
install.packages(..., repos = "https://mlr3learners.github.io/mlr3learners.drat")
```To omit having to pass the `repos` argument every single time, add the following to your `.Rprofile`:
```{r, eval=FALSE}
options(repos = structure(c(getOption("repos"),
mlr3learners = "https://mlr3learners.github.io/mlr3learners.drat")))
```This will append this drat repo to your list of available repositories which `install.packages()` will check when trying to install a package.
If you want a c/p command for this: The following will append the line above to your `~/.Rprofile` while keeping your currently set CRAN mirror:```{r}
cran = getOption('repos')[['CRAN']]
write(sprintf("options(repos = structure(c(CRAN = '%s',
mlr3learners = 'https://mlr3learners.github.io/mlr3learners.drat')))",
cran),
file = "~/.Rprofile", append = TRUE)
```**Note: Restart your R session to make use of the new option.**
With this, you are able to install any learner from the [mlr3learners](https://github.com/mlr3learners) organization as simple as
```{r, eval = FALSE}
install.packages("mlr3learners.kernlab")
```## Available packages
List of all available learners in this organization
```{r echo=FALSE}
# need to exclude ksvm manually because its still somewhere in the index but not available anymore (renamed to kernlab)
setdiff(as.character(available.packages(repos = "https://mlr3learners.github.io/mlr3learners.drat")[, 1]), c("mlr3learners.ksvm", "mlr3learners.C50"))
```## How it works
The package sources and binaries of the listed packages are build by the respective learner packages with the following logic:
- During a CI run when the version does not contain a devel indicator (i.e. .9000)
- On the first of each monthBinaries are build for the current R release and the previous release.
Depending on the release date of a new major or minor R version it may take a while until the new binaries are available.
The binaries are (re-)build on the first of each month.The work behind the scenes is highly simplified by packages [{tic}](https://github.com/ropensci/tic) and [{drat}](https://github.com/eddelbuettel/drat).
### How to add a mlr3learner to {mlr3learners.drat}
1. Check if you belong to the [mlr3learners.drat team](https://github.com/orgs/mlr3learners/teams/mlr3learners-drat) of the mlr3learners organization.
If not, ask @pat-s to add you - otherwise, you do not have permission to add deploy keys to this repository.1. Make sure you have a `GITHUB_PAT` set for the GitHub API calls.
If you do not know what this is, read `?usethis::browse_github_token()`.1. Make sure your repo already uses GitHub Actions.
If not, call `tic::use_ghactions_yml(deploy = TRUE)`.
1. Source `init_mlr3learner_drat_deploy()` from [this Gist](https://gist.github.com/pat-s/be7b0ebc6953726d5a51a171742c3e21) and call the function with the name of the repo, e.g. `init_mlr3learner_drat_deploy("mlr3learners.mboost")`.
This will add a private key as a "secret" to your repo and a public deploy key to [mlr3learners/mlr3learners.drat](https://github.com/mlr3learners/mlr3learners.drat), making it possible to deploy to the latter from your repo.
1. Now the macOS and Windows runners will push their binaries to mlr3learners.drat for every no-devel version (i.e. versions without .9000 at the end).
The Linux runner will push the `.tar.gz` file to install the learner from source.
**Note**It is very important to only init one CI run per release and then switch directly to a dev version.
Otherwise, binaries will be pushed during every CI run, bloating up the repo size of mlr3learners/mlr3learners.drat](https://github.com/mlr3learners/mlr3learners.drat).