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

vignette #4

Closed
sckott opened this issue Aug 16, 2018 · 8 comments
Closed

vignette #4

sckott opened this issue Aug 16, 2018 · 8 comments
Assignees

Comments

@sckott
Copy link

sckott commented Aug 16, 2018

from JOSS review:

I couldn't install while also building the vignette

devtools::install_github("boyanangelov/sdmbench", build_vignettes=TRUE, force = TRUE)
* checking for file/private/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T/Rtmph6H98S/devtools35453b08bf41/boyanangelov-sdmbench-f34ed13/DESCRIPTION... OK
* preparingsdmbench:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... ERROR
sh: /usr/local/bin/virtualenv: /usr/local/opt/python/bin/python3.6: bad interpreter: No such file or directory
Quitting from lines 12-18 (sdmbench_vignette.Rmd)
Error: processing vignette 'sdmbench_vignette.Rmd' failed with diagnostics:
Error 126 occurred creating virtualenv at ~/.virtualenvs/r-tensorflow
Execution halted
Installation failed: Command failed (1)

I guess a python virtualenv problem, but not sure how to solve. Reason I bring up is that the vignette here https://boyanangelov.com/materials/sdmbench_vignette.html has examples that aren't in line with the version of the package at v0.1.2, e.g.,

benchmarking_data <- get_benchmarking_data("Ornithorhynchus anatinus", limit = 1200, bioclim_resolution = 10)
#> Error in get_benchmarking_data("Ornithorhynchus anatinus", limit = 1200,  :
#>   unused argument (bioclim_resolution = 10)

another example: had to change benchmarking_data$raster_data$bioclim_data$bio1 to benchmarking_data$raster_data$climate_variables$bio1 get the first plot eg to work

@boyanangelov
Copy link
Owner

Hello @sckott. Thank you for submitting the issue! I did not manage to replicate the problem, but have added additional information about the Python and Java installations to both the README.md and the package vignette. If there is a working installation of Python, followed by the keras setup in the documentation, the vignette should now compile successfuly. Could you let me know if this is the right level of detail, and if it is I can close the issue?

I also updated the uploaded vignette to be in line with the version of the package, they will be in sync from now on.

@goldingn
Copy link

I'm having a different problem installing whilst building the vignette:

devtools::install_github("boyanangelov/sdmbench", force = TRUE, build_vignettes = TRUE)
Warning in predict.lm(object, newdata, se.fit, scale = 1, type = ifelse(type ==  :
  prediction from a rank-deficient fit may be misleading
  ...
Quitting from lines 246-252 (sdmbench_vignette.Rmd) 
Error: processing vignette 'sdmbench_vignette.Rmd' failed with diagnostics:
attempt to select less than one element in get1index
Execution halted
Installation failed: Command failed (1)

I have a working installation of maxent. E.g. I can do:

library(dismo)
example(maxent)

which completes successfully.

Installing without vignettes, and then running the vignette as an R notebook, I get the following error in the chunk mentioned above:

Error in eval@models[[best_model_id]] : attempt to select less than one element in get1index

traceback:

4.  .local(object, ...)
3.  dismo::predict(raster_data$climate_variables, eval@models[[best_model_id]])
2.  dismo::predict(raster_data$climate_variables, eval@models[[best_model_id]])
1.  evaluate_maxent(benchmarking_data$raster_data, method = "block")

@goldingn
Copy link

OK, looks like my error is actually due to an API change in ENMeval.

On this line you access the full.AUC column of the results dataframe. I have version 0.3.0 (which hit CRAN 2 weeks ago), which doesn't have that column, and the Value section of the helpfile says for the results dataframe:

Note that the names of some columns changed as of Version 0.3.0.

I would suggest you change the code and add ENMeval v0.3.0 as a version dependency. Alternatively, you could write code to handle whatever version of ENMeval is installed, but you'd have to be confident nothing else is different between the versions, and that could be tricky to maintain.

I'm having some curious trouble trying to install an earlier version of ENMeval, so will wait for you to fix this before trying again.

@boyanangelov
Copy link
Owner

Thanks for going so deep to find the exact issue @goldingn . I adjusted the code to use the ENMEval v0.3.0 AUC extraction, and also added that as a dependency. Can you try to build the vignette again?

@goldingn
Copy link

Seems to work for me now, thanks!

Not sure whether @sckott's issue was resolved though?

@boyanangelov
Copy link
Owner

boyanangelov commented Aug 31, 2018

Ok @goldingn.

@sckott Can you check if the command virtualenv in your terminal works? If not maybe the issue is that you don't have it installed. For Python 3 (looks like this is your default python) do:

sudo pip3 install virtualenv 

Then try to install keras separately from building the vignette (faster to debug):

install.packages("keras")
library(keras)
install_keras()

Let me know if any of those work and you can build the vignette, and I will add them to the README (already updated it with some stuff).

@sckott
Copy link
Author

sckott commented Sep 24, 2018

yes will do

@sckott
Copy link
Author

sckott commented Sep 24, 2018

works now, thanks

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