Skip to content

Commit 77efba9

Browse files
yileiTensorflow Cloud maintainers
authored andcommitted
Update code to be compatible with importlib_resources v6.1.0.
PiperOrigin-RevId: 575256393
1 parent dfd9ca1 commit 77efba9

File tree

1 file changed

+3
-1
lines changed
  • src/python/tensorflow_cloud/core/experimental

1 file changed

+3
-1
lines changed

src/python/tensorflow_cloud/core/experimental/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,9 @@ def copy_entry_point(file_id, params_file):
293293

294294
def get_original_lines():
295295
"""Gets the file lines of models_entry_point.py as a list of strings."""
296-
with pkg_resources.open_text(__package__, _ENTRY_POINT_TEMPLATE) as file:
296+
with pkg_resources.files(__package__).joinpath(
297+
_ENTRY_POINT_TEMPLATE
298+
).open('rt') as file:
297299
lines = file.readlines()
298300
return lines
299301

0 commit comments

Comments
 (0)