Open thomasjpfan opened 1 week ago
The kwtypes
function is used to convert keyword arguments into an OrderedDict
, which is necessary for certain Flyte APIs. However, since Python 3.7, the standard dict
maintains insertion order, making OrderedDict
less critical for most use cases (source).
Would you like more detail on how kwtypes
is currently used and potential alternatives?
Sources:
This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.
Mention @runllm to ask follow-up questions. See runllm.com for more!
Describe the issue
Currently,
kwtypes
is in user code to convert dicts intoOrderedDict
. I think this creates another abstraction for users. For APIs, that requires a OrderedDict, they can create it themselves based on the user input.Even for APIs that require a
OrderedDict
, since Python 3.7 the normal dict is required to keep insertion order, so it implicitly behaves like anOrderedDict
. https://mail.python.org/pipermail/python-dev/2017-December/151283.htmlWhat if we do not do this?
Then users will need to learn about
kwtypes
and when to use it.Related component(s)
flytekit
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?