Repository navigation
Docs: style pass over the user guide and tutorial; fix two broken snippets - #92
Conversation
…n snippets Language: apply the formal, declarative register of the paper writing to the pages added in the docs overhaul -- no casual/journalistic phrasing, no anthropomorphism: - 'walks through the package the way you would use it' -> 'follows the typical usage flow'; 'lifted from' -> 'taken from'; 'five-minute tour' -> 'short introduction'; 'live in' -> 'are provided in' - 'The trainer in one paragraph' -> 'Overview'; 'owns the training loop' -> 'implements'; 'you define what is trained' -> 'the subclass defines'; 'What you get for free' -> 'Provided by the base class'; 'your inference loop'/'in your DataLoaders' -> definite article - 'ship with' -> 'are provided with'/'provides' (x3); 'scalar predictions' -> 'predicted probabilities'; 'double as' -> 'also serve as'; 'Highlights to look for' -> 'Points to note' - garbled 'the number of classes/leads-out' -> 'the class list and the number of leads' Correctness (found by executing the snippets; they had never been run): - tutorial and user_guide/models used 'ECG_CRNN_CONFIG.copy()' / 'LUDBTrainCfg.copy()' -- dict.copy() on a CFG returns a plain dict, so the very next attribute assignment raises AttributeError (the pitfall the concepts page documents); both now use copy.deepcopy - 'ECG_CRNN(config, n_leads=12, n_classes=26)' -- wrong signature; the constructor is ECG_CRNN(classes, n_leads, config) - 'config.cnn.name = "resnet_block_leadwise"' -- no such block key; replaced with 'resnet_nature_comm_bottle_neck_se' - 'compute_output_shape(bs=2, input_len=4000)' -- wrong keyword names; the signature is compute_output_shape(seq_len, batch_size), verified to return (2, n_classes) All corrected snippets executed against the package before writing them down.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #92 +/- ##
==========================================
- Coverage 93.47% 92.76% -0.71%
==========================================
Files 138 138
Lines 18628 18628
==========================================
- Hits 17412 17280 -132
- Misses 1216 1348 +132
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
No need to make these changes a PR? |
Why
Companion to the concepts-page style pass (PR #90). Standard: formal, declarative academic register (paper writing), no casual/journalistic phrasing, no anthropomorphism, no machine-translation patterns.
Language fixes
Correctness fixes (found by executing the snippets)
The tutorial and user_guide/models snippets had never been run:
ECG_CRNN_CONFIG.copy()/LUDBTrainCfg.copy():dict.copy()on a CFG returns a plain dict, so the next attribute assignment raisesAttributeError(exactly the pitfall the new concepts page documents). Both now usecopy.deepcopy.ECG_CRNN(config, n_leads=12, n_classes=26): wrong signature; the constructor isECG_CRNN(classes, n_leads, config).config.cnn.name = "resnet_block_leadwise": no such block key in the config; replaced withresnet_nature_comm_bottle_neck_se.compute_output_shape(bs=2, input_len=4000): wrong keyword names; the signature iscompute_output_shape(seq_len, batch_size), verified to return(2, n_classes).All corrected snippets were executed before being written down.
Verification
--no-verify(branch is off master, which does not carry the pre-commit python3.11 pin from Docs: add Concepts section (config system, representations, model assembly, trainer internals) #90); pre-commit.ci will confirm