Skip to content

fix: remove unused json_tensors dead variable in convert_to_model_input()#259

Open
teyrebaz33 wants to merge 1 commit intoOpenGradient:mainfrom
teyrebaz33:fix/remove-dead-json-tensors-variable
Open

fix: remove unused json_tensors dead variable in convert_to_model_input()#259
teyrebaz33 wants to merge 1 commit intoOpenGradient:mainfrom
teyrebaz33:fix/remove-dead-json-tensors-variable

Conversation

@teyrebaz33
Copy link
Copy Markdown

Summary

Fixes #250

Problem

convert_to_model_input() in _conversions.py initialized json_tensors = [] but never populated it or included it in the return value. This is dead code that creates a silent data loss trap — if someone adds JSON tensor support to the collection loop in the future without fixing the return statement, JSON inputs will silently disappear.

Fix

Removed the unused json_tensors variable entirely. If JSON tensor support is added in the future, it should be introduced together with the collection logic, return statement update, and caller updates in the same PR.

Changes

  • src/opengradient/client/_conversions.py: Removed dead json_tensors = [] variable

…ut()

Fixes OpenGradient#250

json_tensors was initialized but never populated or returned,
creating a silent data loss trap for future JSON tensor support.
Removed the dead variable to keep the code clean and explicit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

convert_to_model_input() builds json_tensors list but never includes it in the return value (dead data, silent data loss)

2 participants