scikit-learnアップデート #423
Workflow file for this run
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
name: run_notebooks | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
permissions: { } | |
jobs: | |
run_notebooks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Run docker containers | |
run: docker compose up -d --wait | |
- name: Run notebooks | |
run: | | |
chmod -R 777 docker/ | |
for f in $(find docker/work -type f -name "*.ipynb" -not -path "*/.ipynb_checkpoints/*" | sed -e "s:docker/work/::g"); do | |
echo "Run docker/work/${f}" | |
# 「UsageError: %%sql is a cell magic, but the cell body is empty. Did you mean the line magic %sql (single %)? 」を許容するため、UsageErrorを許容する設定にしている | |
docker compose exec -T notebook bash -c "cd work && jupyter nbconvert --to notebook --debug --NotebookClient.allow_error_names UsageError --execute ${f}" | |
# 実行時に「MetaData.__init__() got an unexpected keyword argument 'bind'」が発生していたら異常終了させる | |
if grep unexpected "$(echo "docker/work/${f}" | sed -e 's/\.ipynb/\.nbconvert.ipynb/g')"; then | |
exit 1 | |
fi | |
echo | |
done |