Skip to content

Commit

Permalink
Skip ollama/preprocess_thepile examples in Nightly tests "Run Example…
Browse files Browse the repository at this point in the history
…s" (#102)

Skip some files in examples due to extra dependencies/not testing super critical functionality.
  • Loading branch information
scott-routledge2 authored Jan 3, 2025
1 parent 51003ac commit 88d15d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/e2e_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ jobs:
SF_USERNAME: ${{ secrets.SF_USERNAME }}
SF_PASSWORD: ${{ secrets.SF_PASSWORD }}
SF_ACCOUNT: ${{ secrets.SF_ACCOUNT }}
SKIP_FILES: "query_llm_ollama.py preprocess_thepile_bodo.py generate_kmers.py"
run: |
set -eo pipefail
ls *.py | xargs -n 1 -P 1 python
ls *.py | grep -v -E "$(echo $SKIP_FILES | sed 's/ /|/g')" | xargs -n 1 -P 1 python
16 changes: 5 additions & 11 deletions examples/Getting-Started/pi.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,16 @@
" pi = 4 * np.sum(xx ** 2 + y ** 2 < 1) / number_of_samples\n",
" print(\"Execution time:\", time.time() - t1, \"\\n result:\", pi)\n",
"\n",
"calc_pi(100_000_000) "
"calc_pi(100_000_000)"
]
},
{
"cell_type": "markdown",
"id": "1e8a515c",
"metadata": {},
"source": [
"### Run with Bodo in Parallel"
]
},
{
"cell_type": "raw",
"id": "7433e62c-35f0-4e1a-9b12-83328fbd74fc",
"metadata": {},
"source": [
"### Run with Bodo in Parallel\n",
"\n",
"To run this code with bodo, we need to add the `@bodo.jit` decorator on top of the same function. This decorator will tell bodo to compile the decorated function right before it is called, allowing bodo to optimize the program and run it in parallel. At runtime, the compiled function is executed on all availible cores and bodo automatically divides the work and manages the communication between cores so that you don't have to! \n",
"\n",
"The argument of `cache=True` caches the compiled binary such that next time you run this notebook, there is no need to compile as long as the code text stays the same. "
Expand Down Expand Up @@ -97,7 +91,7 @@
" pi = 4 * np.sum(xx ** 2 + y ** 2 < 1) / number_of_samples\n",
" print(\"Execution time:\", time.time() - t1, \"\\n result:\", pi)\n",
"\n",
"calc_pi(100_000_000) "
"calc_pi(100_000_000)"
]
},
{
Expand Down Expand Up @@ -137,7 +131,7 @@
" pi = 4 * np.sum(xx ** 2 + y ** 2 < 1) / number_of_samples\n",
" print(\"Execution time:\", time.time() - t1, \"\\n result:\", pi)\n",
"\n",
"calc_pi(100 * 100_000_000) "
"calc_pi(100 * 100_000_000)"
]
},
{
Expand Down

0 comments on commit 88d15d9

Please sign in to comment.