learndrake icon indicating copy to clipboard operation
learndrake copied to clipboard

Error: Target `conf_model_relu` failed. Error message: invalid argument type

Open khailper opened this issue 7 years ago • 4 comments

When working through 4-plans, I tried to run chunk 6:

make(plan)

readd(metrics)

I got this error message:

Running make() in a subdirectory of your project. 
This could cause problems if your file_in()/file_out()/knitr_in() files are relative paths.
Please either
  (1) run make() from your drake project root, or
  (2) create a cache in your working directory with new_cache('path_name'), or
  (3) supply a cache of your own (e.g. make(cache = your_cache))
      whose folder name is not '.drake'.
  running make() from: C:/Users/Karl Hailperin/Documents/RWorkDir/learn_drake/learndrake/4-plans
  drake project root:  C:/Users/Karl Hailperin/Documents/RWorkDir/learn_drake
  cache directory:     C:\Users\Karl Hailperin\Documents\RWorkDir\learn_drake\.draketarget conf_model_relu
2019-07-03 08:37:18.930820: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
fail conf_model_relu
Error: Target `conf_model_relu` failed. Call `diagnose(conf_model_relu)` for details. Error message:
  invalid argument type

khailper avatar Jul 03 '19 13:07 khailper

It looks like you may be having some working directory issues. Let's try this:

  1. Clear all the caches from 4-plans.Rmd. Inside the 4-plans folder, keep running clean(destroy = TRUE) until find_cache() returns NULL.
  2. Restart your R session.
  3. Run the setup chunk in both the notebook itself and the R console. Depending on how you are running things, it may not be enough to click the green arrow that runs the chunk. If you are running code from outside the notebook too, then you will have to copy and paste these lines directly into your console:

https://github.com/wlandau/learndrake/blob/adeb7c0e2f4532130fa0ea8ac02dae225392e9fa/inst/notebooks/4-plans/4-plans.Rmd#L7-L10

wlandau avatar Jul 03 '19 15:07 wlandau

Works perfectly. I had gotten an error* when trying to change the working directory, but ignored it since the source calls worked fine.

*

Error in setwd(file.path(rprojroot::find_rstudio_root_file(), "4-plans")) : 
  cannot change working directory

Error occurs both in console and with Ctrl + Shift + Enter.

khailper avatar Jul 03 '19 15:07 khailper

Hmm... I wonder if I can make it easer to get to the right directory. Maybe each notebook folder should have its own RStudio project file.

wlandau avatar Jul 03 '19 15:07 wlandau

Just added Rproj files to make the setup easier.

wlandau avatar Jul 03 '19 16:07 wlandau