зеркало из https://github.com/microsoft/fastseq.git
69 строки
1.9 KiB
YAML
69 строки
1.9 KiB
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
#Azure pipeline for continuous integration
|
|
|
|
trigger:
|
|
paths:
|
|
exclude:
|
|
- docs
|
|
jobs:
|
|
- job: Fastseq_unittests
|
|
timeoutInMinutes: 360
|
|
pool:
|
|
name: default
|
|
demands:
|
|
- agent.name -equals gpu3
|
|
container:
|
|
image: adsbrainwestus2.azurecr.io/fastseq:dev-py3
|
|
endpoint: fastseq-acr
|
|
options: --gpus device=3
|
|
steps:
|
|
- script: |
|
|
#install fastseq
|
|
which pip
|
|
which python
|
|
|
|
echo "******* Installing fairseq *******"
|
|
pip install fairseq==0.10.2
|
|
pip show fairseq
|
|
|
|
echo "******* Installing transformers *******"
|
|
pip install transformers
|
|
pip show transformers
|
|
|
|
echo "******* Installing fastseq *******"
|
|
pip install --editable .
|
|
pip show fastseq
|
|
|
|
echo "******* Adding local bin to path *******"
|
|
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
|
|
|
|
echo "******* Running fastseq unittests *******"
|
|
pip install pytorch-transformers==1.0.0
|
|
bash tests/run_fastseq_tests.sh
|
|
|
|
#cd benchmarks/
|
|
#bash run_all_benchmarks.sh
|
|
|
|
#show environment
|
|
which python
|
|
python --version
|
|
nvcc --version
|
|
python -c "import torch; print('torch:', torch.__version__, torch)"
|
|
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
|
|
|
|
echo "******* Running fairseq unittests *******"
|
|
bash tests/run_fairseq_tests.sh
|
|
|
|
echo "******* Running transformers unittests *******"
|
|
bash tests/run_transformers_tests.sh
|
|
|
|
displayName: 'run fastseq unit tests'
|
|
- task: PublishTestResults@2
|
|
condition: succeededOrFailed()
|
|
inputs:
|
|
testRunTitle: 'Publish test results for Python $(python.version)'
|
|
testResultsFiles: 'tests/log_xml/*.xml'
|
|
failTaskOnFailedTests: true
|