lanpa / tensorboardX

tensorboard for pytorch (and chainer, mxnet, numpy, ...)
https://tensorboardx.readthedocs.io/en/latest/tensorboard.html
MIT License
7.87k stars 863 forks source link

Expose use_strict_trace parameter in add_graph #694

Closed exyi closed 1 year ago

exyi commented 1 year ago

torch.utils.tensorboard has this argument to allow tracing models which return a dict or a list

See

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (5f1f074) 86.38% compared to head (aeb787a) 86.38%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #694 +/- ## ======================================= Coverage 86.38% 86.38% ======================================= Files 36 36 Lines 2343 2343 ======================================= Hits 2024 2024 Misses 319 319 ``` | [Impacted Files](https://codecov.io/gh/lanpa/tensorboardX/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tzu-Wei+Huang) | Coverage Δ | | |---|---|---| | [tensorboardX/writer.py](https://codecov.io/gh/lanpa/tensorboardX/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tzu-Wei+Huang#diff-dGVuc29yYm9hcmRYL3dyaXRlci5weQ==) | `86.41% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tzu-Wei+Huang). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tzu-Wei+Huang)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

lanpa commented 1 year ago

Is there a minimal pytorch version required for this parameter?

exyi commented 1 year ago

According to the git tags, it should be present in Torch v1.11.0. In 2.0 it seems to be present too https://github.com/pytorch/pytorch/blob/v2.0.0/torch/utils/tensorboard/_pytorch_graph.py#L321