Skip to content

Commit

Permalink
fix: ci related issues and import errors (#91)
Browse files Browse the repository at this point in the history
* fix: pip install deps error

* ci: correct functional test names

* ci: functional test script abstraction

* ci: fix typos and echo env variables

* fix: deprecate persistant workers and device in cli

* ci: add timeout limit

* docs: update train cli descriptions

* ci: enable linting for PRs

* refactor: deprecate loguru (team preference)

* fix: format typo

* fix: mim extension installation

* ci: fix path error

* ci: fix export error

* ci: remove inner quotes

* ci: tree outputs in export and inference

* fix: import scope error

* ci: add more files to watch

* ci: flexible lint branch
  • Loading branch information
Unbinilium authored Jul 7, 2023
1 parent a164acf commit 17c3954
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/code-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
steps:
- name: checkout repository
uses: actions/checkout@v3
with:
ref: 'dev' # should be main later

- name: setup python
uses: actions/setup-python@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ on:
branches:
- dev # should be 'main' later
paths:
- 'configs/**'
- 'edgelab/**'
- 'requirements/**'
- 'scripts/**'
- 'tools/**'
- 'environment.yml'
- 'environment_cuda.yml'
- 'requirements.txt'
Expand Down
12 changes: 7 additions & 5 deletions scripts/test_functional.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ functional_test_core()
CONFIG_FILE="$2"
DATASETS_URL="$3"

CONFIG_FILE_NAME="$(basename -- \"${CONFIG_FILE} \")"
DATASETS_PATH="datasets/$(basename -- \"${DATASETS_URL} \")"
CONFIG_FILE_NAME="$(basename -- ${CONFIG_FILE})"
DATASETS_PATH="datasets/$(basename -- ${DATASETS_URL})"
DATASETS_DIR="${DATASETS_PATH%.*}"
LAST_CHECKPOINT="work_dirs/${CONFIG_FILE_NAME%.*}/last_checkpoint"

Expand All @@ -67,10 +67,11 @@ functional_test_core()
--no-validate \
--cfg-options \
data_root="${DATASETS_DIR}" \
epochs=1
max_epochs=10
return $?
;;
"export")
tree work_dirs
python3 tools/export.py \
"${CONFIG_FILE}" \
"$(cat \"${LAST_CHECKPOINT} \")" \
Expand All @@ -81,15 +82,16 @@ functional_test_core()
return $?
;;
"inference")
tree work_dirs
python3 tools/inference.py \
"${CONFIG_FILE}" \
"$(cat \"${LAST_CHECKPOINT} \" | sed -e 's/.pth/_int8.tflite/g')" \
"$(cat ${LAST_CHECKPOINT} | sed -e 's/.pth/_int8.tflite/g')" \
--cfg-options \
data_root="${DATASETS_DIR}" \
&& \
python3 tools/inference.py \
"${CONFIG_FILE}" \
"$(cat \"${LAST_CHECKPOINT} \" | sed -e 's/.pth/_float32.onnx/g')" \
"$(cat ${LAST_CHECKPOINT} | sed -e 's/.pth/_float32.onnx/g')" \
--cfg-options \
data_root="${DATASETS_DIR}"
return $?
Expand Down
2 changes: 1 addition & 1 deletion tools/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def verify_args(args):
def build_config(args):
from mmengine.config import Config

from tools.utils.config import load_config
from edgelab.tools.utils.config import load_config

args.targets = [str(target).lower() for target in args.targets]
args.precisions = [str(precision).lower() for precision in args.precisions]
Expand Down

0 comments on commit 17c3954

Please sign in to comment.