-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update flow.md * Download imagenet dataset to host by default * Added template script for MLC
- Loading branch information
1 parent
dce8947
commit b04b084
Showing
7 changed files
with
104 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright Notice | ||
|
||
© 2022-2025 MLCommons. All Rights Reserved. | ||
|
||
This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at: | ||
|
||
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from mlc import utils | ||
import os | ||
import subprocess | ||
|
||
|
||
def preprocess(i): | ||
|
||
env = i['env'] | ||
state = i['state'] | ||
|
||
os_info = i['os_info'] | ||
|
||
return {'return': 0} | ||
|
||
|
||
def postprocess(i): | ||
|
||
env = i['env'] | ||
state = i['state'] | ||
|
||
os_info = i['os_info'] | ||
|
||
return {'return': 0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
alias: template-script | ||
automation_alias: script | ||
automation_uid: 5b4e0237da074764 | ||
|
||
category: MLC Script Template | ||
|
||
# ENV keys matching the regular expression in new_env_keys will be exported by this script to the caller script, similar for new_state_keys too | ||
new_env_keys: [] | ||
new_state_keys: [] | ||
|
||
# Deps are executed first before the preprocess function inside customize.py | ||
deps: [] | ||
# Prehook deps are executed after the preprocess function inside customize.py but before the run script | ||
prehook_deps: [] | ||
# Posthook deps are executed after the run script but before the postprocess function inside customize.py | ||
posthook_deps: [] | ||
# Post deps are executed after the postprocess function inside customize.py | ||
post_deps: [] | ||
|
||
tags: | ||
- generic | ||
- template | ||
|
||
uid: fc3e6915a29342d8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
:: Function to exit if the last command failed | ||
:exit_if_error | ||
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% | ||
exit /b 0 | ||
|
||
:: Function to run a command | ||
:run | ||
echo Running: | ||
echo %1 | ||
echo. | ||
|
||
if /I "%MLC_FAKE_RUN%" NEQ "yes" ( | ||
call %1 | ||
call :exit_if_error | ||
) | ||
exit /b 0 | ||
|
||
:: Add your run commands here... | ||
:: call :run "%MLC_RUN_CMD%" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
function exit_if_error() { | ||
test $? -eq 0 || exit $? | ||
} | ||
|
||
function run() { | ||
echo "Running: " | ||
echo "$1" | ||
echo "" | ||
if [[ ${MLC_FAKE_RUN} != 'yes' ]]; then | ||
eval "$1" | ||
exit_if_error | ||
fi | ||
} | ||
|
||
#Add your run commands here... | ||
# run "$MLC_RUN_CMD" |