[object Object]

← back to Exo

cache tinygrad models in github workflow

115aab0d6c204a0f7e2b452e81f73fe0bf0593da · 2024-07-20 12:12:11 -0700 · Alex Cheema

Files touched

Diff

commit 115aab0d6c204a0f7e2b452e81f73fe0bf0593da
Author: Alex Cheema <alexcheema123@gmail.com>
Date:   Sat Jul 20 12:12:11 2024 -0700

    cache tinygrad models in github workflow
---
 .github/workflows/test.yml | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 9a3f311b..94466607 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -11,14 +11,17 @@ jobs:
     runs-on: macos-14
     steps:
     - uses: actions/checkout@v2
+
     - name: Set up Python
       uses: actions/setup-python@v2
       with:
         python-version: '3.12'
+
     - name: Install dependencies
       run: |
         python3 -m pip install --upgrade pip
         pip install .
+
     - name: Run tests
       run: python3 -m exo.inference.test_inference_engine
 
@@ -26,14 +29,17 @@ jobs:
     runs-on: macos-latest
     steps:
     - uses: actions/checkout@v2
+
     - name: Set up Python
       uses: actions/setup-python@v2
       with:
         python-version: '3.x'
+
     - name: Install dependencies
       run: |
         python3 -m pip install --upgrade pip
         pip install .
+
     - name: Run discovery integration test
       run: |
         # Start first instance
@@ -67,14 +73,33 @@ jobs:
     runs-on: macos-latest
     steps:
     - uses: actions/checkout@v2
+
     - name: Set up Python
       uses: actions/setup-python@v2
       with:
         python-version: '3.x'
+
+    - name: Cache huggingface hub models
+      uses: actions/cache@v3
+      with:
+        path: ~/.cache/huggingface
+        key: ${{ runner.os }}-huggingface-${{ hashFiles('~/.cache/huggingface/hub/**/*') }}
+        restore-keys: |
+          ${{ runner.os }}-huggingface-
+
+    - name: Cache tinygrad downloaded models
+      uses: actions/cache@v3
+      with:
+        path: ~/Library/Caches/tinygrad/downloads
+        key: ${{ runner.os }}-tinygrad-downloads-${{ hashFiles('~/Library/Caches/tinygrad/downloads/**/*') }}
+        restore-keys: |
+          ${{ runner.os }}-tinygrad-downloads-
+
     - name: Install dependencies
       run: |
         python3 -m pip install --upgrade pip
         pip install .
+
     - name: Run chatgpt api integration test
       run: |
         # Start first instance

← a4cc6677 async model downloading fixes #30  ·  back to Exo  ·  disable tinygrad infernece engine test waiting Waiting on ht d2ed4c2a →