Fix IndentationError in worked example and stratify reference in Lab 8.2#34
Open
Yassir-249 wants to merge 1 commit into
Open
Conversation
53060ce to
b1f7f49
Compare
Author
|
Rebased onto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two bugs plus typos in
course_8/gdm_lab_8_2_classification_part_1.ipynb.Activity 4 worked example raises
IndentationErrorwhen copied verbatim. In the "Worked example: Format the data" cell, theto_instruction_recorddocstring is indented 3 spaces while the function body is indented 4. Copying the template into the implementation cell (as the activity instructs) fails withIndentationError: unexpected indent. Re-indenting the docstring to 4 spaces lets the cell run and write the three JSONL splits.Activity 3 task box stratifies on the wrong DataFrame. The alternative stratified-split snippet passes
stratify=df['category']when splittingdf_val_test, which raisesValueError(inconsistent sample counts). Changed tostratify=df_val_test['category'], matching the worked example below it.Typos:
Disccover,excuted,funcion,processs,captstone, and a stray leading space on a code fence.Ran the worked-example pipeline end-to-end to confirm the fixes.