Skip to content

Add llama3.1-8b reference implementation #323

Add llama3.1-8b reference implementation

Add llama3.1-8b reference implementation #323

# This workflow will run configured tests for any updated MLC script
name: Test script on modified meta
on:
pull_request:
branches: [ "main", "dev" ]
paths:
- 'script/**meta.yaml'
jobs:
get_modified_files:
runs-on: ubuntu-latest
outputs:
processed_files: ${{ steps.modified-files.outputs.processed_files }}
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install pyyaml
- name: Get changed files
id: modified-files
run: |
git remote add upstream ${{ github.event.pull_request.base.repo.clone_url }}
git fetch upstream
changed_files=$(git diff upstream/${{ github.event.pull_request.base.ref }} --name-only | paste -sd, -)
echo "$changed_files" | python3 .github/scripts/list_modified_files.py
process_modified_files:
runs-on: ubuntu-latest
needs: get_modified_files
if: needs.get_modified_files.outputs.processed_files != '[]' && needs.get_modified_files.outputs.processed_files != ''
strategy:
fail-fast: false
matrix:
file_info: ${{ fromJSON(needs.get_modified_files.outputs.processed_files).file_info }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Process meta.yaml file
run: |
echo "Processing ${{ matrix.file_info.file }} with run number ${{ matrix.file_info.num_run }}"
pip install mlcflow
mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }}
mlc test script ${{ matrix.file_info.uid}} --test_input_index=${{ matrix.file_info.num_run }} --docker_mlc_repo=${{ github.event.pull_request.head.repo.html_url }} --docker_mlc_repo_branch=${{ github.event.pull_request.head.ref }} --quiet