FLAN-UL2模型无法找到需要迁移的源代码,只有一篇md文件 #1088
This file contains hidden or 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
name: Single model test. | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
run-pytest: | |
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/model') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/pull/${{ github.event.issue.number }}/head | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip==24.0 | |
pip install -r requirements/requirements.txt | |
- name: Analysing the mindnlp code with pylint | |
run: | | |
pylint mindnlp --rcfile=.github/pylint.conf | |
- name: install mindspore 2.2.14 | |
run: | | |
pip install mindspore==2.2.14 | |
- name: Parse comment | |
id: parse_comment | |
run: | | |
COMMENT_BODY="${{ github.event.comment.body }}" | |
TRIMMED_COMMENT=$(echo "$COMMENT_BODY" | tr -d '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') | |
if [[ "$TRIMMED_COMMENT" =~ ^/model[[:space:]]+([a-zA-Z0-9_-]+)$ ]]; then | |
MODEL_NAME="${BASH_REMATCH[1]}" | |
echo "Extracted model name: $MODEL_NAME" | |
echo "MODEL_NAME=$MODEL_NAME" >> $GITHUB_ENV | |
echo "MODEL_NAME is set to: $MODEL_NAME" | |
else | |
echo "No valid model command found." | |
exit 1 | |
fi | |
- name: Check if directory exists | |
run: | | |
if [ ! -d "mindnlp/transformers/models/${{ env.MODEL_NAME }}" ]; then | |
echo "Directory 'tests/ut/transformers/models/${{ env.MODEL_NAME }}' does not exist." | |
exit 1 | |
fi | |
if [ ! -d "tests/ut/transformers/models/${{ env.MODEL_NAME }}" ]; then | |
echo "Directory 'tests/ut/transformers/models/${{ env.MODEL_NAME }}' does not exist." | |
exit 1 | |
fi | |
- name: Check if test files exist | |
run: | | |
if [ -z "$(ls -A tests/ut/transformers/models/${{ env.MODEL_NAME }}/test_modeling_*.py 2>/dev/null)" ]; then | |
echo "No test_modeling_*.py files found in directory '${{ env.MODEL_NAME }}'." | |
exit 1 | |
fi | |
- name: Run pytest | |
run: | | |
export RUN_SLOW=1 | |
pytest -vs tests/ut/transformers/models/${{ env.MODEL_NAME }} |