Commit Graph

7 Commits

Author SHA1 Message Date
Justin Chu
abc1cadddb [BE] Enable ruff's UP rules and autoformat utils/ (#105424)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105424
Approved by: https://github.com/ezyang, https://github.com/malfet
2023-07-18 20:17:25 +00:00
Yuxin Wu
c00b135adf Remove deprecated call to tf.io.gfile.get_filesystem (#89832)
Fixes #30966 . Fixes #47139
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89832
Approved by: https://github.com/soumith
2022-12-08 08:53:27 +00:00
Edward Wang (EcoF)
7c0ccb8a9d black formatting for utils/tensorboard (#76396)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/76396

Reviewed By: Reubend

Differential Revision: D35945748

Pulled By: edward-io

fbshipit-source-id: ffee22e88aaf49eb98b3e2eb6624a2dadb8ef754
(cherry picked from commit 6b5656b7c081cd69135b54f7d13d02c1c361b696)
2022-04-28 00:21:58 +00:00
Tzu-Wei Huang
80b01ba4f3 [TensorBoard] fix #34954 (#36496)
Summary:
cc orionr sanekmelnikov
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36496

Differential Revision: D21012775

Pulled By: natalialunova

fbshipit-source-id: 2dc978d70d457b511bd13a3399246ae0349ff8ca
2020-04-14 19:23:47 -07:00
Alexander Melnikov
73c1030328 Support logging tensorboard embedding visualizations to generic filesystem (#27716)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27716

This uses the gfile filesystem abstraction that allows for writing to any filesystem that satisfies the interface (including S3).

Test Plan: Tested with local files and using internal S3 equivalent.

Reviewed By: natalialunova

Differential Revision: D17530694

fbshipit-source-id: c1f88c035fc03d91186b39092e42489f1c03d2cd
2019-10-22 08:12:25 -07:00
Orion Reblitz-Richardson
818828e8a8 Only import PIL when needed (#23023)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/22389

In most cases we only import `PIL` methods when we need them, but we missed a spot.

cc lanpa natalialunova sanekmelnikov
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23023

Reviewed By: sanekmelnikov

Differential Revision: D16373492

Pulled By: orionr

fbshipit-source-id: b08bf8a9b5a861390eadf62eda21ac055777180f
2019-07-19 13:30:43 -07:00
Tzu-Wei Huang
98e312cf96 TensorBoard support within PyTorch (#16196)
Summary:
This PR adds TensorBoard logging support natively within PyTorch. It is based on the tensorboardX  code developed by lanpa and relies on changes inside the tensorflow/tensorboard repo landing at https://github.com/tensorflow/tensorboard/pull/2065.

With  these changes users can simply `pip install tensorboard; pip install torch` and then log PyTorch data directly to the TensorBoard protobuf format using

```
import torch
from torch.utils.tensorboard import SummaryWriter
writer = SummaryWriter()
s1 = torch.rand(1)
writer.add_scalar('data/scalar1', s1[0], 0)
writer.close()
```

Design:
- `EventFileWriter` and `RecordWriter` from tensorboardX now live in tensorflow/tensorboard
- `SummaryWriter` and PyTorch-specific conversion from tensors, nn modules, etc. now live in pytorch/pytorch. We also support Caffe2 blobs and nets.

Action items:
- [x] `from torch.utils.tensorboard import SummaryWriter`
- [x] rename functions
- [x] unittests
- [x] move actual writing function to tensorflow/tensorboard in https://github.com/tensorflow/tensorboard/pull/2065

Review:
- Please review for PyTorch standard formatting, code usage, etc.
- Please verify unittest usage is correct and executing in CI

Any significant changes made here will likely be synced back to github.com/lanpa/tensorboardX/ in the future.

cc orionr, ezyang
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16196

Differential Revision: D15062901

Pulled By: orionr

fbshipit-source-id: 3812eb6aa07a2811979c5c7b70810261f9ea169e
2019-04-25 21:30:23 -07:00