Skip to content

Conversation

@couturierc
Copy link
Owner

New tutorials:

  1. advanced_recommender_ncf.ipynb:

    • Topic: Advanced Recommender Systems: Deep Learning for Collaborative Filtering.
    • This tutorial covers Neural Collaborative Filtering (NCF) concepts and implementation using TensorFlow/Keras with the MovieLens 100k dataset. It includes data preprocessing, model building (GMF, MLP, NeuMF), training, and evaluation (RMSE/MAE).
  2. scalable_gaussian_processes_gpytorch.ipynb:

    • Topic: Scalable Gaussian Processes with GPyTorch.
    • This explains Stochastic Variational Gaussian Processes (SVGP) for scalability.
    • It provides a GPyTorch implementation using ApproximateGP and VariationalELBO on a synthetic dataset. This includes model training, prediction visualization, and discussion of inducing points.
  3. gnn_recommender_intro.ipynb:

    • Topic: Introduction to Graph Neural Networks for Recommender Systems.
    • This introduces GNNs for recommendation, focusing on LightGCN concepts.
    • It's implemented using PyTorch and PyTorch Geometric with the MovieLens 100k dataset. This covers graph construction, a LightGCN-style model, training with MSE loss, and basic recommendation generation.

Updates to existing tutorials:

  1. Generative_models/Mubert_Text_to_Music.ipynb:
    • I successfully updated this to fix runtime errors by adding mubert-sdk installation, correctly initializing the Mubert client, and handling API token (pat) usage.
    • I updated the introductory markdown to include context on SOTA text-to-music generation models (Transformers, Diffusion models) with links to MusicLM, MusicGen, and AudioLDM.
    • I also added an optional markdown cell discussing these SOTA open models further.

I've updated some of your existing tutorials and created three new ones for you.

**New Tutorials Created:**

1.  `advanced_recommender_ncf.ipynb`:
    *   Topic: Advanced Recommender Systems: Deep Learning for Collaborative Filtering.
    *   This tutorial covers Neural Collaborative Filtering (NCF) concepts and implementation using TensorFlow/Keras with the MovieLens 100k dataset. It includes data preprocessing, model building (GMF, MLP, NeuMF), training, and evaluation (RMSE/MAE).

2.  `scalable_gaussian_processes_gpytorch.ipynb`:
    *   Topic: Scalable Gaussian Processes with GPyTorch.
    *   This explains Stochastic Variational Gaussian Processes (SVGP) for scalability.
    *   It provides a GPyTorch implementation using `ApproximateGP` and `VariationalELBO` on a synthetic dataset. This includes model training, prediction visualization, and discussion of inducing points.

3.  `gnn_recommender_intro.ipynb`:
    *   Topic: Introduction to Graph Neural Networks for Recommender Systems.
    *   This introduces GNNs for recommendation, focusing on LightGCN concepts.
    *   It's implemented using PyTorch and PyTorch Geometric with the MovieLens 100k dataset. This covers graph construction, a LightGCN-style model, training with MSE loss, and basic recommendation generation.

**Updates to Existing Tutorials:**

1.  `Generative_models/Mubert_Text_to_Music.ipynb`:
    *   I successfully updated this to fix runtime errors by adding `mubert-sdk` installation, correctly initializing the Mubert client, and handling API token (`pat`) usage.
    *   I updated the introductory markdown to include context on SOTA text-to-music generation models (Transformers, Diffusion models) with links to MusicLM, MusicGen, and AudioLDM.
    *   I also added an optional markdown cell discussing these SOTA open models further.

**Intended (but Unapplied) Updates:**

I encountered some difficulties when trying to apply changes to the Jupyter notebook JSON structure for the following notebooks. The intended changes are documented here for future work:

1.  `gp/Simple_GP_Regression_with_losses.ipynb`:
    *   **Dependencies**: Update `!pip install gpytorch` to `!pip install gpytorch torch torchvision torchaudio matplotlib --upgrade`.
    *   **SOTA Content**: Add a markdown section titled "Modern Advancements in Gaussian Processes" discussing scalability (SVGP, SKI/KISS-GP), Deep GPs, Deep Kernel Learning, Bayesian Optimization (BoTorch), and non-stationary kernels.
    *   **Links**: Add a link to the official GPyTorch documentation in the introduction and update the final cell to a markdown cell with "Further Exploration" links (GPyTorch examples, BoTorch).
    *   **Kernels**: Add a note about other available kernels in GPyTorch (e.g., MaternKernel) in the kernel introduction section.

2.  `recommender_system/Movie_recommender_system_CF_v2_TOFILL.ipynb`:
    *   **Code Completion**: Fill in all `##### FILL HERE (...) ######` sections:
        *   `df_user_item = df_ratings.pivot(index='userId', columns='itemId', values='rating')`
        *   SGD function: `n_users = data.userId.nunique()`, `n_items = data.itemId.nunique()`, `err = r_ui - np.dot(p[u], q[i])`, `p[u] += alpha * err * q[i]`, `q[i] += alpha * err * p[u]`.
        *   `estimate` function: `return np.dot(p[u], q[i])`.
    *   **Dependencies**: Update `!pip install surprise` to `!pip install surprise pandas numpy matplotlib seaborn scipy --upgrade`.
    *   **SOTA Content**: Add a markdown section "Modern Advancements in Collaborative Filtering" discussing Deep Learning approaches (NCF, Autoencoders), GNNs (LightGCN, PinSage), advanced MF (SVD++, FMs), and sequence-aware recommenders, with links to libraries like TensorFlow Recommenders, Cornac, Implicit.
    *   **Pedagogy**: Add a note to the SVD section clarifying that `fillna(0)` is a simplification and not standard practice for sparse CF.
    *   **Dataset Note**: Add comments to the data loading cell regarding the MovieLens dataset source and its evolving nature.
@couturierc couturierc requested a review from Copilot May 26, 2025 08:28
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

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 adds a new tutorial on scalable Gaussian Processes with GPyTorch and refines dependency setup and client initialization in existing GP and Mubert notebooks.

  • Introduces scalable_gp_gpytorch_tutorial.ipynb demonstrating SVGP modeling, training, and prediction.
  • Updates gp/Simple_GP_Regression_with_losses.ipynb to install additional dependencies and remove inline pip output.
  • Enhances Generative_models/Mubert_Text_to_Music.ipynb by installing mubert-sdk, properly initializing the client, and adding SOTA context.

Reviewed Changes

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

File Description
scalable_gp_gpytorch_tutorial.ipynb New SVGP tutorial covering data generation, model, training, and plotting
gp/Simple_GP_Regression_with_losses.ipynb Expanded pip install command and cleared execution outputs
Generative_models/Mubert_Text_to_Music.ipynb Improved SDK install, PAT handling, placeholder logic, and added SOTA links
Comments suppressed due to low confidence (3)

scalable_gp_gpytorch_tutorial.ipynb:87

  • NumPy is never imported in this cell, so np.random.seed(42) will raise a NameError. Add import numpy as np at the top of the setup cell.
np.random.seed(42)

Generative_models/Mubert_Text_to_Music.ipynb:71

  • Catching NameError won't handle a missing SDK import (it raises ImportError/ModuleNotFoundError). Use except ImportError: or catch ModuleNotFoundError instead.
except NameError: # Mubert might not be defined if import failed due to not being installed

Generative_models/Mubert_Text_to_Music.ipynb:56

  • [nitpick] The PlaceholderMubert class is defined multiple times in different branches. Consider extracting it once and reusing to reduce duplication.
class PlaceholderMubert:

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.

1 participant