AttributeError: module 'tfx.utils.io_utils' has no attribute 'file_io'

8 views Asked by At

I updated the tfx from 0.22.0 to 1.8.0 and now I'm getting this error:

AttributeError: module 'tfx.utils.io_utils' has no attribute 'file_io'

The code is:

from tfx.utils import io_utils

io_utils.file_io.read_file_to_string(fname)
1

There are 1 answers

0
natielle On

The correct way to call io_utils.file_io.read_file_to_string in tfx version 1.8.0 is:

from tfx.utils import io_utils
io_utils.read_string_file(fname)