fix: update copyright, license and attribution, fixes #46 #34
Workflow file for this run
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: python | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| jobs: | |
| infer: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.6', '3.7', '3.8', '3.9'] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ${{ env.pythonLocation }} | |
| key: ${{ env.pythonLocation }}-${{ hashFiles('python/arabic/setup.py') }}-${{ hashFiles('python/arabic/requirements.txt') }} | |
| - name: Install requirements | |
| working-directory: ./python/arabic | |
| run: | | |
| pip install --upgrade --upgrade-strategy eager -r requirements.txt -e . | |
| - name: Download PyTorch model | |
| working-directory: ./python/arabic | |
| run: | | |
| curl -sSL https://github.com/secryst/rababa-models/releases/download/0.1/2000000-snapshot.pt \ | |
| -o log_dir/CA_MSA.base.cbhg/models/2000000-snapshot.pt | |
| - name: Run diacriticization | |
| working-directory: ./python/arabic | |
| run: | | |
| python diacritize.py --model_kind "cbhg" --config config/cbhg.yml --text 'قطر' | |
| train: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.6', '3.7', '3.8', '3.9'] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ${{ env.pythonLocation }} | |
| key: ${{ env.pythonLocation }}-${{ hashFiles('python/setup.py') }}-${{ hashFiles('python/requirements.txt') }} | |
| - name: Install requirements | |
| working-directory: ./python/arabic | |
| run: | | |
| pip install --upgrade --upgrade-strategy eager -r requirements.txt -e . | |
| - name: Prepare dataset | |
| working-directory: ./python/arabic | |
| run: | | |
| mkdir -p data/CA_MSA | |
| touch data/CA_MSA/{eval,train,test}.csv | |
| cd data | |
| curl -sSL https://github.com/interscript/rababa-tashkeela/archive/refs/tags/v1.0.zip -o tashkeela.zip | |
| unzip tashkeela.zip | |
| for d in `ls rababa-tashkeela-1.0/tashkeela_val/*`; do cat $d >> CA_MSA/eval.csv; done | |
| for d in `ls rababa-tashkeela-1.0/tashkeela_train/*`; do cat $d >> CA_MSA/train.csv; done | |
| for d in `ls rababa-tashkeela-1.0/tashkeela_test/*`; do cat $d >> CA_MSA/test.csv; done | |
| - name: Try training (WIP) | |
| working-directory: ./python/arabic | |
| run: | | |
| python train.py --model "cbhg" --config config/test_cbhg.yml |