Conversation
Reviewer's GuideThis PR overhauls the project setup by massively expanding the Conda environment with dozens of new dependencies (including Jupyter, GPU and ML libraries), refines high-level documentation with a course-level breakdown, and integrates a new Optuna-based hyperparameter-optimization example (with accompanying README and simple.py script). Class diagram for the new Optuna example (simple.py)classDiagram
class objective {
+objective(trial)
}
class optuna {
+create_study(direction)
+Trial
+Study
}
class Study {
+optimize(objective, n_trials)
+best_trial
}
class Trial {
+suggest_float(name, low, high)
+value
+params
}
optuna --|> Study
optuna --|> Trial
Study o-- Trial
objective ..> Trial : uses
Study ..> objective : calls
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Hey @gjbex - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `environment.yml:246` </location>
<code_context>
+ - libglvnd
+ - argon2-cffi
+ - graphite2
+ - python
+ - cuda-cupti
+ - xcb-util-cursor
</code_context>
<issue_to_address>
Python version is not specified.
Pin the Python version (e.g., 'python=3.10') to ensure reproducible environments.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
- python
=======
- python=3.10
>>>>>>> REPLACE
</suggested_fix>
### Comment 2
<location> `source-code/curse_of_dimensionality.ipynb:200` </location>
<code_context>
+ "outputs": [],
+ "source": [
+ "def generate_vectors(nr_vectors, nr_dims, max_value=1.0, normalize=True):\n",
+ " vectors = np.random.uniform(-max_value, max_value, (nr_vectors, nr_dims))\n",
+ " if normalize:\n",
+ " vectors /= np.linalg.norm(vectors, axis=1)[:, None]\n",
</code_context>
<issue_to_address>
Clarify the intent of the max_value parameter.
Since the vectors are normalized, the initial max_value may not affect the final distribution. If uniform sampling on the hypersphere is desired, consider using a standard normal distribution before normalization, as this yields a uniform distribution on the sphere.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| - libglvnd | ||
| - argon2-cffi | ||
| - graphite2 | ||
| - python |
There was a problem hiding this comment.
suggestion: Python version is not specified.
Pin the Python version (e.g., 'python=3.10') to ensure reproducible environments.
| - python | |
| - python=3.10 |
| "outputs": [], | ||
| "source": [ | ||
| "def generate_vectors(nr_vectors, nr_dims, max_value=1.0, normalize=True):\n", | ||
| " vectors = np.random.uniform(-max_value, max_value, (nr_vectors, nr_dims))\n", |
There was a problem hiding this comment.
question: Clarify the intent of the max_value parameter.
Since the vectors are normalized, the initial max_value may not affect the final distribution. If uniform sampling on the hypersphere is desired, consider using a standard normal distribution before normalization, as this yields a uniform distribution on the sphere.
Summary by Sourcery
Update the project’s environment configuration, add Optuna-based hyperparameter optimization examples and related documentation, and introduce a course difficulty level breakdown in the docs.
New Features:
Enhancements:
Documentation: