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

RuntimeError: Evaluation error: object 'feature_names' not found. #43

Open
ds-kalle opened this issue Jun 11, 2019 · 0 comments
Open

RuntimeError: Evaluation error: object 'feature_names' not found. #43

ds-kalle opened this issue Jun 11, 2019 · 0 comments

Comments

@ds-kalle
Copy link

Hello,

I am trying to get the the tfestimators examples in https://tensorflow.rstudio.com/tools/tfdatasets/articles/introduction.html to work but always get an

 Error in py_call_impl(callable, dots$args, dots$keywords) : 
  RuntimeError: Evaluation error: object 'feature_names' not found. 

The code I am using is the following (had to change column_numeric to tf$feature_column$numeric_column due to rstudio/tfestimators#173):

library(tfestimators)
library(tfdatasets)

mtcars_spec <- csv_record_spec("mtcars.csv")
dataset <- text_line_dataset("mtcars.csv", record_spec = mtcars_spec) %>% 
  dataset_batch(128) %>% 
  dataset_repeat(3)

cols <- feature_columns(
  tf$feature_column$numeric_column("mpg"),
  tf$feature_column$numeric_column("disp")
)

model <- linear_regressor(feature_columns = cols)

model %>% train(
  input_fn(dataset, features = c(mpg, disp), response = cyl)
)

I am getting this error with both 3.6 (TF v1.14.1-dev20190611 Nightly build because of tensorflow/tensorflow#23410) as well as 2.7 (TF v1.13.1) on Mac OSX 10.14.5.
Andy ideas?

Thanks a lot,
Kalle

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

1 participant