You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, not entirely sure if this question is best suited here or on the cache action, but we have been trying to utilize the benchmarking caching as described in this repository with a few issues. I work with a group of developers looking to utilize the benchmark.
I've attached a copy of our action yaml below, but we are using the split restore/save parts of the cache action because we only want to save benchmarks run against our main branch. However any subsequent benchmarks have started yielding failures as follows.
Run actions/cache/save@v4
with:
path: ./cache
key: macos-latest-benchmark
enableCrossOsArchive: false
env:
PYTHON: 3.1[2](https://github.com/RadioAstronomySoftwareGroup/pyuvdata/actions/runs/11281421062/job/31377142366#step:9:2)
INPUT_RUN_POST: false
CONDA: /Users/runner/miniconda[3](https://github.com/RadioAstronomySoftwareGroup/pyuvdata/actions/runs/11281421062/job/31377142366#step:9:3)
CONDA_PKGS_DIR: /Users/runner/conda_pkgs_dir
/opt/homebrew/bin/gtar --posix -cf cache.tzst --exclude cache.tzst -P -C /Users/runner/work/pyuvdata/pyuvdata --files-from manifest.txt --delay-directory-restore --use-compress-program zstdmt
Failed to save: Unable to reserve cache with key macos-latest-benchmark, another job may be creating this cache. More details: Cache already exists. Scope: refs/heads/main, Key: macos-latest-benchmark, Version: e[4](https://github.com/RadioAstronomySoftwareGroup/pyuvdata/actions/runs/11281421062/job/31377142366#step:9:4)4d85be67565de5351873d607403f9baacc7ff08f9c4d36df4618c8a[5](https://github.com/RadioAstronomySoftwareGroup/pyuvdata/actions/runs/11281421062/job/31377142366#step:9:5)061620
Warning: Cache save failed.
This warning lead us to the cache action's readme stating all caches are immutable but with some workaround. We are wondering if there is a better method known to the benchmark team to update the cache when we run benchmarking on main, or if using the "restore-key" method mentioned in the linked document is the only way.
benchmark:
name: Performance Benchmarkneeds: testsenv:
PYTHON: ${{ matrix.python-version }}runs-on: ${{ matrix.os }}defaults:
run:
# Adding -l {0} helps ensure conda can be found properly in windows.shell: bash -l {0}strategy:
fail-fast: falsematrix:
os: [macos-latest, windows-latest, ubuntu-latest]python-version: ["3.12"]include:
- env_name: pyuvdata_tests_windowsos: windows-latest
- env_name: pyuvdata_tests_mac_armos: macos-latest
- env_name: pyuvdata_testsos: macos-13python-version: "3.12"
- env_name: pyuvdata_testsos: ubuntu-lateststeps:
- uses: actions/checkout@mainwith:
fetch-depth: 0
- name: Setup Miniforgeuses: conda-incubator/setup-miniconda@v3with:
miniforge-version: latestpython-version: ${{ matrix.python-version }}environment-file: ci/${{ matrix.env_name }}.ymlactivate-environment: ${{ matrix.env_name }}run-post: false
- name: Conda Inforun: | conda info -a conda list PYVER=`python -c "import sys; print('{:d}.{:d}'.format(sys.version_info.major, sys.version_info.minor))"` if [[ $PYVER != $PYTHON ]]; then exit 1; fi# also install benchmark utility
- name: Installrun: | pip install pytest-benchmark pip install .
- name: Run benchmarkrun: | pytest --benchmark-only --benchmark-json output.json# Download previous benchmark result from cache (if exists)
- name: Download previous benchmark datauses: actions/cache/restore@v4with:
path: ./cachekey: ${{ matrix.os }}-benchmark# Run `github-action-benchmark` action# this step also EDITS the ./cache/benchmark-data.json file# We do not need to add output.json to the cache directory
- name: Compare benchmarksuses: benchmark-action/github-action-benchmark@v1with:
# What benchmark tool the output.txt came fromtool: 'pytest'# Where the output from the benchmark tool is storedoutput-file-path: output.json# Where the previous data file is storedexternal-data-json-path: ./cache/benchmark-data.json# Workflow will fail when an alert happensfail-on-alert: true# Comment on the PR if the branch is not a forkcomment-on-alert: true# Enable Job Summary for PRssummary-always: truegithub-token: ${{ secrets.GITHUB_TOKEN }}
- name: Store benchmark resultsuses: actions/cache/save@v4# only store the cache if being run on mainif: github.ref == 'refs/heads/main'with:
path: ./cachekey: ${{ matrix.os }}-benchmark
The text was updated successfully, but these errors were encountered:
Hi there, not entirely sure if this question is best suited here or on the cache action, but we have been trying to utilize the benchmarking caching as described in this repository with a few issues. I work with a group of developers looking to utilize the benchmark.
I've attached a copy of our action yaml below, but we are using the split restore/save parts of the cache action because we only want to save benchmarks run against our
main
branch. However any subsequent benchmarks have started yielding failures as follows.This warning lead us to the cache action's readme stating all caches are immutable but with some workaround. We are wondering if there is a better method known to the benchmark team to update the cache when we run benchmarking on main, or if using the "restore-key" method mentioned in the linked document is the only way.
The text was updated successfully, but these errors were encountered: