Skip to content

Commit

Permalink
Fix the PyCall invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzovarese committed Jul 18, 2024
1 parent 2ae9b77 commit 8686326
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/benchmark_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,17 @@ jobs:
- name: Install GT4Py from specific branch
run: |
git clone --branch fix_python_interp_path_in_cmake https://github.com/tehrengruber/gt4py.git ~/gt4py
pip install -r ~/gt4py/requirements-dev.txt
pip install -e ~/gt4py
cd ~/gt4py
pip install -r requirements-dev.txt
pip install -e .
- name: Install and Configure PyCall
run: |
julia --project -e 'using Pkg; Pkg.add("PyCall"); ENV["PYTHON"]="~/gt4py-venv/bin/python3"; Pkg.build("PyCall");'
source ~/gt4py-venv/bin/activate
julia --project -e 'using Pkg; Pkg.add("PyCall"); ENV["PYTHON"]="python"; Pkg.build("PyCall");'
- name: Check PyCall Configuration
run: |
source ~/gt4py-venv/bin/activate
julia -e 'using PyCall; @show PyCall.python'
- name: Extract Package Name from Project.toml
id: extract-package-name
run: |
Expand All @@ -42,19 +48,21 @@ jobs:
env:
JULIA_NUM_THREADS: 2
run: |
julia -e 'ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0; import Pkg; Pkg.add(;url="https://github.com/MilesCranmer/AirspeedVelocity.jl.git")'
julia -e 'ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0; import Pkg; Pkg.add(url="https://github.com/MilesCranmer/AirspeedVelocity.jl.git")'
julia -e 'ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0; import Pkg; Pkg.build("AirspeedVelocity")'
- name: Add ~/.julia/bin to PATH
run: |
echo "$HOME/.julia/bin" >> $GITHUB_PATH
- name: Run benchmarks
run: |
source ~/gt4py-venv/bin/activate
echo $PATH
ls -l ~/.julia/bin
mkdir results
benchpkg ${{ steps.extract-package-name.outputs.package_name }} --rev="${{github.event.repository.default_branch}},${{github.event.pull_request.head.sha}}" --url=${{ github.event.repository.clone_url }} --bench-on="${{github.event.repository.default_branch}}" --output-dir=results/ --tune
- name: Create plots from benchmarks
run: |
source ~/gt4py-venv/bin/activate
mkdir -p plots
benchpkgplot ${{ steps.extract-package-name.outputs.package_name }} --rev="${{github.event.repository.default_branch}},${{github.event.pull_request.head.sha}}" --npart=10 --format=png --input-dir=results/ --output-dir=plots/
- name: Upload plot as artifact
Expand All @@ -64,6 +72,7 @@ jobs:
path: plots
- name: Create markdown table from benchmarks
run: |
source ~/gt4py-venv/bin/activate
benchpkgtable ${{ steps.extract-package-name.outputs.package_name }} --rev="${{github.event.repository.default_branch}},${{github.event.pull_request.head.sha}}" --input-dir=results/ --ratio > table.md
echo '### Benchmark Results' > body.md
echo '' >> body.md
Expand Down

0 comments on commit 8686326

Please sign in to comment.