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

Missing learners on 'Integrated Learners' page #29

Closed
schiffner opened this issue Nov 29, 2015 · 11 comments
Closed

Missing learners on 'Integrated Learners' page #29

schiffner opened this issue Nov 29, 2015 · 11 comments

Comments

@schiffner
Copy link
Contributor

This is fixed now via 2b4cde6.

Just for the record:
Before the "maximal number of DLL" error there occur several other errors where packages can't be loaded although they are properly installed.
The error handling in listLearners catches those errors and the corresponding learners are missing in the returned list.

Part of the travis log:

Knitting file 'integrated_learners.Rmd' ...
Error in requirePackages(package, why = paste("learner", id), default.method = "load") : 
  For learner regr.km please install the following packages: DiceKriging
Error in requirePackages(package, why = paste("learner", id), default.method = "load") : 
  For learner regr.laGP please install the following packages: laGP
Error in requirePackages(package, why = paste("learner", id), default.method = "load") : 
  For learner regr.slim please install the following packages: flare
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/usr/lib/R/site-library/prodlim/libs/prodlim.so':
  `maximal number of DLLs reached...
Failed with error:  'package 'prodlim' could not be loaded'
Error in requirePackages(package, why = paste("learner", id), default.method = "load") : 
  For learner surv.CoxBoost please install the following packages: CoxBoost
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/usr/lib/R/site-library/prodlim/libs/prodlim.so':
  `maximal number of DLLs reached...
Failed with error:  'package 'prodlim' could not be loaded'
Error in requirePackages(package, why = paste("learner", id), default.method = "load") : 
  For learner surv.optimCoxBoostPenalty please install the following packages: CoxBoost
Error in requirePackages(package, why = paste("learner", id), default.method = "load") : 
  For learner cluster.cmeans please install the following packages: clue
Error in requirePackages(package, why = paste("learner", id), default.method = "load") : 
  For learner cluster.kmeans please install the following packages: clue
Knitting file 'learner.Rmd' ...

To fix it I replaced listLearners with a poor man's version without any error handling.

Related commits:
3f5e33f
fedc1df

@larskotthoff
Copy link
Contributor

Wait, why are those packages not installed? They are listed in the Travis configuration and according to the log are getting installed as binary versions.

@larskotthoff larskotthoff reopened this Nov 29, 2015
@berndbischl
Copy link
Contributor

the packages are installed, at least i guess so.
but they cannot be loaded because of the DLL problem. then mlr generates this message that the package is not installed.

@berndbischl
Copy link
Contributor

the only chance I see is
a) require the package only during training and not while we construct the object. we tried that once, it is not that easy and takes a longer time to test
b) generate the tables for the different types separately.

do you want to try b?

@schiffner
Copy link
Contributor Author

It's like Bernd said. The packages are properly installed (at least I checked the travis log which does not show any errors in installing them), but cannot be loaded because of the DLL problem. These loading problems are caught by listLearners and lead to missing learners in the returned object.

b) generate the tables for the different types separately.

do you want to try b?

What exactly do you mean by "separately"?

@berndbischl
Copy link
Contributor

I meant with b): If the tables for different learner types are in different pages in the tutorial, it might be possible to generate them im different R processes. So not all packages are loaded at once.

Or do we have another chance?

@schiffner
Copy link
Contributor Author

I'm not sure how many R processes we have there.

My impression from the logs was always that we have one process and the number of packages accumulates over different tutorial pages. For example the log file above continues with package loading errors in learner.Rmd, which comes directly after integrated_learners.Rmd:

Knitting file 'learner.Rmd' ...
Quitting from lines 143-154 () 
Error in head(listLearners("cluster", create = TRUE), 2) : 
  error in evaluating the argument 'x' in selecting a method for function 'head': Error in listLearners.character("cluster", create = TRUE) : 
  (converted from warning) The following learners could not be constructed, probably because their packages are not installed:
cluster.cmeans,cluster.kmeans
Check ?learners to see which packages you need or install mlr with all suggestions.
Calls: listLearners -> listLearners.character -> warningf
Calls: lapply ... withCallingHandlers -> withVisible -> eval -> eval -> head
Execution halted

You are certainly right that it would be easier to have different R processes if the tables are on different pages in the tutorial.
I'm taking a closer look at the build file now.

@berndbischl
Copy link
Contributor

My impression from the logs was always that we have one process and
the number of packages accumulates over different tutorial pages

I know. But if you have separate pages, we could do this at least in principle. Or do you want to somehow manually create the page for now? Is that easier?

@schiffner
Copy link
Contributor Author

At the moment it works (although it's ugly), i.e., in the current tutorial version no learners are missing in the table.

The only thing I came up with yesterday is: As long term solution maybe we could

  • as you proposed have separate pages for different learner types,
  • have an additional argument for build which says which tutorial pages should be knit (can default to all pages, but when building the tutorial on travis we can use it to knit the learner tables separately from the other pages),
  • insert an additional condition into the build file to make sure that mkdocs is only called if all the md-files are there.

@berndbischl
Copy link
Contributor

Ok, I agree. Like I said, my most preferred solution would be to be able to construct the learner objects without having to load their packages. This would fix everything at once. But I really dont know how hard this would be. it SHOULD be doable.

@berndbischl
Copy link
Contributor

see #580.
I gues this might be doable.

@schiffner
Copy link
Contributor Author

We now can create the learner tables without loading packages. See mlr-org/mlr#580 ✌️

Will adapt the integrated learners page and then close.

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

No branches or pull requests

3 participants