Repository: pytorch/tensordict (language: python)

Issue:
[CI] Upgrade to linux_job_v2
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #1097




Discussion / hints:

Fix patch:
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index bf55773ff..394d53b43 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -24,7 +24,7 @@ jobs:
       matrix:
         python_version: ["3.10"]
         cuda_arch_version: ["12.1"]
-    uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
+    uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
     with:
       repository: pytorch/tensordict
       upload-artifact: docs
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 685a33e64..5fd055f85 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -17,7 +17,7 @@ concurrency:
 
 jobs:
   python-source-and-configs:
-    uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
+    uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
     with:
       repository: pytorch/tensordict
       script: |
@@ -45,7 +45,7 @@ jobs:
         echo '::endgroup::'
 
   c-source:
-    uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
+    uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
     with:
       repository: pytorch/tensordict
       script: |


Test patch:
diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml
index 81121076a..4bc66eab5 100644
--- a/.github/workflows/test-linux.yml
+++ b/.github/workflows/test-linux.yml
@@ -25,7 +25,7 @@ jobs:
         python_version: ["3.10"]
         cuda_arch_version: ["12.1"]
       fail-fast: false
-    uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
+    uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
     with:
       runner: linux.g5.4xlarge.nvidia.gpu
       repository: pytorch/tensordict
@@ -56,7 +56,7 @@ jobs:
       matrix:
         python_version: ["3.9", "3.10", "3.11", "3.12"]
       fail-fast: false
-    uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
+    uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
     with:
       runner: linux.12xlarge
       repository: pytorch/tensordict
@@ -83,7 +83,7 @@ jobs:
         python_version: ["3.10"]
         cuda_arch_version: ["12.1"]
       fail-fast: false
-    uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
+    uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
     with:
       runner: linux.g5.4xlarge.nvidia.gpu
       repository: pytorch/tensordict
@@ -115,7 +115,7 @@ jobs:
       matrix:
         python_version: ["3.9", "3.12"]
       fail-fast: false
-    uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
+    uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
     with:
       runner: linux.12xlarge
       repository: pytorch/tensordict
diff --git a/.github/workflows/test-rl-gpu.yml b/.github/workflows/test-rl-gpu.yml
index 71c7b12b6..e38059a94 100644
--- a/.github/workflows/test-rl-gpu.yml
+++ b/.github/workflows/test-rl-gpu.yml
@@ -25,7 +25,7 @@ jobs:
         python_version: ["3.10"]
         cuda_arch_version: ["12.1"]
       fail-fast: false
-    uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
+    uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
     with:
       runner: linux.g5.4xlarge.nvidia.gpu
       repository: pytorch/tensordict