fix: remove unused "label" in Update utils.py#38
Open
moshderte wants to merge 1 commit intosentient-agi:mainfrom
Open
fix: remove unused "label" in Update utils.py#38moshderte wants to merge 1 commit intosentient-agi:mainfrom
moshderte wants to merge 1 commit intosentient-agi:mainfrom
Conversation
This pull request removes the __label__ key from the score_dict used in the predict_educational_value function. The key was unnecessary and never used in practice, as FastText predictions always return labels with specific suffixes such as __label__Low, __label__Mid, or __label__High. Changes: Removed the __label__ entry from score_dict. Ensured that only valid FastText label keys are included (__label__Low, __label__Mid, __label__High). Rationale: FastText uses the __label__ prefix for classification, but the base __label__ (without a class name) is not a valid or returned label. Keeping it in the dictionary introduces unnecessary noise and may confuse future maintainers. This change is backward-compatible and improves code clarity. No functional behavior is altered, as the removed key was never referenced.
Author
|
@sammcj check pls |
Contributor
|
@moshderte I'm not sure what you've @'d me on this repo sorry? |
Author
|
@sammcj sorry I was wrong |
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.
This pull request removes the label key from the score_dict used in the predict_educational_value function. The key was unnecessary and never used in practice, as FastText predictions always return labels with specific suffixes such as __label__Low, __label__Mid, or __label__High.
Changes:
Removed the label entry from score_dict.
Ensured that only valid FastText label keys are included (__label__Low, __label__Mid, __label__High).
Rationale:
FastText uses the label prefix for classification, but the base label (without a class name) is not a valid or returned label.
Keeping it in the dictionary introduces unnecessary noise and may confuse future maintainers.
This change is backward-compatible and improves code clarity. No functional behavior is altered, as the removed key was never referenced.