[libc++] Give the LNT tooling its own requirements.txt - #217889
Merged
Conversation
The LNT tooling alone has way fewer dependencies. Using a smaller requirements.txt should speed up the "request historical benchmark data" cron job that runs every 30 minutes and needs to install them.
|
@llvm/pr-subscribers-libcxx @llvm/pr-subscribers-github-workflow Author: Louis Dionne (ldionne) ChangesThe LNT tooling alone has way fewer dependencies. Using a smaller requirements.txt should speed up the "request historical benchmark data" cron job that runs every 30 minutes and needs to install them. Full diff: https://github.com/llvm/llvm-project/pull/217889.diff 9 Files Affected:
diff --git a/.github/workflows/libcxx-benchmark-commit.yml b/.github/workflows/libcxx-benchmark-commit.yml
index 5db27f0cf4db3..ad6a9dd078d64 100644
--- a/.github/workflows/libcxx-benchmark-commit.yml
+++ b/.github/workflows/libcxx-benchmark-commit.yml
@@ -144,7 +144,7 @@ jobs:
run: |
python3 -m venv .venv
source .venv/bin/activate
- pip install -r libcxx/utils/requirements.txt
+ pip install -r libcxx/utils/ci/lnt/requirements.txt
- name: Run the benchmarks
env:
diff --git a/.github/workflows/libcxx-benchmark-cron.yml b/.github/workflows/libcxx-benchmark-cron.yml
index 8b63426efd9d6..99c86e0e4f6e4 100644
--- a/.github/workflows/libcxx-benchmark-cron.yml
+++ b/.github/workflows/libcxx-benchmark-cron.yml
@@ -126,10 +126,10 @@ jobs:
with:
python-version: '3.14'
cache: pip
- cache-dependency-path: libcxx/utils/requirements.txt
+ cache-dependency-path: libcxx/utils/ci/lnt/requirements.txt
- name: Install dependencies
- run: pip install -r libcxx/utils/requirements.txt
+ run: pip install -r libcxx/utils/ci/lnt/requirements.txt
- name: Determine anchor commits
if: ${{ steps.restore-anchors.outputs.cache-hit != 'true' }}
diff --git a/libcxx/utils/ci/lnt/dispatch-benchmarks b/libcxx/utils/ci/lnt/dispatch-benchmarks
index ec92387aeed14..4af5ee4c3607c 100755
--- a/libcxx/utils/ci/lnt/dispatch-benchmarks
+++ b/libcxx/utils/ci/lnt/dispatch-benchmarks
@@ -326,7 +326,7 @@ def main(argv: List[str]) -> int:
'Results are submitted to LNT unless this is a dry run. That is not optional: '
'results that are not recorded anywhere would be requested again on every '
'invocation, forever.',
- epilog='This script depends on the modules listed in `libcxx/utils/requirements.txt`.',
+ epilog='This script depends on the modules listed in `libcxx/utils/ci/lnt/requirements.txt`.',
formatter_class=HelpFormatter)
parser.add_argument('--work-items', type=argparse.FileType('r'), default=sys.stdin,
help='A file containing the plan, one JSON object per line. By default, this is read from '
diff --git a/libcxx/utils/ci/lnt/plan-benchmarks b/libcxx/utils/ci/lnt/plan-benchmarks
index 25c7aa614a2c4..fe9b583674f6f 100755
--- a/libcxx/utils/ci/lnt/plan-benchmarks
+++ b/libcxx/utils/ci/lnt/plan-benchmarks
@@ -122,7 +122,7 @@ def main(argv: List[str]) -> int:
'Each line of the produced plan carries the commit to benchmark, the machine the '
'plan is about, how many runs the commit already has and how many it should end '
'up with, and a human-readable reason.',
- epilog='This script depends on the modules listed in `libcxx/utils/requirements.txt`.',
+ epilog='This script depends on the modules listed in `libcxx/utils/ci/lnt/requirements.txt`.',
formatter_class=HelpFormatter)
parser.add_argument('--commit-list', type=argparse.FileType('r'), default=sys.stdin,
help='A file of whitespace separated commits for which benchmark data is desired. By default, '
diff --git a/libcxx/utils/ci/lnt/requirements.txt b/libcxx/utils/ci/lnt/requirements.txt
new file mode 100644
index 0000000000000..3876354ca072c
--- /dev/null
+++ b/libcxx/utils/ci/lnt/requirements.txt
@@ -0,0 +1,3 @@
+llvm-lnt
+PyGithub
+tabulate
diff --git a/libcxx/utils/ci/lnt/run-benchmarks b/libcxx/utils/ci/lnt/run-benchmarks
index a8111d331441e..9d9c63ca4ba37 100755
--- a/libcxx/utils/ci/lnt/run-benchmarks
+++ b/libcxx/utils/ci/lnt/run-benchmarks
@@ -70,7 +70,7 @@ def main(argv):
parser = argparse.ArgumentParser(
prog='run-benchmarks',
description='Benchmark libc++ at the given commit and produce a LNT JSON report.',
- epilog='This script depends on the modules listed in `libcxx/utils/requirements.txt`.')
+ epilog='This script depends on the modules listed in `libcxx/utils/ci/lnt/requirements.txt`.')
parser.add_argument('--benchmark-commit', type=str, required=True,
help='The SHA representing the version of the library to benchmark.')
parser.add_argument('--test-suite-commit', type=str, required=True,
@@ -136,7 +136,7 @@ def main(argv):
if args.build_dir is not None and args.build_dir.exists():
sys.exit(f'error: build directory {args.build_dir} already exists; not overwriting it')
if shutil.which('lnt') is None:
- sys.exit('error: cannot find `lnt`; install libcxx/utils/requirements.txt')
+ sys.exit('error: cannot find `lnt`; install libcxx/utils/ci/lnt/requirements.txt')
with contextlib.ExitStack() as stack:
# The build artifacts are kept in --build-dir when it is given, and stored in a temporary directory
diff --git a/libcxx/utils/ci/lnt/select-anchor-commits b/libcxx/utils/ci/lnt/select-anchor-commits
index 34f4c1d63aeb6..91dbf256609b6 100755
--- a/libcxx/utils/ci/lnt/select-anchor-commits
+++ b/libcxx/utils/ci/lnt/select-anchor-commits
@@ -142,7 +142,7 @@ def main(argv: List[str]) -> int:
'produce the same commits. This makes it possible to recompute the list in '
'a reproducible fashion, which is useful when e.g. re-generating historical '
'performance data after a configuration change.',
- epilog='This script depends on the modules listed in `libcxx/utils/requirements.txt`.',
+ epilog='This script depends on the modules listed in `libcxx/utils/ci/lnt/requirements.txt`.',
formatter_class=HelpFormatter)
parser.add_argument('--since', type=date, required=True,
help='Only select commits on or after this date (UTC). Selection starts at the first '
diff --git a/libcxx/utils/ci/lnt/submit-benchmarks b/libcxx/utils/ci/lnt/submit-benchmarks
index 6a01ce67e2b96..2f2286e369e75 100755
--- a/libcxx/utils/ci/lnt/submit-benchmarks
+++ b/libcxx/utils/ci/lnt/submit-benchmarks
@@ -18,7 +18,7 @@ def main(argv):
parser = argparse.ArgumentParser(
prog='submit-benchmarks',
description='Submit a LNT JSON report to a LNT server.',
- epilog='This script depends on the modules listed in `libcxx/utils/requirements.txt`.')
+ epilog='This script depends on the modules listed in `libcxx/utils/ci/lnt/requirements.txt`.')
parser.add_argument('report', type=pathlib.Path,
help='Path to the LNT JSON report to submit.')
parser.add_argument('--lnt-url', type=str, required=True,
diff --git a/libcxx/utils/requirements.txt b/libcxx/utils/requirements.txt
index ccccf1b266783..b664c57098de9 100644
--- a/libcxx/utils/requirements.txt
+++ b/libcxx/utils/requirements.txt
@@ -1,11 +1,9 @@
+-r ci/lnt/requirements.txt
click
GitPython
-llvm-lnt
numpy
pandas
plotly
-PyGithub
scipy
statsmodels
-tabulate
tqdm
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The LNT tooling alone has way fewer dependencies. Using a smaller requirements.txt should speed up the "request historical benchmark data" cron job that runs every 30 minutes and needs to install them.