Conversation
Reviewer's GuideThis PR updates the training documentation by extending and rebalancing the schedule (now 8 hours), adds a breakdown of proficiency levels, and augments the profiling examples with a new microbenchmarking notebook. 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 - here's some feedback:
- The new schedule table sums to 430 minutes (~7 h10) but you’ve set the total duration to 8 h—either adjust the total or reinstate a break to match the sum.
- There’s a typo in the Level section: “Intermeidate” should be “Intermediate.”
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new schedule table sums to 430 minutes (~7 h10) but you’ve set the total duration to 8 h—either adjust the total or reinstate a break to match the sum.
- There’s a typo in the Level section: “Intermeidate” should be “Intermediate.”
## Individual Comments
### Comment 1
<location> `source-code/profiling/microbenchmarking.ipynb:151` </location>
<code_context>
+ "source": [
+ "In fact, you can use similar functionality to time your code in Python scripts, so the use of `timeit` is not restricted to notebooks.\n",
+ "\n",
+ "The function `timeit.repeat(...)` is the most similar to the magic, but it has an additional feature. It has an optional `setup` parameter. This is a string or a callable that will be executed before each repeat, but its execution time is not taking into account for the benchmakr."
+ ]
+ },
</code_context>
<issue_to_address>
Typo in 'benchmakr', should be 'benchmark'.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
"The function `timeit.repeat(...)` is the most similar to the magic, but it has an additional feature. It has an optional `setup` parameter. This is a string or a callable that will be executed before each repeat, but its execution time is not taking into account for the benchmakr."
=======
"The function `timeit.repeat(...)` is the most similar to the magic, but it has an additional feature. It has an optional `setup` parameter. This is a string or a callable that will be executed before each repeat, but its execution time is not taking into account for the benchmark."
>>>>>>> REPLACE
</suggested_fix>
### Comment 2
<location> `source-code/profiling/microbenchmarking.ipynb:343` </location>
<code_context>
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "def square_matrix(A):\n",
+ " A **= 2"
+ ]
+ },
</code_context>
<issue_to_address>
Potential ambiguity in in-place operation for square_matrix.
`A **= 2` may not perform in-place modification for all numpy dtypes, especially with integer arrays that upcast. Use `np.square(A, out=A)` for consistent in-place behavior.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
"def square_matrix(A):\n",
" A **= 2"
=======
"def square_matrix(A):\n",
" import numpy as np\n",
" np.square(A, out=A)"
>>>>>>> REPLACE
</suggested_fix>
### Comment 3
<location> `docs/README.md:71` </location>
<code_context>
+## Level
+
+* Introductory: 10 %
+* Intermeidate: 30 %
+* Advanced: 60 %
+
</code_context>
<issue_to_address>
Typo: 'Intermeidate' should be 'Intermediate'.
Update the Level section to use the correct spelling.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
* Introductory: 10 %
* Intermeidate: 30 %
* Advanced: 60 %
=======
* Introductory: 10 %
* Intermediate: 30 %
* Advanced: 60 %
>>>>>>> REPLACE
</suggested_fix>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| "source": [ | ||
| "In fact, you can use similar functionality to time your code in Python scripts, so the use of `timeit` is not restricted to notebooks.\n", | ||
| "\n", | ||
| "The function `timeit.repeat(...)` is the most similar to the magic, but it has an additional feature. It has an optional `setup` parameter. This is a string or a callable that will be executed before each repeat, but its execution time is not taking into account for the benchmakr." |
There was a problem hiding this comment.
issue (typo): Typo in 'benchmakr', should be 'benchmark'.
| "The function `timeit.repeat(...)` is the most similar to the magic, but it has an additional feature. It has an optional `setup` parameter. This is a string or a callable that will be executed before each repeat, but its execution time is not taking into account for the benchmakr." | |
| "The function `timeit.repeat(...)` is the most similar to the magic, but it has an additional feature. It has an optional `setup` parameter. This is a string or a callable that will be executed before each repeat, but its execution time is not taking into account for the benchmark." |
| "def square_matrix(A):\n", | ||
| " A **= 2" |
There was a problem hiding this comment.
suggestion (bug_risk): Potential ambiguity in in-place operation for square_matrix.
A **= 2 may not perform in-place modification for all numpy dtypes, especially with integer arrays that upcast. Use np.square(A, out=A) for consistent in-place behavior.
| "def square_matrix(A):\n", | |
| " A **= 2" | |
| "def square_matrix(A):\n", | |
| " import numpy as np\n", | |
| " np.square(A, out=A)" |
| * Introductory: 10 % | ||
| * Intermeidate: 30 % | ||
| * Advanced: 60 % |
There was a problem hiding this comment.
issue (typo): Typo: 'Intermeidate' should be 'Intermediate'.
Update the Level section to use the correct spelling.
| * Introductory: 10 % | |
| * Intermeidate: 30 % | |
| * Advanced: 60 % | |
| * Introductory: 10 % | |
| * Intermediate: 30 % | |
| * Advanced: 60 % |
Summary by Sourcery
Revise the training documentation to extend the total duration and adjust session timings, add a breakdown of difficulty levels, and include a new microbenchmarking notebook in the profiling materials.
Enhancements:
Documentation: