Skip to content

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

Merged
adambalogh merged 1 commit intoOpenGradient:mainfrom
teyrebaz33:fix/remove-dead-json-tensors-variable
Apr 16, 2026
Merged

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

Conversation

@teyrebaz33
Copy link
Copy Markdown
Contributor

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.
@adambalogh adambalogh merged commit c3bbba1 into OpenGradient:main Apr 16, 2026
6 checks passed
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)

3 participants