Skip to content

Conversation

@allrob23
Copy link

@allrob23 allrob23 commented Apr 7, 2025

Description

This PR simplifies the code by removing unnecessary list() calls around .keys() in the _validate_input method calls. The dict_keys views are already iterable and support membership testing, so converting them to a list and then searching within that list in the function is not needed. This change makes the code cleaner and provides a small optimization by avoiding the list conversion.

Changes:

  • Updated three calls to _validate_input to pass input_feed.keys() and input_dict_ort_values.keys() directly instead of wrapping them with list().

Motivation and Context

This cleans up the code and avoids an extra step that doesn’t add value. It’s a small improvement, not tied to fixing a specific issue, just making the code simpler and slightly more efficient.

No open issues are linked—this is just a minor cleanup.

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.

1 participant