-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Dataset API 'flat_map' method producing error for same code which works with 'map' method #17415
Comments
So if your pipeline works with The function passed to |
Yes, the pipeline works without error when I use |
There's a difference between what |
So |
Sorry, this discussion should be had at https://stackoverflow.com/questions/tagged/tensorflow instead. Could you make a question there? |
Ok, thanks for the help. Just opened a question here: |
The solution suggested on StackOverflow was to covert the output of my py_function to a dataset. So I modified my py_function as shown below.
However I am still getting the 'map_func must return a Dataset object' error. It would be great if somebody could clarify whether this a bug or some problem with my code. |
I posted an answer on Stack Overflow. |
Please go to Stack Overflow for help and support:
https://stackoverflow.com/questions/tagged/tensorflow
If you open a GitHub issue, here is our policy:
Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information
Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
Custom code
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
TensorFlow installed from (source or binary): Binary
TensorFlow version (use command below): 1.6.0
Python version: 3.5
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: 9.0/7.0
GPU model and memory: GeForce GTX 860M
Exact command to reproduce: dataset = dataset.flat_map(lambda file_name: tf.py_func(_get_data_for_dataset, [file_name], tf.float64))
You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
Describe the problem
I am trying to create a create a pipeline to read mulitple CSV files using TensorFlow Dataset API and Pandas. However using the 'flat_map' method is producing errors. However if I am using 'map' method I am able to build the code and run it in session. This is the code I am using.
Source code / logs
I get the following error:
map_func
must return aDataset
object. It would also great if you could provide documentation on using Dataset API with Pandas module.The text was updated successfully, but these errors were encountered: