Skip to content

Update notebooks#323

Merged
alicjapolanska merged 11 commits intomainfrom
update_notebooks
Nov 13, 2025
Merged

Update notebooks#323
alicjapolanska merged 11 commits intomainfrom
update_notebooks

Conversation

@alicjapolanska
Copy link
Copy Markdown
Collaborator

Update legacy notebooks to use new imports.

Only install packages if on colab.

Update cross validation utils to only log log space values.

Copy link
Copy Markdown
Collaborator

@Kiyam Kiyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates legacy notebooks to modernize their structure and improve Colab compatibility. The key changes include conditionally installing packages only when running on Google Colab, updating import statements to use the new harmonic.utils module path, and modifying the cross-validation utility function to log values in log space rather than linear space.

Key Changes

  • Conditional package installation that only runs on Google Colab environments
  • Import path updates from import utils to import harmonic.utils as utils
  • Model class references updated from hm.model.* to hm.model_legacy.*
  • Cross-validation logging modified to output log-space values instead of linear-space values

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

File Description
notebooks/cross_validation_learnt_model.ipynb Updated to conditionally install packages on Colab, changed imports to use harmonic.utils, and updated model references to model_legacy
notebooks/cross_validation_hyper_parameters.ipynb Same updates as learnt_model notebook, plus a misplaced %%capture magic command within an if statement
notebooks/checkpointing.ipynb Updated with conditional Colab installation check
harmonic/utils.py Modified cross-validation logging to output log-space values using np.exp() and corrected variance calculations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.13%. Comparing base (2eeccd7) to head (1e49d03).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #323   +/-   ##
=======================================
  Coverage   94.13%   94.13%           
=======================================
  Files          10       10           
  Lines         802      802           
=======================================
  Hits          755      755           
  Misses         47       47           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alicjapolanska alicjapolanska merged commit a32962e into main Nov 13, 2025
2 checks passed
@alicjapolanska alicjapolanska deleted the update_notebooks branch November 13, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants