Skip to content

Commit 302c342

Browse files
author
Vincent Moens
authored
[Misc] Move to PyTorch compat (#533)
1 parent accd8a4 commit 302c342

File tree

7 files changed

+37
-37
lines changed

7 files changed

+37
-37
lines changed

.github/workflows/nightly_build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ concurrency:
3030
jobs:
3131
build-wheel-linux:
3232
# Don't run on forked repos.
33-
if: github.repository_owner == 'pytorch-labs'
33+
if: github.repository_owner == 'pytorch'
3434
runs-on: ubuntu-20.04
3535
strategy:
3636
matrix:
@@ -69,7 +69,7 @@ jobs:
6969

7070
build-wheel-mac:
7171
# Don't run on forked repos.
72-
if: github.repository_owner == 'pytorch-labs'
72+
if: github.repository_owner == 'pytorch'
7373
runs-on: macos-latest
7474
strategy:
7575
matrix:
@@ -101,7 +101,7 @@ jobs:
101101

102102
test-wheel-mac:
103103
# Don't run on forked repos.
104-
if: github.repository_owner == 'pytorch-labs'
104+
if: github.repository_owner == 'pytorch'
105105
needs: build-wheel-mac
106106
runs-on: macos-latest
107107
strategy:
@@ -150,7 +150,7 @@ jobs:
150150
151151
upload-wheel-linux:
152152
# Don't run on forked repos.
153-
if: github.repository_owner == 'pytorch-labs'
153+
if: github.repository_owner == 'pytorch'
154154
needs: test-wheel-linux
155155
runs-on: ubuntu-20.04
156156
strategy:
@@ -181,7 +181,7 @@ jobs:
181181
182182
upload-wheel-mac:
183183
# Don't run on forked repos.
184-
if: github.repository_owner == 'pytorch-labs'
184+
if: github.repository_owner == 'pytorch'
185185
needs: test-wheel-mac
186186
runs-on: macos-latest
187187
strategy:
@@ -209,7 +209,7 @@ jobs:
209209
210210
test-wheel-linux:
211211
# Don't run on forked repos.
212-
if: github.repository_owner == 'pytorch-labs'
212+
if: github.repository_owner == 'pytorch'
213213
needs: build-wheel-linux
214214
runs-on: ubuntu-20.04
215215
strategy:
@@ -269,7 +269,7 @@ jobs:
269269
270270
build-wheel-windows:
271271
# Don't run on forked repos.
272-
if: github.repository_owner == 'pytorch-labs'
272+
if: github.repository_owner == 'pytorch'
273273
runs-on: windows-latest
274274
strategy:
275275
matrix:
@@ -301,7 +301,7 @@ jobs:
301301

302302
test-wheel-windows:
303303
# Don't run on forked repos.
304-
if: github.repository_owner == 'pytorch-labs'
304+
if: github.repository_owner == 'pytorch'
305305
needs: build-wheel-windows
306306
runs-on: windows-latest
307307
strategy:
@@ -355,7 +355,7 @@ jobs:
355355
356356
upload-wheel-windows:
357357
# Don't run on forked repos.
358-
if: github.repository_owner == 'pytorch-labs'
358+
if: github.repository_owner == 'pytorch'
359359
needs: test-wheel-windows
360360
runs-on: windows-latest
361361
strategy:

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--- BADGES: START --->
22
<!---
3-
[![Documentation](https://img.shields.io/badge/Documentation-blue.svg?style=flat)](https://pytorch-labs.github.io/tensordict/)
3+
[![Documentation](https://img.shields.io/badge/Documentation-blue.svg?style=flat)](https://pytorch.github.io/tensordict/)
44
--->
55
[![Docs - GitHub.io](https://img.shields.io/static/v1?logo=github&style=flat&color=pink&label=docs&message=tensordict)][#docs-package]
66
[![Benchmarks](https://img.shields.io/badge/Benchmarks-blue.svg)][#docs-package-benchmark]
@@ -10,18 +10,18 @@
1010
<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>
1111
[![Downloads](https://static.pepy.tech/personalized-badge/tensordict?period=total&units=international_system&left_color=blue&right_color=orange&left_text=Downloads)][#pepy-package]
1212
[![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]
13-
[![codecov](https://codecov.io/gh/pytorch-labs/tensordict/branch/main/graph/badge.svg?token=9QTUG6NAGQ)][#codecov-package]
14-
[![circleci](https://circleci.com/gh/pytorch-labs/tensordict.svg?style=shield)][#circleci-package]
13+
[![codecov](https://codecov.io/gh/pytorch/tensordict/branch/main/graph/badge.svg?token=9QTUG6NAGQ)][#codecov-package]
14+
[![circleci](https://circleci.com/gh/pytorch/tensordict.svg?style=shield)][#circleci-package]
1515
[![Conda - Platform](https://img.shields.io/conda/pn/conda-forge/tensordict?logo=anaconda&style=flat)][#conda-forge-package]
1616
[![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/tensordict?logo=anaconda&style=flat&color=orange)][#conda-forge-package]
1717

18-
[#docs-package]: https://pytorch-labs.github.io/tensordict/
19-
[#docs-package-benchmark]: https://pytorch-labs.github.io/tensordict/dev/bench/
20-
[#github-license]: https://github.com/pytorch-labs/tensordict/blob/main/LICENSE
18+
[#docs-package]: https://pytorch.github.io/tensordict/
19+
[#docs-package-benchmark]: https://pytorch.github.io/tensordict/dev/bench/
20+
[#github-license]: https://github.com/pytorch/tensordict/blob/main/LICENSE
2121
[#pepy-package]: https://pepy.tech/project/tensordict
2222
[#pepy-package-nightly]: https://pepy.tech/project/tensordict-nightly
23-
[#codecov-package]: https://codecov.io/gh/pytorch-labs/tensordict
24-
[#circleci-package]: https://circleci.com/gh/pytorch-labs/tensordict
23+
[#codecov-package]: https://codecov.io/gh/pytorch/tensordict
24+
[#circleci-package]: https://circleci.com/gh/pytorch/tensordict
2525
[#conda-forge-package]: https://anaconda.org/conda-forge/tensordict
2626

2727
<!--- BADGES: END --->
@@ -142,7 +142,7 @@ counterparts:
142142
```
143143

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

docs/source/_static/js/tensordict_theme.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -944,10 +944,10 @@ var downloadNote = $(".sphx-glr-download-link-note.admonition.note");
944944
if (downloadNote.length >= 1) {
945945
var tutorialUrlArray = $("#tutorial-type").text().split('/');
946946

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

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

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

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

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

13871387
// $("#google-colab-link").wrap("<a href=" + colabLink + " data-behavior='call-to-action-event' data-response='Run in Google Colab' target='_blank'/>");
13881388
// $("#download-notebook-link").wrap("<a href=" + notebookLink + " data-behavior='call-to-action-event' data-response='Download Notebook'/>");

docs/source/_static/js/theme.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -945,10 +945,10 @@ if (downloadNote.length >= 1) {
945945
var tutorialUrlArray = $("#tutorial-type").text().split('/');
946946
tutorialUrlArray[0] = tutorialUrlArray[0] + "/sphinx_tuto"
947947

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

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

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

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

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

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

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

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

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

47684768
$("#google-colab-link").wrap("<a href=" + colabLink + " data-behavior='call-to-action-event' data-response='Run in Google Colab' target='_blank'/>");
47694769
$("#download-notebook-link").wrap("<a href=" + notebookLink + " data-behavior='call-to-action-event' data-response='Download Notebook'/>");

docs/source/distributed.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Operating on Memory-mapped tensors across nodes
8181
We provide a simple example of a distributed script where one process creates a
8282
memory-mapped tensor, and sends its reference to another worker that is responsible of
8383
updating it. You will find this example in the
84-
`benchmark directory <https://github.com/pytorch-labs/tensordict/tree/main/benchmarks/distributed_benchmark.py>`_.
84+
`benchmark directory <https://github.com/pytorch/tensordict/tree/main/benchmarks/distributed_benchmark.py>`_.
8585

8686
In short, our goal is to show how to handle read and write operations on big
8787
tensors when nodes have access to a shared physical storage. The steps involve:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def _main(argv):
164164
version=version,
165165
author="tensordict contributors",
166166
author_email="vmoens@fb.com",
167-
url="https://github.com/pytorch-labs/tensordict",
167+
url="https://github.com/pytorch/tensordict",
168168
long_description=long_description,
169169
long_description_content_type="text/markdown",
170170
license="BSD",

tutorials/sphinx_tuto/tensorclass_imagenet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,11 @@ def __call__(self, x: ImageNetData):
402402
##############################################################################
403403
# This shows that much of the overhead is coming from i/o operations rather than the
404404
# transforms, and hence explains how the memory-mapped array helps us load data more
405-
# efficiently. Check out the `distributed example <https://github.com/pytorch-labs/tensordict/tree/main/benchmarks/distributed/dataloading.py>`__
405+
# efficiently. Check out the `distributed example <https://github.com/pytorch/tensordict/tree/main/benchmarks/distributed/dataloading.py>`__
406406
# for more context about the other results from these charts.
407407
#
408408
# We can get even better performance with the TensorClass approach by using multiple
409409
# workers to load batches from the memory-mapped array, though this comes with some
410410
# added complexity. See `this example in our benchmarks
411-
# <https://github.com/pytorch-labs/tensordict/blob/main/benchmarks/distributed/dataloading.py>`__
411+
# <https://github.com/pytorch/tensordict/blob/main/benchmarks/distributed/dataloading.py>`__
412412
# for an example of how this could work.

0 commit comments

Comments
 (0)