Skip to content

Commit

Permalink
Merge changes for MLC (#128)
Browse files Browse the repository at this point in the history
Changes to support MLCFlow
  • Loading branch information
arjunsuresh authored Jan 23, 2025
1 parent 3f93ae6 commit 04d9d38
Show file tree
Hide file tree
Showing 649 changed files with 2,890 additions and 2,770 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import sys
import os
import cmind as cm
import check as checks
import mlc
import json
import yaml

Expand All @@ -11,7 +10,7 @@
print(file)
if not os.path.isfile(file) or not "script" in file:
continue
if not file.endswith("_cm.json") and not file.endswith("_cm.yaml"):
if not file.endswith("meta.json") and not file.endswith("meta.yaml"):
continue
script_path = os.path.dirname(file)
f = open(file)
Expand All @@ -24,7 +23,7 @@
uid = data['uid']

ii = {
'action': 'test', 'automation': 'script', 'artifact': uid, 'quiet': 'yes', 'out': 'con'
'action': 'test', 'target': 'script', 'item': uid, 'quiet': 'yes', 'out': 'con'
}
if os.environ.get('DOCKER_CM_REPO', '') != '':
ii['docker_cm_repo'] = os.environ['DOCKER_CM_REPO']
Expand All @@ -33,6 +32,6 @@
if os.environ.get('TEST_INPUT_INDEX', '') != '':
ii['test_input_index'] = os.environ['TEST_INPUT_INDEX']
print(ii)
r = cm.access(ii)

checks.check_return(r)
ret = mlc.access(ii)
if ret['return'] > 0:
raise Exception(r['error'])
12 changes: 6 additions & 6 deletions .github/workflows/run-individual-script-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This workflow will run configured tests for any updated CM scripts
name: Individual CM script Tests
name: Individual Automation script Tests

on:
pull_request:
branches: [ "main", "dev" ]
paths:
- 'script/**_cm.json'
- 'script/**_cm.yaml'
- 'script/**meta.json'
- 'script/**meta.yaml'

jobs:
run-script-tests:
Expand All @@ -32,6 +32,6 @@ jobs:
for file in ${{ steps.getfile.outputs.files }}; do
echo $file
done
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
DOCKER_CM_REPO=${{ github.event.pull_request.head.repo.html_url }} DOCKER_CM_REPO_BRANCH=${{ github.event.pull_request.head.ref }} TEST_INPUT_INDEX=${{ matrix.test-input-index }} python3 script/test-cm-core/src/script/process_tests.py ${{ steps.getfile.outputs.files }}
pip install mlcflow
mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }}
DOCKER_CM_REPO=${{ github.event.pull_request.head.repo.html_url }} DOCKER_CM_REPO_BRANCH=${{ github.event.pull_request.head.ref }} TEST_INPUT_INDEX=${{ matrix.test-input-index }} python3 .github/scripts/process_individual_tests.py ${{ steps.getfile.outputs.files }}
53 changes: 0 additions & 53 deletions .github/workflows/test-cm-script-features.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/test-cm-tutorial-retinanet.yml

This file was deleted.

63 changes: 0 additions & 63 deletions .github/workflows/test-cm-tutorial-tvm-pip.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/test-cm-tutorial-tvm.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/test-cm4mlops-wheel-macos.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/test-cm4mlops-wheel-windows.yml

This file was deleted.

23 changes: 8 additions & 15 deletions .github/workflows/test-image-classification-onnx.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: image classification with ONNX
name: Image classification with ONNX

on:
pull_request:
branches: [ "main", "dev", "mlperf-inference" ]
branches: [ "main", "dev" ]
paths:
- '.github/workflows/test-image-classification-onnx.yml'
- '**'
Expand All @@ -30,18 +27,14 @@ jobs:
if: matrix.os == 'windows-latest'
run: |
git config --system core.longpaths true
- name: Install cm4mlops on Windows
if: matrix.os == 'windows-latest'
- name: Install mlcflow
run: |
$env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops
- name: Install dependencies on Unix Platforms
if: matrix.os != 'windows-latest'
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
pip install mlcflow
pip install tabulate
- name: Pull MLOps repository
run: |
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }}
- name: Test image classification with ONNX
run: |
cm run script --tags=python,app,image-classification,onnx --quiet
mlcr --tags=python,app,image-classification,onnx --quiet
Loading

0 comments on commit 04d9d38

Please sign in to comment.