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
'tensorflow_core._api.v2.io.gfile' has no attribute 'get_filesystem' #30966
Comments
Could you include the code snippet for reproduction? If it's related to the tutorials, it's also better to open an issue in pytorch/tutorials. |
Do you want me to rewrite on pytorch/tutorials? I did. |
I use the following environment and not problem occurs. The code I used is #30525, which is from the doc as well. torch==1.3.1 |
I am using lastest nightly environment. And python 3.7.5
10 Ara 2019 Sal 21:22 tarihinde Tzu-Wei Huang <notifications@github.com>
şunu yazdı:
1�7 I use the following environment and not problem occurs. The code I used is
#30525 <#30525>, which is from
the doc as well.
@develooper1994 <https://github.com/develooper1994> What is your value of
save_path?
torch==1.3.1
torchvision==0.4.2
tensorboard==2.0.2
tensorflow==2.0.0
tensorflow-estimator==2.0.1
python==3.6.9
1�7
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30966?email_source=notifications&email_token=ACXCIQQBFHTDOWBHUOXEDKLQX7M63A5CNFSM4JYK3XF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGQH4JQ#issuecomment-564166182>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXCIQVXGWMHJXARWBIBS23QX7M63ANCNFSM4JYK3XFQ>
.
|
Still can't produce with 1.4.0.dev20191211 and python 3.7.5 |
I didn't try after fail. I have started long run. |
#27716 |
Has anyone got the solution yet I still have the problem torch 1.5.0.dev2020011 |
You can create a new environment, then install pytorch and tensorboard. Note: you should not install tensorflow as there would be a kind of conflict with tensorboard. |
Thank you @Jean-KOUAGOU this fixed my problem. |
As you can see from these two links https://github.com/tensorflow/tensorboard/blob/master/tensorboard/compat/__init__.py#L46-L57 tensorboard has it's own implementation of gfile that it uses if tensorflow is not present on the system. @sanekmelnikov used a non-public API from this stub implementation when implementing #27716 |
Temporary solution import tensorflow as tf
import tensorboard as tb
tf.io.gfile = tb.compat.tensorflow_stub.io.gfile |
I would like to add to @korakot s workaround that it did slow down program execution by a huge factor if you have many summarywriter calls. Has anybody else observed this? Using latest pytorch 1.4 and tensorboard 2.2 |
Removing Tensorflow from the Pytorch/Tensorboard env, as mentioned by @Jean-KOUAGOU, worked for me. |
@clefourrier , could you clarify what you did? I am having the same problem, thanks. @korakot , your solution works for me but I don't understand what it specifically does. Could you please explain? Thanks! |
@fabrizioschiano : If you created a virtualenv to use pytorch in (using this for example), you have to make sure that you only installed pytorch and tensorboard, but not tensorflow, as it has conflicts with the others. As I said, removing tensorflow from the vritualenv containing pytorch and tensorboard solved the problem for me. If you did not create a virtualenv and installed everything in the same spot, either
|
Had the same issue with google colab. Uninstalling tensorflow will remove the |
Python == '3.7.5'
torch.version == '1.4.0.dev20191208'
torchvision.version == '0.5.0.dev20191209'
tensorflow.version == '2.0.0'
tensorboard.version == '2.0.2'
https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html
VISUALIZING MODELS, DATA, AND TRAINING WITH TENSORBOARD (CELL 7)
writer.add_embedding(features,
metadata=class_labels,
label_img=images.unsqueeze(1))
===> label_img=images.unsqueeze(1) # [error happens here]
Traceback:
AttributeError Traceback (most recent call last)
in
19 writer.add_embedding(features,
20 metadata=class_labels,
---> 21 label_img=images.unsqueeze(1))
22 writer.close()
~\Anaconda3\lib\site-packages\torch\utils\tensorboard\writer.py in add_embedding(self, mat, metadata, label_img, global_step, tag, metadata_header)
779 save_path = os.path.join(self._get_file_writer().get_logdir(), subdir)
780
--> 781 fs = tf.io.gfile.get_filesystem(save_path)
782 if fs.exists(save_path):
783 if fs.isdir(save_path):
AttributeError: module 'tensorflow_core._api.v2.io.gfile' has no attribute 'get_filesystem'
The text was updated successfully, but these errors were encountered: