From 30c51c095e1324d690b0cdbbacb45989581f1692 Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Fri, 3 Jan 2025 10:28:06 -0800 Subject: [PATCH 1/7] Update [ghstack-poisoned] --- .github/workflows/tests.yml | 4 ++-- .github/workflows/update-test-times.yml | 1 - .github/workflows/update_test_file_ratings.yml | 3 +-- .../scripts/Installers/Install-Pip-Dependencies.ps1 | 2 +- tools/torchci/queue_alert.py | 2 -- tools/torchci/tests/test_queue_alert.py | 8 ++++---- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 87cfc41132..2832ba64c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,7 +33,7 @@ jobs: echo ::group::setup Python environment python -m venv .venv/ source .venv/bin/activate - pip install pip==23.0.1 pytest==7.2.0 rockset==1.0.3 jsonschema==4.17.3 clickhouse-connect==0.7.16 + pip install pip==23.0.1 pytest==7.2.0 jsonschema==4.17.3 clickhouse-connect==0.7.16 echo ::endgroup:: # Test tools @@ -51,7 +51,7 @@ jobs: echo ::group::setup Python environment python -m venv .venv/ source .venv/bin/activate - pip install pip==23.0.1 pytest==7.2.0 rockset==1.0.3 \ + pip install pip==23.0.1 pytest==7.2.0 \ jsonschema==4.17.3 numpy==1.24.1 pandas==2.1.4 boto3==1.19.12 \ clickhouse-connect==0.7.16 echo ::endgroup:: diff --git a/.github/workflows/update-test-times.yml b/.github/workflows/update-test-times.yml index 6ad73aa30a..73333bc9cc 100644 --- a/.github/workflows/update-test-times.yml +++ b/.github/workflows/update-test-times.yml @@ -35,7 +35,6 @@ jobs: run: | python -m torchci.update_test_times env: - ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }} CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }} CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }} CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }} diff --git a/.github/workflows/update_test_file_ratings.yml b/.github/workflows/update_test_file_ratings.yml index ed493fd490..66793f6b30 100644 --- a/.github/workflows/update_test_file_ratings.yml +++ b/.github/workflows/update_test_file_ratings.yml @@ -31,7 +31,7 @@ jobs: - name: Install Dependencies run: | pip3 install --upgrade pip - pip3 install boto3==1.19.12 rockset==1.0.3 clickhouse-connect==0.7.16 + pip3 install boto3==1.19.12 clickhouse-connect==0.7.16 cd test-infra/tools/torchci pip3 install -e . @@ -59,7 +59,6 @@ jobs: # python3 test-infra/tools/torchci/td/td_heuristic_profiling.py env: - ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }} CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }} CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }} CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }} diff --git a/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 b/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 index b384898001..d8f1ffb10c 100644 --- a/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 +++ b/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 @@ -13,4 +13,4 @@ if (-Not (Test-Path -Path $condaHook -PathType Leaf)) { conda activate base # Some dependencies are installed by pip before testing, pin all of them -pip install "ninja==1.10.0.post1" "future==0.18.2" "hypothesis==5.35.1" "expecttest==0.1.3" "librosa>=0.6.2" "scipy==1.6.3" "psutil==5.9.1" "pynvml==11.4.1" "pillow==9.2.0" "unittest-xml-reporting<=3.2.0,>=2.0.0" "pytest==7.1.3" "pytest-xdist==2.5.0" "pytest-flakefinder==1.1.0" "pytest-rerunfailures==10.2" "pytest-shard==0.1.2" "sympy==1.11.1" "xdoctest==1.0.2" "pygments==2.12.0" "opt-einsum>=3.3" "networkx==2.8.8" "mpmath==1.2.1" "pytest-rerunfailures==10.2" "pytest-cpp==2.3.0" "rockset==1.0.3" +pip install "ninja==1.10.0.post1" "future==0.18.2" "hypothesis==5.35.1" "expecttest==0.1.3" "librosa>=0.6.2" "scipy==1.6.3" "psutil==5.9.1" "pynvml==11.4.1" "pillow==9.2.0" "unittest-xml-reporting<=3.2.0,>=2.0.0" "pytest==7.1.3" "pytest-xdist==2.5.0" "pytest-flakefinder==1.1.0" "pytest-rerunfailures==10.2" "pytest-shard==0.1.2" "sympy==1.11.1" "xdoctest==1.0.2" "pygments==2.12.0" "opt-einsum>=3.3" "networkx==2.8.8" "mpmath==1.2.1" "pytest-rerunfailures==10.2" "pytest-cpp==2.3.0" diff --git a/tools/torchci/queue_alert.py b/tools/torchci/queue_alert.py index b4d021e278..33d6e7252d 100644 --- a/tools/torchci/queue_alert.py +++ b/tools/torchci/queue_alert.py @@ -11,8 +11,6 @@ REPO_ROOT = Path(__file__).resolve().parent.parent.parent -PROD_VERSIONS_FILE = REPO_ROOT / "torchci" / "rockset" / "prodVersions.json" - QUEUE_ALERT_LABEL = "queue-alert" MAX_HOURS = 4 diff --git a/tools/torchci/tests/test_queue_alert.py b/tools/torchci/tests/test_queue_alert.py index db9ce6eb94..6d3227dfcc 100644 --- a/tools/torchci/tests/test_queue_alert.py +++ b/tools/torchci/tests/test_queue_alert.py @@ -5,15 +5,15 @@ class TestGitHubPR(TestCase): def test_filter_long_queues(self): - rockset_results = [ + db_results = [ {"count": 30, "avg_queue_s": 0, "machine_type": "linux.gcp.a100.large"}, {"count": 100, "avg_queue_s": 0, "machine_type": "machine1"}, {"count": 30, "avg_queue_s": 3600 * 5, "machine_type": "machine2"}, ] - long_queues = filter_long_queues(rockset_results) + long_queues = filter_long_queues(db_results) self.assertEqual(len(long_queues), 3) - rockset_results = [ + db_results = [ { "count": 0, "avg_queue_s": 3600 * 30, @@ -22,7 +22,7 @@ def test_filter_long_queues(self): {"count": 10, "avg_queue_s": 0, "machine_type": "machine1"}, {"count": 10, "avg_queue_s": 3600 * 1, "machine_type": "machine2"}, ] - long_queues = filter_long_queues(rockset_results) + long_queues = filter_long_queues(db_results) self.assertEqual(len(long_queues), 1) self.assertEqual(long_queues[0].machine, "linux.gcp.a100.large") From 7f423f8a38894a9457ce4f7397c753d93ed1afaf Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Fri, 3 Jan 2025 10:28:11 -0800 Subject: [PATCH 2/7] Update [ghstack-poisoned] --- .../benchmark/BranchAndCommitPicker.tsx | 17 ++++------------- .../[suite]/[compiler]/[[...page]].tsx | 4 ---- torchci/pages/benchmark/compilers.tsx | 4 ---- torchci/pages/benchmark/llms.tsx | 4 ---- torchci/pages/benchmark/torchao.tsx | 4 ---- 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/torchci/components/benchmark/BranchAndCommitPicker.tsx b/torchci/components/benchmark/BranchAndCommitPicker.tsx index c957a4d566..b2f6ab62e8 100644 --- a/torchci/components/benchmark/BranchAndCommitPicker.tsx +++ b/torchci/components/benchmark/BranchAndCommitPicker.tsx @@ -9,7 +9,6 @@ import { import { MAIN_BRANCH, SHA_DISPLAY_LENGTH } from "components/benchmark/common"; import dayjs from "dayjs"; import { fetcher } from "lib/GeneralUtils"; -import { RocksetParam } from "lib/rockset"; import { useEffect } from "react"; import useSWR from "swr"; @@ -48,7 +47,6 @@ function groupCommitByBranch(data: any) { export function BranchAndCommitPicker({ queryName, - queryCollection, queryParams, branch, setBranch, @@ -57,11 +55,9 @@ export function BranchAndCommitPicker({ titlePrefix, fallbackIndex, timeRange, - useClickHouse, }: { queryName: string; - queryCollection: string; - queryParams: RocksetParam[] | {}; + queryParams: { [k: string]: any }; branch: string; setBranch: any; commit: string; @@ -69,15 +65,10 @@ export function BranchAndCommitPicker({ titlePrefix: string; fallbackIndex: number; timeRange: any; - useClickHouse: boolean; }) { - const url = useClickHouse - ? `/api/clickhouse/${queryName}?parameters=${encodeURIComponent( - JSON.stringify(queryParams) - )}` - : `/api/query/${queryCollection}/${queryName}?parameters=${encodeURIComponent( - JSON.stringify(queryParams as RocksetParam[]) - )}`; + const url = `/api/clickhouse/${queryName}?parameters=${encodeURIComponent( + JSON.stringify(queryParams) + )}`; let { data, error } = useSWR(url, fetcher, { refreshInterval: 60 * 60 * 1000, // refresh every hour diff --git a/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx b/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx index 763fee376b..f22bbd0c50 100644 --- a/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx +++ b/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx @@ -368,7 +368,6 @@ export default function Page() { /> —Diff→ diff --git a/torchci/pages/benchmark/compilers.tsx b/torchci/pages/benchmark/compilers.tsx index 4fc6e42940..2cb126d8b6 100644 --- a/torchci/pages/benchmark/compilers.tsx +++ b/torchci/pages/benchmark/compilers.tsx @@ -302,7 +302,6 @@ export default function Page() { /> —Diff→ —Diff→ —Diff→ Date: Fri, 3 Jan 2025 10:28:15 -0800 Subject: [PATCH 3/7] Update [ghstack-poisoned] --- .../metrics/panels/TablePanelRS.tsx | 123 ------------------ torchci/lib/rockset.ts | 16 --- .../api/query/[collection]/[lambdaName].ts | 32 ----- 3 files changed, 171 deletions(-) delete mode 100644 torchci/components/metrics/panels/TablePanelRS.tsx delete mode 100644 torchci/lib/rockset.ts delete mode 100644 torchci/pages/api/query/[collection]/[lambdaName].ts diff --git a/torchci/components/metrics/panels/TablePanelRS.tsx b/torchci/components/metrics/panels/TablePanelRS.tsx deleted file mode 100644 index b670be6440..0000000000 --- a/torchci/components/metrics/panels/TablePanelRS.tsx +++ /dev/null @@ -1,123 +0,0 @@ -/* -This file is an exact copy of TablePanel.tsx prior to moving it to only use -ClickHouse. After Jan 1 2025, this file will be deleted and all pages depending -on it will be broken. -*/ -import HelpIcon from "@mui/icons-material/Help"; -import { Skeleton, Typography } from "@mui/material"; -import IconButton from "@mui/material/IconButton"; -import { DataGrid, GridColDef } from "@mui/x-data-grid"; -import { RocksetParam } from "lib/rockset"; -import useSWR from "swr"; - -const fetcher = (url: string) => fetch(url).then((res) => res.json()); - -export default function TablePanel({ - // Human-readable title for this panel. - title, - // Query lambda collection in Rockset. - queryCollection = "metrics", - // Query lambda name in Rockset, ("metrics" collection is assumed). - queryName, - // Params to pass to the Rockset query. - queryParams, - // Column definitions for the data grid. - columns, - // Props to propagate to the data grid. - dataGridProps, - // An optional help link to display in the title - helpLink, - // An optional flag to show the table footer - showFooter, - useClickHouse = false, -}: { - title: string; - queryCollection?: string; - queryName: string; - queryParams: RocksetParam[] | {}; - columns: GridColDef[]; - dataGridProps: any; - helpLink?: string; - showFooter?: boolean; - useClickHouse?: boolean; -}) { - const url = useClickHouse - ? `/api/clickhouse/${queryName}?parameters=${encodeURIComponent( - JSON.stringify(queryParams) - )}` - : `/api/query/${queryCollection}/${queryName}?parameters=${encodeURIComponent( - JSON.stringify(queryParams) - )}`; - - const { data } = useSWR(url, fetcher, { - refreshInterval: 5 * 60 * 1000, // refresh every 5 minutes - }); - - return ( - - ); -} - -export function TablePanelWithData({ - // Human-readable title for this panel. - title, - // The raw data to display in the table - data, - // Column definitions for the data grid. - columns, - // Props to propagate to the data grid. - dataGridProps, - // An optional help link to display in the title - helpLink, - // An optional flag to show the table footer - showFooter, -}: { - title: string; - data: any; - columns: GridColDef[]; - dataGridProps: any; - helpLink?: string; - showFooter?: boolean; -}) { - if (data === undefined) { - return ; - } - - function helpLinkOnClick() { - window.open(helpLink, "_blank"); - } - - function Header() { - return ( - - {title}{" "} - {helpLink !== undefined && ( - - - - )} - - ); - } - - return ( - - ); -} diff --git a/torchci/lib/rockset.ts b/torchci/lib/rockset.ts deleted file mode 100644 index 064f753908..0000000000 --- a/torchci/lib/rockset.ts +++ /dev/null @@ -1,16 +0,0 @@ -import rockset, { MainApi } from "@rockset/client"; - -// Type for Rockset query lambda parameters. -export interface RocksetParam { - name: string; - // This is not complete, but we only really have string/int/float params atm. - type: "string" | "int" | "float" | "bool"; - value: any; -} - -export default function getRocksetClient(): MainApi { - if (typeof process.env.ROCKSET_API_KEY === "undefined") { - throw "ROCKSET_API_KEY is not defined, add it to your .env.local file"; - } - return rockset(process.env.ROCKSET_API_KEY); -} diff --git a/torchci/pages/api/query/[collection]/[lambdaName].ts b/torchci/pages/api/query/[collection]/[lambdaName].ts deleted file mode 100644 index eb8edfd895..0000000000 --- a/torchci/pages/api/query/[collection]/[lambdaName].ts +++ /dev/null @@ -1,32 +0,0 @@ -import getRocksetClient, { RocksetParam } from "lib/rockset"; -import type { NextApiRequest, NextApiResponse } from "next"; -import rocksetVersions from "rockset/prodVersions.json"; - -export const config = { - api: { - // TODO: Choose a higher limit than the 4mb default for compilers_benchmark_performance - // and then try to figure out how to make the results smaller later - responseLimit: "8mb", - }, -}; - -export default async function handler( - req: NextApiRequest, - res: NextApiResponse -) { - const collection = req.query.collection as string; - const lambdaName = req.query.lambdaName as string; - // @ts-expect-error - const version = rocksetVersions[collection][lambdaName]; - const parameters: RocksetParam[] = JSON.parse(req.query.parameters as string); - - const client = getRocksetClient(); - const response = await client.queryLambdas.executeQueryLambda( - collection, - lambdaName, - version, - { parameters } - ); - - res.status(200).json(response.results); -} From 83ccad5e03160ed43cb13a586a0f87d93b84167d Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Fri, 3 Jan 2025 11:19:29 -0800 Subject: [PATCH 4/7] Update [ghstack-poisoned] --- .github/workflows/tests.yml | 4 ++-- .github/workflows/update-test-times.yml | 1 - .github/workflows/update_test_file_ratings.yml | 3 +-- .../scripts/Installers/Install-Pip-Dependencies.ps1 | 2 +- tools/torchci/queue_alert.py | 2 -- tools/torchci/tests/test_queue_alert.py | 8 ++++---- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 87cfc41132..2832ba64c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,7 +33,7 @@ jobs: echo ::group::setup Python environment python -m venv .venv/ source .venv/bin/activate - pip install pip==23.0.1 pytest==7.2.0 rockset==1.0.3 jsonschema==4.17.3 clickhouse-connect==0.7.16 + pip install pip==23.0.1 pytest==7.2.0 jsonschema==4.17.3 clickhouse-connect==0.7.16 echo ::endgroup:: # Test tools @@ -51,7 +51,7 @@ jobs: echo ::group::setup Python environment python -m venv .venv/ source .venv/bin/activate - pip install pip==23.0.1 pytest==7.2.0 rockset==1.0.3 \ + pip install pip==23.0.1 pytest==7.2.0 \ jsonschema==4.17.3 numpy==1.24.1 pandas==2.1.4 boto3==1.19.12 \ clickhouse-connect==0.7.16 echo ::endgroup:: diff --git a/.github/workflows/update-test-times.yml b/.github/workflows/update-test-times.yml index 6ad73aa30a..73333bc9cc 100644 --- a/.github/workflows/update-test-times.yml +++ b/.github/workflows/update-test-times.yml @@ -35,7 +35,6 @@ jobs: run: | python -m torchci.update_test_times env: - ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }} CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }} CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }} CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }} diff --git a/.github/workflows/update_test_file_ratings.yml b/.github/workflows/update_test_file_ratings.yml index ed493fd490..66793f6b30 100644 --- a/.github/workflows/update_test_file_ratings.yml +++ b/.github/workflows/update_test_file_ratings.yml @@ -31,7 +31,7 @@ jobs: - name: Install Dependencies run: | pip3 install --upgrade pip - pip3 install boto3==1.19.12 rockset==1.0.3 clickhouse-connect==0.7.16 + pip3 install boto3==1.19.12 clickhouse-connect==0.7.16 cd test-infra/tools/torchci pip3 install -e . @@ -59,7 +59,6 @@ jobs: # python3 test-infra/tools/torchci/td/td_heuristic_profiling.py env: - ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }} CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }} CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }} CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }} diff --git a/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 b/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 index b384898001..d8f1ffb10c 100644 --- a/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 +++ b/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 @@ -13,4 +13,4 @@ if (-Not (Test-Path -Path $condaHook -PathType Leaf)) { conda activate base # Some dependencies are installed by pip before testing, pin all of them -pip install "ninja==1.10.0.post1" "future==0.18.2" "hypothesis==5.35.1" "expecttest==0.1.3" "librosa>=0.6.2" "scipy==1.6.3" "psutil==5.9.1" "pynvml==11.4.1" "pillow==9.2.0" "unittest-xml-reporting<=3.2.0,>=2.0.0" "pytest==7.1.3" "pytest-xdist==2.5.0" "pytest-flakefinder==1.1.0" "pytest-rerunfailures==10.2" "pytest-shard==0.1.2" "sympy==1.11.1" "xdoctest==1.0.2" "pygments==2.12.0" "opt-einsum>=3.3" "networkx==2.8.8" "mpmath==1.2.1" "pytest-rerunfailures==10.2" "pytest-cpp==2.3.0" "rockset==1.0.3" +pip install "ninja==1.10.0.post1" "future==0.18.2" "hypothesis==5.35.1" "expecttest==0.1.3" "librosa>=0.6.2" "scipy==1.6.3" "psutil==5.9.1" "pynvml==11.4.1" "pillow==9.2.0" "unittest-xml-reporting<=3.2.0,>=2.0.0" "pytest==7.1.3" "pytest-xdist==2.5.0" "pytest-flakefinder==1.1.0" "pytest-rerunfailures==10.2" "pytest-shard==0.1.2" "sympy==1.11.1" "xdoctest==1.0.2" "pygments==2.12.0" "opt-einsum>=3.3" "networkx==2.8.8" "mpmath==1.2.1" "pytest-rerunfailures==10.2" "pytest-cpp==2.3.0" diff --git a/tools/torchci/queue_alert.py b/tools/torchci/queue_alert.py index b4d021e278..33d6e7252d 100644 --- a/tools/torchci/queue_alert.py +++ b/tools/torchci/queue_alert.py @@ -11,8 +11,6 @@ REPO_ROOT = Path(__file__).resolve().parent.parent.parent -PROD_VERSIONS_FILE = REPO_ROOT / "torchci" / "rockset" / "prodVersions.json" - QUEUE_ALERT_LABEL = "queue-alert" MAX_HOURS = 4 diff --git a/tools/torchci/tests/test_queue_alert.py b/tools/torchci/tests/test_queue_alert.py index db9ce6eb94..6d3227dfcc 100644 --- a/tools/torchci/tests/test_queue_alert.py +++ b/tools/torchci/tests/test_queue_alert.py @@ -5,15 +5,15 @@ class TestGitHubPR(TestCase): def test_filter_long_queues(self): - rockset_results = [ + db_results = [ {"count": 30, "avg_queue_s": 0, "machine_type": "linux.gcp.a100.large"}, {"count": 100, "avg_queue_s": 0, "machine_type": "machine1"}, {"count": 30, "avg_queue_s": 3600 * 5, "machine_type": "machine2"}, ] - long_queues = filter_long_queues(rockset_results) + long_queues = filter_long_queues(db_results) self.assertEqual(len(long_queues), 3) - rockset_results = [ + db_results = [ { "count": 0, "avg_queue_s": 3600 * 30, @@ -22,7 +22,7 @@ def test_filter_long_queues(self): {"count": 10, "avg_queue_s": 0, "machine_type": "machine1"}, {"count": 10, "avg_queue_s": 3600 * 1, "machine_type": "machine2"}, ] - long_queues = filter_long_queues(rockset_results) + long_queues = filter_long_queues(db_results) self.assertEqual(len(long_queues), 1) self.assertEqual(long_queues[0].machine, "linux.gcp.a100.large") From 15472a5cb885c840c88e7e3345e03202ad6ba7d5 Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Fri, 3 Jan 2025 11:19:33 -0800 Subject: [PATCH 5/7] Update [ghstack-poisoned] --- .../benchmark/BranchAndCommitPicker.tsx | 17 ++++------------- .../[suite]/[compiler]/[[...page]].tsx | 4 ---- torchci/pages/benchmark/compilers.tsx | 4 ---- torchci/pages/benchmark/llms.tsx | 4 ---- torchci/pages/benchmark/torchao.tsx | 4 ---- 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/torchci/components/benchmark/BranchAndCommitPicker.tsx b/torchci/components/benchmark/BranchAndCommitPicker.tsx index c957a4d566..b2f6ab62e8 100644 --- a/torchci/components/benchmark/BranchAndCommitPicker.tsx +++ b/torchci/components/benchmark/BranchAndCommitPicker.tsx @@ -9,7 +9,6 @@ import { import { MAIN_BRANCH, SHA_DISPLAY_LENGTH } from "components/benchmark/common"; import dayjs from "dayjs"; import { fetcher } from "lib/GeneralUtils"; -import { RocksetParam } from "lib/rockset"; import { useEffect } from "react"; import useSWR from "swr"; @@ -48,7 +47,6 @@ function groupCommitByBranch(data: any) { export function BranchAndCommitPicker({ queryName, - queryCollection, queryParams, branch, setBranch, @@ -57,11 +55,9 @@ export function BranchAndCommitPicker({ titlePrefix, fallbackIndex, timeRange, - useClickHouse, }: { queryName: string; - queryCollection: string; - queryParams: RocksetParam[] | {}; + queryParams: { [k: string]: any }; branch: string; setBranch: any; commit: string; @@ -69,15 +65,10 @@ export function BranchAndCommitPicker({ titlePrefix: string; fallbackIndex: number; timeRange: any; - useClickHouse: boolean; }) { - const url = useClickHouse - ? `/api/clickhouse/${queryName}?parameters=${encodeURIComponent( - JSON.stringify(queryParams) - )}` - : `/api/query/${queryCollection}/${queryName}?parameters=${encodeURIComponent( - JSON.stringify(queryParams as RocksetParam[]) - )}`; + const url = `/api/clickhouse/${queryName}?parameters=${encodeURIComponent( + JSON.stringify(queryParams) + )}`; let { data, error } = useSWR(url, fetcher, { refreshInterval: 60 * 60 * 1000, // refresh every hour diff --git a/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx b/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx index 763fee376b..f22bbd0c50 100644 --- a/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx +++ b/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx @@ -368,7 +368,6 @@ export default function Page() { /> —Diff→ diff --git a/torchci/pages/benchmark/compilers.tsx b/torchci/pages/benchmark/compilers.tsx index 4fc6e42940..2cb126d8b6 100644 --- a/torchci/pages/benchmark/compilers.tsx +++ b/torchci/pages/benchmark/compilers.tsx @@ -302,7 +302,6 @@ export default function Page() { /> —Diff→ —Diff→ —Diff→ Date: Fri, 3 Jan 2025 11:20:59 -0800 Subject: [PATCH 6/7] Update [ghstack-poisoned] --- .github/workflows/tests.yml | 4 ++-- .github/workflows/update-test-times.yml | 1 - .github/workflows/update_test_file_ratings.yml | 3 +-- .../scripts/Installers/Install-Pip-Dependencies.ps1 | 2 +- tools/torchci/queue_alert.py | 2 -- tools/torchci/tests/test_queue_alert.py | 8 ++++---- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 87cfc41132..2832ba64c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,7 +33,7 @@ jobs: echo ::group::setup Python environment python -m venv .venv/ source .venv/bin/activate - pip install pip==23.0.1 pytest==7.2.0 rockset==1.0.3 jsonschema==4.17.3 clickhouse-connect==0.7.16 + pip install pip==23.0.1 pytest==7.2.0 jsonschema==4.17.3 clickhouse-connect==0.7.16 echo ::endgroup:: # Test tools @@ -51,7 +51,7 @@ jobs: echo ::group::setup Python environment python -m venv .venv/ source .venv/bin/activate - pip install pip==23.0.1 pytest==7.2.0 rockset==1.0.3 \ + pip install pip==23.0.1 pytest==7.2.0 \ jsonschema==4.17.3 numpy==1.24.1 pandas==2.1.4 boto3==1.19.12 \ clickhouse-connect==0.7.16 echo ::endgroup:: diff --git a/.github/workflows/update-test-times.yml b/.github/workflows/update-test-times.yml index 6ad73aa30a..73333bc9cc 100644 --- a/.github/workflows/update-test-times.yml +++ b/.github/workflows/update-test-times.yml @@ -35,7 +35,6 @@ jobs: run: | python -m torchci.update_test_times env: - ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }} CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }} CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }} CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }} diff --git a/.github/workflows/update_test_file_ratings.yml b/.github/workflows/update_test_file_ratings.yml index ed493fd490..66793f6b30 100644 --- a/.github/workflows/update_test_file_ratings.yml +++ b/.github/workflows/update_test_file_ratings.yml @@ -31,7 +31,7 @@ jobs: - name: Install Dependencies run: | pip3 install --upgrade pip - pip3 install boto3==1.19.12 rockset==1.0.3 clickhouse-connect==0.7.16 + pip3 install boto3==1.19.12 clickhouse-connect==0.7.16 cd test-infra/tools/torchci pip3 install -e . @@ -59,7 +59,6 @@ jobs: # python3 test-infra/tools/torchci/td/td_heuristic_profiling.py env: - ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }} CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }} CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }} CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }} diff --git a/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 b/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 index b384898001..d8f1ffb10c 100644 --- a/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 +++ b/aws/ami/windows/scripts/Installers/Install-Pip-Dependencies.ps1 @@ -13,4 +13,4 @@ if (-Not (Test-Path -Path $condaHook -PathType Leaf)) { conda activate base # Some dependencies are installed by pip before testing, pin all of them -pip install "ninja==1.10.0.post1" "future==0.18.2" "hypothesis==5.35.1" "expecttest==0.1.3" "librosa>=0.6.2" "scipy==1.6.3" "psutil==5.9.1" "pynvml==11.4.1" "pillow==9.2.0" "unittest-xml-reporting<=3.2.0,>=2.0.0" "pytest==7.1.3" "pytest-xdist==2.5.0" "pytest-flakefinder==1.1.0" "pytest-rerunfailures==10.2" "pytest-shard==0.1.2" "sympy==1.11.1" "xdoctest==1.0.2" "pygments==2.12.0" "opt-einsum>=3.3" "networkx==2.8.8" "mpmath==1.2.1" "pytest-rerunfailures==10.2" "pytest-cpp==2.3.0" "rockset==1.0.3" +pip install "ninja==1.10.0.post1" "future==0.18.2" "hypothesis==5.35.1" "expecttest==0.1.3" "librosa>=0.6.2" "scipy==1.6.3" "psutil==5.9.1" "pynvml==11.4.1" "pillow==9.2.0" "unittest-xml-reporting<=3.2.0,>=2.0.0" "pytest==7.1.3" "pytest-xdist==2.5.0" "pytest-flakefinder==1.1.0" "pytest-rerunfailures==10.2" "pytest-shard==0.1.2" "sympy==1.11.1" "xdoctest==1.0.2" "pygments==2.12.0" "opt-einsum>=3.3" "networkx==2.8.8" "mpmath==1.2.1" "pytest-rerunfailures==10.2" "pytest-cpp==2.3.0" diff --git a/tools/torchci/queue_alert.py b/tools/torchci/queue_alert.py index b4d021e278..33d6e7252d 100644 --- a/tools/torchci/queue_alert.py +++ b/tools/torchci/queue_alert.py @@ -11,8 +11,6 @@ REPO_ROOT = Path(__file__).resolve().parent.parent.parent -PROD_VERSIONS_FILE = REPO_ROOT / "torchci" / "rockset" / "prodVersions.json" - QUEUE_ALERT_LABEL = "queue-alert" MAX_HOURS = 4 diff --git a/tools/torchci/tests/test_queue_alert.py b/tools/torchci/tests/test_queue_alert.py index db9ce6eb94..6d3227dfcc 100644 --- a/tools/torchci/tests/test_queue_alert.py +++ b/tools/torchci/tests/test_queue_alert.py @@ -5,15 +5,15 @@ class TestGitHubPR(TestCase): def test_filter_long_queues(self): - rockset_results = [ + db_results = [ {"count": 30, "avg_queue_s": 0, "machine_type": "linux.gcp.a100.large"}, {"count": 100, "avg_queue_s": 0, "machine_type": "machine1"}, {"count": 30, "avg_queue_s": 3600 * 5, "machine_type": "machine2"}, ] - long_queues = filter_long_queues(rockset_results) + long_queues = filter_long_queues(db_results) self.assertEqual(len(long_queues), 3) - rockset_results = [ + db_results = [ { "count": 0, "avg_queue_s": 3600 * 30, @@ -22,7 +22,7 @@ def test_filter_long_queues(self): {"count": 10, "avg_queue_s": 0, "machine_type": "machine1"}, {"count": 10, "avg_queue_s": 3600 * 1, "machine_type": "machine2"}, ] - long_queues = filter_long_queues(rockset_results) + long_queues = filter_long_queues(db_results) self.assertEqual(len(long_queues), 1) self.assertEqual(long_queues[0].machine, "linux.gcp.a100.large") From 82a232660b95b4d985d59ee24a3f6e55478480ff Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Fri, 3 Jan 2025 11:21:02 -0800 Subject: [PATCH 7/7] Update [ghstack-poisoned] --- .../benchmark/BranchAndCommitPicker.tsx | 17 ++++------------- .../[suite]/[compiler]/[[...page]].tsx | 4 ---- torchci/pages/benchmark/compilers.tsx | 4 ---- torchci/pages/benchmark/llms.tsx | 4 ---- torchci/pages/benchmark/torchao.tsx | 4 ---- 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/torchci/components/benchmark/BranchAndCommitPicker.tsx b/torchci/components/benchmark/BranchAndCommitPicker.tsx index c957a4d566..b2f6ab62e8 100644 --- a/torchci/components/benchmark/BranchAndCommitPicker.tsx +++ b/torchci/components/benchmark/BranchAndCommitPicker.tsx @@ -9,7 +9,6 @@ import { import { MAIN_BRANCH, SHA_DISPLAY_LENGTH } from "components/benchmark/common"; import dayjs from "dayjs"; import { fetcher } from "lib/GeneralUtils"; -import { RocksetParam } from "lib/rockset"; import { useEffect } from "react"; import useSWR from "swr"; @@ -48,7 +47,6 @@ function groupCommitByBranch(data: any) { export function BranchAndCommitPicker({ queryName, - queryCollection, queryParams, branch, setBranch, @@ -57,11 +55,9 @@ export function BranchAndCommitPicker({ titlePrefix, fallbackIndex, timeRange, - useClickHouse, }: { queryName: string; - queryCollection: string; - queryParams: RocksetParam[] | {}; + queryParams: { [k: string]: any }; branch: string; setBranch: any; commit: string; @@ -69,15 +65,10 @@ export function BranchAndCommitPicker({ titlePrefix: string; fallbackIndex: number; timeRange: any; - useClickHouse: boolean; }) { - const url = useClickHouse - ? `/api/clickhouse/${queryName}?parameters=${encodeURIComponent( - JSON.stringify(queryParams) - )}` - : `/api/query/${queryCollection}/${queryName}?parameters=${encodeURIComponent( - JSON.stringify(queryParams as RocksetParam[]) - )}`; + const url = `/api/clickhouse/${queryName}?parameters=${encodeURIComponent( + JSON.stringify(queryParams) + )}`; let { data, error } = useSWR(url, fetcher, { refreshInterval: 60 * 60 * 1000, // refresh every hour diff --git a/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx b/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx index 763fee376b..f22bbd0c50 100644 --- a/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx +++ b/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx @@ -368,7 +368,6 @@ export default function Page() { /> —Diff→ diff --git a/torchci/pages/benchmark/compilers.tsx b/torchci/pages/benchmark/compilers.tsx index 4fc6e42940..2cb126d8b6 100644 --- a/torchci/pages/benchmark/compilers.tsx +++ b/torchci/pages/benchmark/compilers.tsx @@ -302,7 +302,6 @@ export default function Page() { /> —Diff→ —Diff→ —Diff→