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

TF2.16.2 with tensorflow-io 0.37.1 shows pure virtual method called, terminate called without an active exception causing exit code 134 when working with s3 filesystem #2039

Open
shantanutrip opened this issue Jul 18, 2024 · 2 comments

Comments

@shantanutrip
Copy link

shantanutrip commented Jul 18, 2024

Hi,

When trying to use s3 filesystem with tensorflow-io==0.37.1 and tensorflow==2.16.2, I get the following error:

pure virtual method called
terminate called without an active exception
Aborted (core dumped)

This exits with error code 134.

This was discussed in another issue: #1912 for TF2.14 which was closed earlier. However, since the issue still persists, I am reopening it for resolution.

Steps to Reproduce:

  1. docker pull tensorflow/tensorflow:2.16.2-gpu (Image details from tf dockerhub)
  2. Exec into the container and pip install tensorflow-io==0.37.1
  3. Create a dummy record within the container using the following script:
import tensorflow as tf
import numpy as np

example_path = "example.tfrecords"
np.random.seed(0)

with tf.io.TFRecordWriter(example_path) as file_writer:
  for _ in range(4):
    x, y = np.random.random(), np.random.random()

    record_bytes = tf.train.Example(features=tf.train.Features(feature={
        "x": tf.train.Feature(float_list=tf.train.FloatList(value=[x])),
        "y": tf.train.Feature(float_list=tf.train.FloatList(value=[y])),
    })).SerializeToString()
    file_writer.write(record_bytes)

Source: https://www.tensorflow.org/api_docs/python/tf/io/TFRecordWriter
4. Upload the example.tfrecords file to s3 bucket
5. Use the following script with the s3 location of the uploaded record file:

import tensorflow as tf
import tensorflow_io as tfio
s3_filename="" #Fill this with the s3 uri of the uploaded file. Should look like s3://object-name/example.tfrecords
ds = tf.data.TFRecordDataset(s3_filename)
for element in ds:
    print(f"{element.shape}")

Script motivated from previous issue: #1912

While trying to install any other versions of tensorflow-io like : 0.32.*, 0.33.*,0.34.*,0.35.* or 0.36.*, I get the following error:

File system scheme 's3' not implemented

Fix needed for Aborted (core dumped) issue. Thanks!

@rivershah
Copy link

This is a duplicate. Please fix #1912
The issue is closed but the problem is not resolved

@shantanutrip
Copy link
Author

Hi team, any updates on this issue?

Please provide resolution for the common problem underlying both the issues - this and/or #1912.

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

2 participants