-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runner IO: Annotating any Input fails #1238
Comments
Hey @sam2x! I'm unsure if there's a misunderstanding of the feature, or you want to do something different, if you could help clarify! 🙏 When you use Therefore my_input: Annotated[MyInput, Parameter(name="my-input")], doesn't really make sense - you want an input parameter called If you want to use metadata in my_input: Annotated[MyInput, "some metadata"], From your description
I'm not sure what you mean by "annotate information"? Are the parameters different? Or are the defaults different for each function but using the same parameters? etc... Please let me know so I can try to help! 🚀 |
Hello @elliotgunton, thanks for your answer.
You are right, I tried in despair different approach, but the reuse of "Parameter" inside an Input was the worst example.
That's exactly the issue, the sample won't work even with your example, the hera "signature" parser doesn't seems to detect MyInput when it is specified in this way. Based on your statement, and updating my bug sample, if you try to change from this working definition:
To this:
This would raise the following exception on my side:
Hope i didn't misinterpret your explanation, and my comment is relevant to you. |
That's perfect, thank you! All clear from my side, that is indeed a bug/feature we need to fix/add 🚀 |
A bit more hints for the one handling the issue. The bug is located in "_map_argo_inputs_to_function".
Need something similar to unwrap/check via "get_origin" check first (first 3 lines of my code below) and InputV1/InputV2 issubclass check against annotation (last 2 lines):
I haven't the right env to properly patch/check for break and test (not sure also if it's interoperable with previous version), but seems to be isolated to this function. Hope this help tough the dev. |
Hey again, I have been digging a bit in the source code. I may have make a mistake on the origin of the issue. This may also come from: I would appreciate your feedback at this discussion, those topics seems to be directly link to the same function : Let me know how I can help also. |
Pre-bug-report checklist
1. This bug can be reproduced using pure Argo YAML
2. I have searched for existing issues
3. This bug occurs in Hera when...
Bug report
Describe the bug
Hello, I have an issue with IO function parameter using Runner constructor that fail when I annotate Input/Ouput object.
I spotted it with my code, and then reproduced it with a simple example. I need this approach cause:
This works:
This doesnt works:
_Error log:
To Reproduce
Expected behavior
Being somehow able to annotate Input/Output object-based in my function definition. Or any alternative.
Environment
The text was updated successfully, but these errors were encountered: