Repository: pytorch/vision
Pull request: add CI job for prototype tests
Closes #4589.

cc @pmeier @seemethere @bjuncek

Problem statement:
Add CI uniquely for torchdata prototype and remove torchdata from most CIs
This has been brought up by @malfet 

We should have CI that runs without torchdata in our nightlies, so that we can make sure that torchdata is not a required dependency.

What I would propose is to add another CI job that just for one single OS that just runs tests for the prototype folder.

cc @pmeier @seemethere @bjuncek

Hints from issue discussion:

Commit message: fix torchvision installation

Patch to review:
diff --git a/.circleci/config.yml b/.circleci/config.yml
index aee1d922767..0a373e2fb2a 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -254,6 +254,27 @@ jobs:
             pip install --user pytest
             python test/test_onnx.py
 
+  prototype_test:
+    docker:
+      - image: circleci/python:3.7
+    steps:
+      - run:
+          name: Install torch
+          command: pip install --user --progress-bar=off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
+      - run:
+          name: Install prototype dependencies
+          command: pip install --user --progress-bar=off git+https://github.com/pytorch/data.git
+      - checkout
+      - run:
+          name: Install torchvision
+          command: pip install --user --progress-bar off --no-build-isolation .
+      - run:
+          name: Install test utilities
+          command: pip install --user --progress-bar=off pytest
+      - run:
+          name: Run tests
+          command: pytest/test_prototype.py
+
   binary_linux_wheel:
     <<: *binary_common
     docker:
@@ -1479,6 +1500,7 @@ workflows:
       - clang_format
       - torchhub_test
       - torch_onnx_test
+      - prototype_test
       - binary_ios_build:
           build_environment: binary-libtorchvision_ops-ios-12.0.0-x86_64
           ios_arch: x86_64
@@ -1639,6 +1661,7 @@ workflows:
       - clang_format
       - torchhub_test
       - torch_onnx_test
+      - prototype_test
       - binary_ios_build:
           build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-x86_64
           filters:
diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in
index 09957d7b339..ac1c4fec1e9 100644
--- a/.circleci/config.yml.in
+++ b/.circleci/config.yml.in
@@ -254,6 +254,27 @@ jobs:
             pip install --user pytest
             python test/test_onnx.py
 
+  prototype_test:
+    docker:
+      - image: circleci/python:3.7
+    steps:
+      - run:
+          name: Install torch
+          command: pip install --user --progress-bar=off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
+      - run:
+          name: Install prototype dependencies
+          command: pip install --user --progress-bar=off git+https://github.com/pytorch/data.git
+      - checkout
+      - run:
+          name: Install torchvision
+          command: pip install --user --progress-bar off --no-build-isolation .
+      - run:
+          name: Install test utilities
+          command: pip install --user --progress-bar=off pytest
+      - run:
+          name: Run tests
+          command: pytest/test_prototype.py
+
   binary_linux_wheel:
     <<: *binary_common
     docker:
@@ -977,6 +998,7 @@ workflows:
       - clang_format
       - torchhub_test
       - torch_onnx_test
+      - prototype_test
       {{ ios_workflows() }}
       {{ android_workflows() }}
 
@@ -998,6 +1020,7 @@ workflows:
       - clang_format
       - torchhub_test
       - torch_onnx_test
+      - prototype_test
       {{ ios_workflows(nightly=True) }}
       {{ android_workflows(nightly=True) }}
       {{ build_workflows(prefix="nightly_", filter_branch="nightly", upload=True) }}
diff --git a/.circleci/unittest/linux/scripts/install.sh b/.circleci/unittest/linux/scripts/install.sh
index 2bf3684ead1..e9b9e80c077 100755
--- a/.circleci/unittest/linux/scripts/install.sh
+++ b/.circleci/unittest/linux/scripts/install.sh
@@ -26,10 +26,6 @@ fi
 printf "Installing PyTorch with %s\n" "${cudatoolkit}"
 conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest
 
-printf "Installing torchdata from source"
-pip install git+https://github.com/pytorch/data.git
-
-
 if [ $PYTHON_VERSION == "3.6" ]; then
     printf "Installing minimal PILLOW version\n"
     # Install the minimal PILLOW version. Otherwise, let setup.py install the latest
diff --git a/.circleci/unittest/windows/scripts/install.sh b/.circleci/unittest/windows/scripts/install.sh
index 49ef8224b59..e4756179371 100644
--- a/.circleci/unittest/windows/scripts/install.sh
+++ b/.circleci/unittest/windows/scripts/install.sh
@@ -29,10 +29,6 @@ printf "Installing PyTorch with %s\n" "${cudatoolkit}"
 # conda-forge channel is required for cudatoolkit 11.1 on Windows, see https://github.com/pytorch/vision/issues/4458
 conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest
 
-printf "Installing torchdata from source"
-pip install git+https://github.com/pytorch/data.git
-
-
 if [ $PYTHON_VERSION == "3.6" ]; then
     printf "Installing minimal PILLOW version\n"
     # Install the minimal PILLOW version. Otherwise, let setup.py install the latest
diff --git a/test/test_prototype.py b/test/test_prototype.py
new file mode 100644
index 00000000000..f00a37d4228
--- /dev/null
+++ b/test/test_prototype.py
@@ -0,0 +1,2 @@
+def test_smoke():
+    import torchvision.prototype  # noqa: F401


Code review comments:
diff_hunk: @@ -254,6 +254,27 @@ jobs:
             pip install --user pytest
             python test/test_onnx.py
 
+  prototype_test:
+    docker:
+      - image: circleci/python:3.7
+    steps:
+      - run:
+          name: Install torch
+          command: pip install --user --progress-bar=off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
+      - run:
+          name: Install prototype dependencies
+          command: pip install --user --progress-bar=off git+https://github.com/pytorch/data.git
+      - checkout
+      - run:
+          name: Install torchvision
+          command: pip install --user --progress-bar off --no-build-isolation .
+      - run:
+          name: Install test utilities
+          command: pip install --user --progress-bar=off pytest
+      - run:
+          name: Run tests
+          command: pytest/test_prototype.py
path: .circleci/config.yml
text: @user1:
Typo:
```suggestion
          command: python test/test_prototype.py
```