Add support for running functions on GPUs #895
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: Notebook LocalClient tests | |
on: | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #4.1.7 | |
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f #5.1.1 | |
with: | |
python-version: '3.11' | |
- name: patch notebooks | |
shell: bash | |
run: | | |
for f in tests/basic/*.py; do sed -i "s/import ServerlessClient/import LocalClient/;s/= ServerlessClient(/= LocalClient(/;/token=os\.environ\.get/d;/host=os\.environ\.get/d" "$f"; done | |
for f in tests/experimental/*.py; do sed -i "s/import ServerlessClient/import LocalClient/;s/= ServerlessClient(/= LocalClient(/;/token=os\.environ\.get/d;/host=os\.environ\.get/d" "$f"; done | |
rm tests/basic/06_function.py | |
- name: install dependencies | |
shell: bash | |
run: pip install client/ | |
- name: Run basic notebooks | |
shell: bash | |
run: | | |
cd tests/basic | |
for f in *.py; do echo "$f" && IN_TEST=True python "$f"; done | |
cd - | |
- name: Run experimental notebooks | |
shell: bash | |
run: | | |
cd tests/experimental | |
for f in *.py; do echo "$f" && IN_TEST=True python "$f"; done | |
cd - |