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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

'LocalFileSystem' object has no attribute 'makedirs' #34028

Closed
nkalavak opened this issue Mar 1, 2020 · 5 comments
Closed

'LocalFileSystem' object has no attribute 'makedirs' #34028

nkalavak opened this issue Mar 1, 2020 · 5 comments
Assignees
Labels
high priority module: tensorboard oncall: visualization Related to visualization in PyTorch, e.g., tensorboard triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@nkalavak
Copy link

nkalavak commented Mar 1, 2020

馃悰 Bug

To Reproduce

Steps to reproduce the behavior:

While working with the add_embedding method for TensorBoard (for the first time), there seems to be an issue with one of the lines in the writer.py files that is invoked. The simplest way to reproduce would be to test the Adding a "Projector" to TensorBoard section of the TensorBoard tutorial (Link: https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html#adding-a-projector-to-tensorboard)

warning: Embedding dir exists, did you set global_step for add_embedding()?
  File "training_visualization.py", line 87, in <module>
    writer.add_embedding(features, metadata=class_labels, label_img=images.unsqueeze(1))
  File "/home/nivii/Desktop/python_environments/pytorch_py36/lib/python3.6/site-packages/torch/utils/tensorboard/writer.py", line 794, in add_embedding
    make_tsv(metadata, save_path, metadata_header=metadata_header)
  File "/home/nivii/Desktop/python_environments/pytorch_py36/lib/python3.6/site-packages/torch/utils/tensorboard/_embedding.py", line 20, in make_tsv
    fs.write(fs.join(save_path, 'metadata.tsv'), metadata_bytes, binary_mode=True)
AttributeError: 'LocalFileSystem' object has no attribute 'write'


Expected behavior

No error, I presume. I am not sure where is should be setting the global_step in the case of the tutorial, while following it sequentially.

Environment

Please copy and paste the output from our
environment collection script
(or fill out the checklist below manually).

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
  • PyTorch Version (e.g., 1.0): 1.4.0
  • OS (e.g., Linux): Linux
  • How you installed PyTorch (conda, pip, source): pip
  • Build command you used (if compiling from source):
  • Python version: 3.6
  • CUDA/cuDNN version: 10.0/7/5/0
  • GPU models and configuration: NVIDIA RTX2060
  • Any other relevant information: Tensorboard 1.14.0

Additional context

cc @ezyang @gchanan @zou3519

@ezyang ezyang added module: tensorboard triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module high priority labels Mar 2, 2020
@ezyang
Copy link
Contributor

ezyang commented Mar 2, 2020

Marking as high priority as it seems that basic functionality in tensorboard does not seem to work

@yf225 yf225 added oncall: visualization Related to visualization in PyTorch, e.g., tensorboard and removed triage review labels Mar 9, 2020
@savadhanistablab
Copy link

This worked for me:

  • Uninstalled tensorflow,
  • Reinstalled Tensorboard.
    PS: Restart Kernel and tensorboard.

@peterbell10
Copy link
Collaborator

peterbell10 commented Mar 27, 2020

write was added to tensorboard's LocalFileSystem stub in tensorflow/tensorboard#2260 which is included in tensorboard 1.15 and up (September 2019).

@savadhanistablab's workaround probably just updates tensorboard.

So, should we add a version check for tensorboard, or just give a better error if not hasattr(fs, 'write')?

@peterbell10 peterbell10 self-assigned this Mar 27, 2020
@peterbell10
Copy link
Collaborator

1.14 seems to be the enforced minimum version currently

'This should be available in 1.14 or above.')

@beikejinmiao
Copy link

beikejinmiao commented Mar 31, 2020

tensorboard==1.14.0 is not worked for me. So, I upgrade it to the newest 2.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority module: tensorboard oncall: visualization Related to visualization in PyTorch, e.g., tensorboard triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants