Skip to content

Commit a49d505

Browse files
committed
[ci] remove print_test_stats.py
print_test_stats.py had a somewhat misleading name, as it was also responsible for uploading test statistics to both S3 and Scuba. We are using Rockset for most of this now, so removing the redundant code. The following are things we do *not* have replacements for: - The actual display of regressed or slow tests in the `print_test_stats` job step. I don't think people really looked at these so not a big loss. - Scuba uploads. This is sad, but fundamentally I think we probably don't want to maintain two data pipelines. [ghstack-poisoned]
1 parent 98aab9a commit a49d505

11 files changed

Lines changed: 4 additions & 1937 deletions

File tree

.circleci/config.yml

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/verbatim-sources/job-specs/job-specs-custom.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -114,21 +114,6 @@
114114
115115
chmod a+x .jenkins/pytorch/macos-test.sh
116116
unbuffer .jenkins/pytorch/macos-test.sh 2>&1 | ts
117-
- run:
118-
name: Report results
119-
no_output_timeout: "5m"
120-
command: |
121-
set -ex
122-
source /Users/distiller/workspace/miniconda3/bin/activate
123-
python3 -m pip install boto3==1.19.12
124-
125-
export JOB_BASE_NAME=$CIRCLE_JOB
126-
127-
# Using the same IAM user to write stats to our OSS bucket
128-
export AWS_ACCESS_KEY_ID=${CIRCLECI_AWS_ACCESS_KEY_FOR_SCCACHE_S3_BUCKET_V4}
129-
export AWS_SECRET_ACCESS_KEY=${CIRCLECI_AWS_SECRET_KEY_FOR_SCCACHE_S3_BUCKET_V4}
130-
python -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
131-
when: always
132117
- store_test_results:
133118
path: test/test-reports
134119

.github/templates/common.yml.j2

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -81,35 +81,6 @@ on:
8181
run: ./.github/scripts/parse_ref.py
8282
{%- endmacro -%}
8383

84-
{%- macro upload_test_statistics(build_environment, when="always()", pytorch_directory="", needs_credentials=False) -%}
85-
- name: Upload test statistics
86-
{%- if pytorch_directory %}
87-
working-directory: !{{ pytorch_directory }}
88-
{%- endif %}
89-
if: !{{ when }}
90-
env:
91-
AWS_DEFAULT_REGION: us-east-1
92-
GIT_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
93-
BRANCH: ${{ steps.parse-ref.outputs.branch }}
94-
PR_NUMBER: ${{ github.event.pull_request.number }}
95-
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
96-
TAG: ${{ steps.parse-ref.outputs.tag }}
97-
WORKFLOW_ID: '${{ github.run_id }}'
98-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99-
{%- if needs_credentials %}
100-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_OSSCI_METRICS_V2_ACCESS_KEY_ID }}
101-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_OSSCI_METRICS_V2_SECRET_ACCESS_KEY }}
102-
{%- endif %}
103-
shell: bash
104-
run: |
105-
set -x
106-
python3 -m pip install -r requirements.txt
107-
python3 -m pip install boto3==1.19.12
108-
GHA_WORKFLOW_JOB_ID=$(python3 .github/scripts/get_workflow_job_id.py "${GITHUB_RUN_ID}" "${RUNNER_NAME}")
109-
export GHA_WORKFLOW_JOB_ID
110-
python3 -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
111-
{%- endmacro -%}
112-
11384
{%- macro chown_dir(dir) -%}
11485
- name: Chown artifacts
11586
if: always()

.github/workflows/_bazel-build-test.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -167,28 +167,6 @@ jobs:
167167
with:
168168
file-suffix: bazel-${{ github.job }}_${{ steps.get-job-id.outputs.job-id }}
169169

170-
- name: Upload test statistics
171-
if: always()
172-
env:
173-
AWS_DEFAULT_REGION: us-east-1
174-
GIT_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
175-
BRANCH: ${{ steps.parse-ref.outputs.branch }}
176-
BUILD_ENVIRONMENT: ${{ inputs.build-environment }}
177-
PR_NUMBER: ${{ github.event.pull_request.number }}
178-
PYTORCH_RETRY_TEST_CASES: 1
179-
PYTORCH_OVERRIDE_FLAKY_SIGNAL: 1
180-
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
181-
TAG: ${{ steps.parse-ref.outputs.tag }}
182-
WORKFLOW_ID: ${{ github.run_id }}
183-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
184-
GHA_WORKFLOW_JOB_ID: ${{ steps.get-job-id.outputs.job-id }}
185-
shell: bash
186-
run: |
187-
set -x
188-
python3 -m pip install -r requirements.txt
189-
python3 -m pip install boto3==1.19.12
190-
python3 -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
191-
192170
- name: Teardown Linux
193171
uses: ./.github/actions/teardown-linux
194172
if: always()

.github/workflows/_linux-test.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -174,30 +174,6 @@ jobs:
174174
if-no-files-found: ignore
175175
path: ./**/core.[1-9]*
176176

177-
- name: Upload test statistics
178-
if: always()
179-
env:
180-
AWS_DEFAULT_REGION: us-east-1
181-
GIT_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
182-
BRANCH: ${{ steps.parse-ref.outputs.branch }}
183-
TEST_CONFIG: ${{ matrix.config }}
184-
SHARD_NUMBER: ${{ matrix.shard }}
185-
BUILD_ENVIRONMENT: ${{ inputs.build-environment }}
186-
PR_NUMBER: ${{ github.event.pull_request.number }}
187-
PYTORCH_RETRY_TEST_CASES: 1
188-
PYTORCH_OVERRIDE_FLAKY_SIGNAL: 1
189-
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
190-
TAG: ${{ steps.parse-ref.outputs.tag }}
191-
WORKFLOW_ID: ${{ github.run_id }}
192-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
193-
GHA_WORKFLOW_JOB_ID: ${{ steps.get-job-id.outputs.job-id }}
194-
shell: bash
195-
run: |
196-
set -x
197-
python3 -m pip install -r requirements.txt
198-
python3 -m pip install boto3==1.19.12
199-
python3 -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
200-
201177
- name: Teardown Linux
202178
uses: ./.github/actions/teardown-linux
203179
if: always()

.github/workflows/_mac-test.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -104,29 +104,3 @@ jobs:
104104
with:
105105
use-gha: true
106106
file-suffix: ${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}_${{ steps.get-job-id.outputs.job-id }}
107-
108-
- name: Upload test statistics
109-
if: always()
110-
env:
111-
AWS_DEFAULT_REGION: us-east-1
112-
GIT_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
113-
BRANCH: ${{ steps.parse-ref.outputs.branch }}
114-
TEST_CONFIG: ${{ matrix.config }}
115-
SHARD_NUMBER: ${{ matrix.shard }}
116-
BUILD_ENVIRONMENT: ${{ inputs.build-environment }}
117-
PR_NUMBER: ${{ github.event.pull_request.number }}
118-
PYTORCH_RETRY_TEST_CASES: 1
119-
PYTORCH_OVERRIDE_FLAKY_SIGNAL: 1
120-
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
121-
TAG: ${{ steps.parse-ref.outputs.tag }}
122-
WORKFLOW_ID: ${{ github.run_id }}
123-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_OSSCI_METRICS_V2_ACCESS_KEY_ID }}
125-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_OSSCI_METRICS_V2_SECRET_ACCESS_KEY }}
126-
GHA_WORKFLOW_JOB_ID: ${{ steps.get-job-id.outputs.job-id }}
127-
shell: bash
128-
run: |
129-
set -x
130-
python3 -m pip install -r requirements.txt
131-
python3 -m pip install boto3==1.19.12
132-
python3 -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test

.github/workflows/_rocm-test.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -167,32 +167,6 @@ jobs:
167167
use-gha: true
168168
file-suffix: ${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}_${{ steps.get-job-id.outputs.job-id }}
169169

170-
- name: Upload test statistics
171-
if: always()
172-
env:
173-
AWS_DEFAULT_REGION: us-east-1
174-
GIT_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
175-
BRANCH: ${{ steps.parse-ref.outputs.branch }}
176-
TEST_CONFIG: ${{ matrix.config }}
177-
SHARD_NUMBER: ${{ matrix.shard }}
178-
BUILD_ENVIRONMENT: ${{ inputs.build-environment }}
179-
PR_NUMBER: ${{ github.event.pull_request.number }}
180-
PYTORCH_RETRY_TEST_CASES: 1
181-
PYTORCH_OVERRIDE_FLAKY_SIGNAL: 1
182-
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
183-
TAG: ${{ steps.parse-ref.outputs.tag }}
184-
WORKFLOW_ID: ${{ github.run_id }}
185-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
186-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_OSSCI_METRICS_V2_ACCESS_KEY_ID }}
187-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_OSSCI_METRICS_V2_SECRET_ACCESS_KEY }}
188-
GHA_WORKFLOW_JOB_ID: ${{ steps.get-job-id.outputs.job-id }}
189-
shell: bash
190-
run: |
191-
set -x
192-
python3 -m pip install -r requirements.txt
193-
python3 -m pip install boto3==1.19.12
194-
python3 -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
195-
196170
- name: Teardown ROCm
197171
if: always()
198172
shell: bash

.github/workflows/_win-test.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -115,30 +115,6 @@ jobs:
115115
id: parse-ref
116116
run: .github/scripts/parse_ref.py
117117

118-
- name: Upload test statistics
119-
if: always()
120-
env:
121-
AWS_DEFAULT_REGION: us-east-1
122-
GIT_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
123-
BRANCH: ${{ steps.parse-ref.outputs.branch }}
124-
TEST_CONFIG: ${{ matrix.config }}
125-
SHARD_NUMBER: ${{ matrix.shard }}
126-
BUILD_ENVIRONMENT: ${{ inputs.build-environment }}
127-
PR_NUMBER: ${{ github.event.pull_request.number }}
128-
PYTORCH_RETRY_TEST_CASES: 1
129-
PYTORCH_OVERRIDE_FLAKY_SIGNAL: 1
130-
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
131-
TAG: ${{ steps.parse-ref.outputs.tag }}
132-
WORKFLOW_ID: ${{ github.run_id }}
133-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134-
GHA_WORKFLOW_JOB_ID: ${{ steps.get-job-id.outputs.job-id }}
135-
shell: bash
136-
run: |
137-
set -x
138-
python3 -m pip install -r requirements.txt
139-
python3 -m pip install boto3==1.19.12
140-
python3 -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
141-
142118
- name: Teardown Windows
143119
uses: ./.github/actions/teardown-win
144120
if: always()

.jenkins/pytorch/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ test_libtorch() {
289289

290290
# Make test_reports directory
291291
# NB: the ending test_libtorch must match the current function name for the current
292-
# test reporting process (in print_test_stats.py) to function as expected.
292+
# test reporting process to function as expected.
293293
TEST_REPORTS_DIR=test/test-reports/cpp-unittest/test_libtorch
294294
mkdir -p $TEST_REPORTS_DIR
295295

@@ -339,7 +339,7 @@ test_vulkan() {
339339
ln -sf "$TORCH_LIB_DIR"/libc10* "$TORCH_TEST_DIR"
340340
export VK_ICD_FILENAMES=/var/lib/jenkins/swiftshader/build/Linux/vk_swiftshader_icd.json
341341
# NB: the ending test_vulkan must match the current function name for the current
342-
# test reporting process (in print_test_stats.py) to function as expected.
342+
# test reporting process to function as expected.
343343
TEST_REPORTS_DIR=test/test-reports/cpp-vulkan/test_vulkan
344344
mkdir -p $TEST_REPORTS_DIR
345345
"$TORCH_TEST_DIR"/vulkan_api_test --gtest_output=xml:$TEST_REPORTS_DIR/vulkan_test.xml
@@ -356,7 +356,7 @@ test_distributed() {
356356
ln -sf "$TORCH_LIB_DIR"/libtorch* "$TORCH_BIN_DIR"
357357
ln -sf "$TORCH_LIB_DIR"/libc10* "$TORCH_BIN_DIR"
358358
# NB: the ending test_distributed must match the current function name for the current
359-
# test reporting process (in print_test_stats.py) to function as expected.
359+
# test reporting process to function as expected.
360360
TEST_REPORTS_DIR=test/test-reports/cpp-distributed/test_distributed
361361
mkdir -p $TEST_REPORTS_DIR
362362
"$TORCH_BIN_DIR"/FileStoreTest --gtest_output=xml:$TEST_REPORTS_DIR/FileStoreTest.xml
@@ -380,7 +380,7 @@ test_rpc() {
380380
if [[ "$BUILD_ENVIRONMENT" != *rocm* ]]; then
381381
echo "Testing RPC C++ tests"
382382
# NB: the ending test_rpc must match the current function name for the current
383-
# test reporting process (in print_test_stats.py) to function as expected.
383+
# test reporting process to function as expected.
384384
ln -sf "$TORCH_LIB_DIR"/libtorch* "$TORCH_BIN_DIR"
385385
ln -sf "$TORCH_LIB_DIR"/libc10* "$TORCH_BIN_DIR"
386386
ln -sf "$TORCH_LIB_DIR"/libtbb* "$TORCH_BIN_DIR"

0 commit comments

Comments
 (0)