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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc] Move to PyTorch compat #533

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/nightly_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ concurrency:
jobs:
build-wheel-linux:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
if: github.repository_owner == 'pytorch'
runs-on: ubuntu-20.04
strategy:
matrix:
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:

build-wheel-mac:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
if: github.repository_owner == 'pytorch'
runs-on: macos-latest
strategy:
matrix:
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:

test-wheel-mac:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
if: github.repository_owner == 'pytorch'
needs: build-wheel-mac
runs-on: macos-latest
strategy:
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:

upload-wheel-linux:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
if: github.repository_owner == 'pytorch'
needs: test-wheel-linux
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:

upload-wheel-mac:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
if: github.repository_owner == 'pytorch'
needs: test-wheel-mac
runs-on: macos-latest
strategy:
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:

test-wheel-linux:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
if: github.repository_owner == 'pytorch'
needs: build-wheel-linux
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -269,7 +269,7 @@ jobs:

build-wheel-windows:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
if: github.repository_owner == 'pytorch'
runs-on: windows-latest
strategy:
matrix:
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:

test-wheel-windows:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
if: github.repository_owner == 'pytorch'
needs: build-wheel-windows
runs-on: windows-latest
strategy:
Expand Down Expand Up @@ -355,7 +355,7 @@ jobs:

upload-wheel-windows:
# Don't run on forked repos.
if: github.repository_owner == 'pytorch-labs'
if: github.repository_owner == 'pytorch'
needs: test-wheel-windows
runs-on: windows-latest
strategy:
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--- BADGES: START --->
<!---
[![Documentation](https://img.shields.io/badge/Documentation-blue.svg?style=flat)](https://pytorch-labs.github.io/tensordict/)
[![Documentation](https://img.shields.io/badge/Documentation-blue.svg?style=flat)](https://pytorch.github.io/tensordict/)
--->
[![Docs - GitHub.io](https://img.shields.io/static/v1?logo=github&style=flat&color=pink&label=docs&message=tensordict)][#docs-package]
[![Benchmarks](https://img.shields.io/badge/Benchmarks-blue.svg)][#docs-package-benchmark]
Expand All @@ -10,18 +10,18 @@
<a href="https://pypi.org/project/tensordict-nightly"><img src="https://img.shields.io/pypi/v/tensordict-nightly?label=nightly" alt="pypi nightly version"></a>
[![Downloads](https://static.pepy.tech/personalized-badge/tensordict?period=total&units=international_system&left_color=blue&right_color=orange&left_text=Downloads)][#pepy-package]
[![Downloads](https://static.pepy.tech/personalized-badge/tensordict-nightly?period=total&units=international_system&left_color=blue&right_color=orange&left_text=Downloads%20(nightly))][#pepy-package-nightly]
[![codecov](https://codecov.io/gh/pytorch-labs/tensordict/branch/main/graph/badge.svg?token=9QTUG6NAGQ)][#codecov-package]
[![circleci](https://circleci.com/gh/pytorch-labs/tensordict.svg?style=shield)][#circleci-package]
[![codecov](https://codecov.io/gh/pytorch/tensordict/branch/main/graph/badge.svg?token=9QTUG6NAGQ)][#codecov-package]
[![circleci](https://circleci.com/gh/pytorch/tensordict.svg?style=shield)][#circleci-package]
[![Conda - Platform](https://img.shields.io/conda/pn/conda-forge/tensordict?logo=anaconda&style=flat)][#conda-forge-package]
[![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/tensordict?logo=anaconda&style=flat&color=orange)][#conda-forge-package]

[#docs-package]: https://pytorch-labs.github.io/tensordict/
[#docs-package-benchmark]: https://pytorch-labs.github.io/tensordict/dev/bench/
[#github-license]: https://github.com/pytorch-labs/tensordict/blob/main/LICENSE
[#docs-package]: https://pytorch.github.io/tensordict/
[#docs-package-benchmark]: https://pytorch.github.io/tensordict/dev/bench/
[#github-license]: https://github.com/pytorch/tensordict/blob/main/LICENSE
[#pepy-package]: https://pepy.tech/project/tensordict
[#pepy-package-nightly]: https://pepy.tech/project/tensordict-nightly
[#codecov-package]: https://codecov.io/gh/pytorch-labs/tensordict
[#circleci-package]: https://circleci.com/gh/pytorch-labs/tensordict
[#codecov-package]: https://codecov.io/gh/pytorch/tensordict
[#circleci-package]: https://circleci.com/gh/pytorch/tensordict
[#conda-forge-package]: https://anaconda.org/conda-forge/tensordict

<!--- BADGES: END --->
Expand Down Expand Up @@ -142,7 +142,7 @@ counterparts:
```

When nodes share a common scratch space, the
[`MemmapTensor` backend](https://pytorch-labs.github.io/tensordict/tutorials/tensordict_memory.html)
[`MemmapTensor` backend](https://pytorch.github.io/tensordict/tutorials/tensordict_memory.html)
can be used
to seamlessly send, receive and read a huge amount of data.

Expand Down
10 changes: 5 additions & 5 deletions docs/source/_static/js/tensordict_theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,10 +944,10 @@ var downloadNote = $(".sphx-glr-download-link-note.admonition.note");
if (downloadNote.length >= 1) {
var tutorialUrlArray = $("#tutorial-type").text().split('/');

var githubLink = "https://github.com/pytorch-labs/tensordict/tree/main/sphinx-tutorials/" + tutorialUrlArray[tutorialUrlArray.length - 1] + ".py",
var githubLink = "https://github.com/pytorch/tensordict/tree/main/sphinx-tutorials/" + tutorialUrlArray[tutorialUrlArray.length - 1] + ".py",
notebookLink = $(".reference.download")[1].href,
notebookDownloadPath = notebookLink.split('_downloads')[1],
colabLink = "https://colab.research.google.com/github/pytorch-labs/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;
colabLink = "https://colab.research.google.com/github/pytorch/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;

$("#google-colab-link").wrap("<a href=" + colabLink + " data-behavior='call-to-action-event' data-response='Run in Google Colab' target='_blank'/>");
$("#download-notebook-link").wrap("<a href=" + notebookLink + " data-behavior='call-to-action-event' data-response='Download Notebook'/>");
Expand Down Expand Up @@ -1373,16 +1373,16 @@ $("table").removeAttr("border");
// with the 3 download buttons at the top of the page

var downloadNote = $(".sphx-glr-download-link-note.admonition.note");
var githubLink = "https://github.com/pytorch-labs/tensordict/tree/main/tutorials/sphinx-tutorials/" + tutorialUrlArray.join("/") + ".py";
var githubLink = "https://github.com/pytorch/tensordict/tree/main/tutorials/sphinx-tutorials/" + tutorialUrlArray.join("/") + ".py";
$("#github-view-link").wrap("<a href=" + githubLink + " data-behavior='call-to-action-event' data-response='View on Github' target='_blank'/>");

// if (downloadNote.length >= 1) {
// var tutorialUrlArray = $("#tutorial-type").text().split('/');

// var githubLink = "https://github.com/pytorch-labs/tensordict/tree/main/tutorials/" + tutorialUrlArray.join("/") + ".py",
// var githubLink = "https://github.com/pytorch/tensordict/tree/main/tutorials/" + tutorialUrlArray.join("/") + ".py",
// notebookLink = $(".reference.download")[1].href,
// notebookDownloadPath = notebookLink.split('_downloads')[1],
// colabLink = "https://colab.research.google.com/github/pytorch-labs/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;
// colabLink = "https://colab.research.google.com/github/pytorch/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;

// $("#google-colab-link").wrap("<a href=" + colabLink + " data-behavior='call-to-action-event' data-response='Run in Google Colab' target='_blank'/>");
// $("#download-notebook-link").wrap("<a href=" + notebookLink + " data-behavior='call-to-action-event' data-response='Download Notebook'/>");
Expand Down
20 changes: 10 additions & 10 deletions docs/source/_static/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -945,10 +945,10 @@ if (downloadNote.length >= 1) {
var tutorialUrlArray = $("#tutorial-type").text().split('/');
tutorialUrlArray[0] = tutorialUrlArray[0] + "/sphinx_tuto"

var githubLink = "https://github.com/pytorch-labs/tensordict/blob/main/" + tutorialUrlArray.join("/") + ".py",
var githubLink = "https://github.com/pytorch/tensordict/blob/main/" + tutorialUrlArray.join("/") + ".py",
notebookLink = $(".reference.download")[1].href,
notebookDownloadPath = notebookLink.split('_downloads')[1],
colabLink = "https://colab.research.google.com/github/pytorch-labs/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;
colabLink = "https://colab.research.google.com/github/pytorch/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;

$("#google-colab-link").wrap("<a href=" + colabLink + " data-behavior='call-to-action-event' data-response='Run in Google Colab' target='_blank'/>");
$("#download-notebook-link").wrap("<a href=" + notebookLink + " data-behavior='call-to-action-event' data-response='Download Notebook'/>");
Expand Down Expand Up @@ -2073,10 +2073,10 @@ if (downloadNote.length >= 1) {
var tutorialUrlArray = $("#tutorial-type").text().split('/');
tutorialUrlArray[0] = tutorialUrlArray[0] + "/sphinx_tuto"

var githubLink = "https://github.com/pytorch-labs/tensordict/blob/main/" + tutorialUrlArray.join("/") + ".py",
var githubLink = "https://github.com/pytorch/tensordict/blob/main/" + tutorialUrlArray.join("/") + ".py",
notebookLink = $(".reference.download")[1].href,
notebookDownloadPath = notebookLink.split('_downloads')[1],
colabLink = "https://colab.research.google.com/github/pytorch-labs/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;
colabLink = "https://colab.research.google.com/github/pytorch/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;

$("#google-colab-link").wrap("<a href=" + colabLink + " data-behavior='call-to-action-event' data-response='Run in Google Colab' target='_blank'/>");
$("#download-notebook-link").wrap("<a href=" + notebookLink + " data-behavior='call-to-action-event' data-response='Download Notebook'/>");
Expand Down Expand Up @@ -3201,10 +3201,10 @@ if (downloadNote.length >= 1) {
var tutorialUrlArray = $("#tutorial-type").text().split('/');
tutorialUrlArray[0] = tutorialUrlArray[0] + "/sphinx_tuto"

var githubLink = "https://github.com/pytorch-labs/tensordict/blob/main/" + tutorialUrlArray.join("/") + ".py",
var githubLink = "https://github.com/pytorch/tensordict/blob/main/" + tutorialUrlArray.join("/") + ".py",
notebookLink = $(".reference.download")[1].href,
notebookDownloadPath = notebookLink.split('_downloads')[1],
colabLink = "https://colab.research.google.com/github/pytorch-labs/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;
colabLink = "https://colab.research.google.com/github/pytorch/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;

$("#google-colab-link").wrap("<a href=" + colabLink + " data-behavior='call-to-action-event' data-response='Run in Google Colab' target='_blank'/>");
$("#download-notebook-link").wrap("<a href=" + notebookLink + " data-behavior='call-to-action-event' data-response='Download Notebook'/>");
Expand Down Expand Up @@ -4328,10 +4328,10 @@ require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=
if (downloadNote.length >= 1) {
var tutorialUrlArray = $("#tutorial-type").text().split('/');

var githubLink = "https://github.com/pytorch-labs/tensordict/tree/main/tutorials/sphinx_tuto/" + tutorialUrlArray[tutorialUrlArray.length - 1] + ".py",
var githubLink = "https://github.com/pytorch/tensordict/tree/main/tutorials/sphinx_tuto/" + tutorialUrlArray[tutorialUrlArray.length - 1] + ".py",
notebookLink = $(".reference.download")[1].href,
notebookDownloadPath = notebookLink.split('_downloads')[1],
colabLink = "https://colab.research.google.com/github/pytorch-labs/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;
colabLink = "https://colab.research.google.com/github/pytorch/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;

$("#google-colab-link").wrap("<a href=" + colabLink + " data-behavior='call-to-action-event' data-response='Run in Google Colab' target='_blank'/>");
$("#download-notebook-link").wrap("<a href=" + notebookLink + " data-behavior='call-to-action-event' data-response='Download Notebook'/>");
Expand Down Expand Up @@ -4760,10 +4760,10 @@ require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=
if (downloadNote.length >= 1) {
var tutorialUrlArray = $("#tutorial-type").text().split('/');

var githubLink = "https://github.com/pytorch-labs/tensordict/tree/main/tutorials/sphinx_tuto/" + tutorialUrlArray.join("/") + ".py",
var githubLink = "https://github.com/pytorch/tensordict/tree/main/tutorials/sphinx_tuto/" + tutorialUrlArray.join("/") + ".py",
notebookLink = $(".reference.download")[1].href,
notebookDownloadPath = notebookLink.split('_downloads')[1],
colabLink = "https://colab.research.google.com/github/pytorch-labs/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;
colabLink = "https://colab.research.google.com/github/pytorch/tensordict/blob/gh-pages/_downloads" + notebookDownloadPath;

$("#google-colab-link").wrap("<a href=" + colabLink + " data-behavior='call-to-action-event' data-response='Run in Google Colab' target='_blank'/>");
$("#download-notebook-link").wrap("<a href=" + notebookLink + " data-behavior='call-to-action-event' data-response='Download Notebook'/>");
Expand Down
2 changes: 1 addition & 1 deletion docs/source/distributed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Operating on Memory-mapped tensors across nodes
We provide a simple example of a distributed script where one process creates a
memory-mapped tensor, and sends its reference to another worker that is responsible of
updating it. You will find this example in the
`benchmark directory <https://github.com/pytorch-labs/tensordict/tree/main/benchmarks/distributed_benchmark.py>`_.
`benchmark directory <https://github.com/pytorch/tensordict/tree/main/benchmarks/distributed_benchmark.py>`_.

In short, our goal is to show how to handle read and write operations on big
tensors when nodes have access to a shared physical storage. The steps involve:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def _main(argv):
version=version,
author="tensordict contributors",
author_email="[email protected]",
url="https://github.com/pytorch-labs/tensordict",
url="https://github.com/pytorch/tensordict",
long_description=long_description,
long_description_content_type="text/markdown",
license="BSD",
Expand Down
4 changes: 2 additions & 2 deletions tutorials/sphinx_tuto/tensorclass_imagenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,11 @@ def __call__(self, x: ImageNetData):
##############################################################################
# This shows that much of the overhead is coming from i/o operations rather than the
# transforms, and hence explains how the memory-mapped array helps us load data more
# efficiently. Check out the `distributed example <https://github.com/pytorch-labs/tensordict/tree/main/benchmarks/distributed/dataloading.py>`__
# efficiently. Check out the `distributed example <https://github.com/pytorch/tensordict/tree/main/benchmarks/distributed/dataloading.py>`__
# for more context about the other results from these charts.
#
# We can get even better performance with the TensorClass approach by using multiple
# workers to load batches from the memory-mapped array, though this comes with some
# added complexity. See `this example in our benchmarks
# <https://github.com/pytorch-labs/tensordict/blob/main/benchmarks/distributed/dataloading.py>`__
# <https://github.com/pytorch/tensordict/blob/main/benchmarks/distributed/dataloading.py>`__
# for an example of how this could work.
Loading