forked from stanford-crfm/helm
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (50 loc) · 1.45 KB
/
manage-python-cache.yml
File metadata and controls
54 lines (50 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Workflows for manually managing the Python cache.
#
# HELM's dependencies (e.g. PyTorch, transformers) can be very large,
# and the cache may contain multiple versions of these dependencies,
# so we may have to purge the cache from time to time.
name: Manage Python Cache
on: workflow_dispatch
jobs:
info:
name: Show cache info and package list
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.9.4"
- name: Get cache size
run: uv cache size
purge:
name: Purge and rebuild cache
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.9.4"
- name: Get cache size before clean
run: uv cache size
- name: Clean cache
run: uv cache clean
- name: Get cache size after clean
run: uv cache size