Repository navigation
Use lazy load to avoid loading libtensorflow_io.so until needed. - #1208
Merged
Merged
Conversation
2 of 3 tasks
In tensorflow-io we have two shared libraries: - `libtensorflow_io.so` is linked with TF C++ API and does not have forward compatibility - `libtensorflow_io_plugins.so` is linked with TF C API and does have forward compatibility The plan is to eventually have libtensorflow_io.so linked to TF C API only but that will take a long time and requires rewriting C++ kernel (after modular kernel API is available in TF, unknown status now). With both `libtensorflow_io.so` and `libtensorflow_plugins.so` loaded in `import tensorflow_io as tfio`, the tensorflow-io package is not forward compatible even though our file systems implementations are forward compatible already. In the meantime, one way to allow forward compatible for file systems, is to lazy load `libtensorflow_io.so`: - When user tries to run some function like `decode_json` they still encounter errors if they have newer versions of TF. - However, thwn user tries to just use the file system feature (e.g., azfs/http/etc), it works with newer versions of TF with tensorflow-io through `import tensorflow_io as tfio` (not touching any other submodules in `tensorflow_io`). Signed-off-by: Yong Tang <[email protected]>
yongtang
force-pushed
the
lazy-load
branch
2 times, most recently
from
December 1, 2020 19:44
9c1d342 to
9f55b80
Compare
…itly Signed-off-by: Yong Tang <[email protected]>
Member
Author
|
/cc @terrytangyuan I exposed a to invoke OSS support explicitly. This can help us go through transition until OSS is converted to C file system API. |
i-ony
pushed a commit
to i-ony/io
that referenced
this pull request
Feb 8, 2021
…sorflow#1208) * Use lazy load to avoid loading libtensorflow_io.so until needed. In tensorflow-io we have two shared libraries: - `libtensorflow_io.so` is linked with TF C++ API and does not have forward compatibility - `libtensorflow_io_plugins.so` is linked with TF C API and does have forward compatibility The plan is to eventually have libtensorflow_io.so linked to TF C API only but that will take a long time and requires rewriting C++ kernel (after modular kernel API is available in TF, unknown status now). With both `libtensorflow_io.so` and `libtensorflow_plugins.so` loaded in `import tensorflow_io as tfio`, the tensorflow-io package is not forward compatible even though our file systems implementations are forward compatible already. In the meantime, one way to allow forward compatible for file systems, is to lazy load `libtensorflow_io.so`: - When user tries to run some function like `decode_json` they still encounter errors if they have newer versions of TF. - However, thwn user tries to just use the file system feature (e.g., azfs/http/etc), it works with newer versions of TF with tensorflow-io through `import tensorflow_io as tfio` (not touching any other submodules in `tensorflow_io`). Signed-off-by: Yong Tang <[email protected]> * Added tfio.experimental.oss() function to load OSS file system explicitly Signed-off-by: Yong Tang <[email protected]>
zheolong
pushed a commit
to zheolong/io-1
that referenced
this pull request
Jul 24, 2025
…sorflow#1208) * Use lazy load to avoid loading libtensorflow_io.so until needed. In tensorflow-io we have two shared libraries: - `libtensorflow_io.so` is linked with TF C++ API and does not have forward compatibility - `libtensorflow_io_plugins.so` is linked with TF C API and does have forward compatibility The plan is to eventually have libtensorflow_io.so linked to TF C API only but that will take a long time and requires rewriting C++ kernel (after modular kernel API is available in TF, unknown status now). With both `libtensorflow_io.so` and `libtensorflow_plugins.so` loaded in `import tensorflow_io as tfio`, the tensorflow-io package is not forward compatible even though our file systems implementations are forward compatible already. In the meantime, one way to allow forward compatible for file systems, is to lazy load `libtensorflow_io.so`: - When user tries to run some function like `decode_json` they still encounter errors if they have newer versions of TF. - However, thwn user tries to just use the file system feature (e.g., azfs/http/etc), it works with newer versions of TF with tensorflow-io through `import tensorflow_io as tfio` (not touching any other submodules in `tensorflow_io`). Signed-off-by: Yong Tang <[email protected]> * Added tfio.experimental.oss() function to load OSS file system explicitly Signed-off-by: Yong Tang <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In tensorflow-io we have two shared libraries:
libtensorflow_io.sois linked with TF C++ API and does not have forward compatibilitylibtensorflow_io_plugins.sois linked with TF C API and does have forward compatibilityThe plan is to eventually have libtensorflow_io.so linked to TF C API only
but that will take a long time and requires rewriting C++ kernel (after modular kernel API is available in TF, unknown status now).
With both
libtensorflow_io.soandlibtensorflow_plugins.soloaded inimport tensorflow_io as tfio,the tensorflow-io package is not forward compatible even though our file systems implementations are forward compatible already.
In the meantime, one way to allow forward compatible for file systems, is to lazy load
libtensorflow_io.so:decode_jsonthey still encounter errors if they have newer versions of TF.import tensorflow_io as tfio(not touching any other submodules intensorflow_io).This PR is part of the #1111.
Signed-off-by: Yong Tang [email protected]