Skip to content

Commit

Permalink
chore: fix broken notebooks from weekly
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed Apr 15, 2024
1 parent c07de90 commit d1437c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -875,12 +875,15 @@ jobs:
make pytest_codeblocks_pypi_cml VERSION="$PROJECT_VERSION"
# Run Pytest on all notebooks on a weekly basis
# Note: some notebooks need specific data stored in LFS
- name: PyTest Notebooks (weekly)
if: |
fromJSON(env.IS_WEEKLY)
&& steps.conformance.outcome == 'success'
&& !cancelled()
run: |
git lfs pull --include "docs/advanced_examples/data/**" --exclude ""
make pytest_nb
- name: Fast sanity check
Expand Down
12 changes: 7 additions & 5 deletions docs/advanced_examples/DecisionTreeRegressor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,11 @@
}
],
"source": [
"x_train_subset = x_train[:500]\n",
"\n",
"begin = time.time()\n",
"circuit = model.compile(x_train)\n",
"print(f\"Compiled with {len(x_train)} samples in {(time.time() - begin):.4f} seconds\")"
"circuit = model.compile(x_train_subset)\n",
"print(f\"Compiled with {len(x_train_subset)} samples in {(time.time() - begin):.4f} seconds\")"
]
},
{
Expand Down Expand Up @@ -622,11 +624,11 @@
"source": [
"# Check prediction FHE vs sklearn\n",
"print(\"Cipher estimates:\")\n",
"print(f\"{', '.join(f'{print_as_dollars(x)}' for x in y_pred_fhe[:,0])}\")\n",
"print(f\"{', '.join(f'{print_as_dollars(x)}' for x in y_pred_fhe)}\")\n",
"print(\"Plain estimates:\")\n",
"print(f\"{', '.join(f'{print_as_dollars(x)}' for x in y_pred[:,0])}\")\n",
"print(f\"{', '.join(f'{print_as_dollars(x)}' for x in y_pred)}\")\n",
"print(\"Differences:\")\n",
"print(f\"{', '.join(f'{print_as_dollars(x)}' for x in (y_pred_fhe[:,0] - y_pred[:,0]))}\")"
"print(f\"{', '.join(f'{print_as_dollars(x)}' for x in (y_pred_fhe - y_pred))}\")"
]
},
{
Expand Down

0 comments on commit d1437c5

Please sign in to comment.