-
Notifications
You must be signed in to change notification settings - Fork 107
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
RunnerInput: Got 400 from Argo, a value was not supplied in the parameter #961
Comments
Hi @sam2x - thank you for the feedback on this new feature! I will answer your questions numbered 1-4:
class MyDefaultInput (RunnerInput):
stdout: Annotated[Path, Parameter(global_name="stdout", name="stdout", output=True)] = Path("/tmp/stdout.txt")
|
Hello @elliotgunton, thank you for the quick reply. I start to get more visibility on this.
Following my exploration, It seems that the RunnerInput documentation sample is not working out-the-box. I used the documentation example: class MyInput(RunnerInput):
param_int: Annotated[int, Parameter(name="param-input")] = 42
an_object: Annotated[MyObject, Parameter(name="obj-input")] = MyObject(
a_dict={"my-key": "a-value"}, a_str="hello world!"
)
artifact_int: Annotated[int, Artifact(name="artifact-input", loader=ArtifactLoader.json)]
class MyOutput(RunnerOutput):
param_int: Annotated[int, Parameter(name="param-output")]
artifact_int: Annotated[int, Artifact(name="artifact-output")]
@script(constructor="runner")
def pydantic_io(
my_input: MyInput,
) -> MyOutput:
return MyOutput(exit_code=1, result="Test!", param_int=42, artifact_int=my_input.param_int) And in my workflow I tried several way to submit the pydantic_io :
Thank you |
4 tasks
4 tasks
elliotgunton
added a commit
that referenced
this issue
Mar 4, 2024
* Script user guide was too long, split into main features. Fix internal links * Make pydantic io example into a runnable workflow - made it more obvious the scripts would need a custom image **Pull Request Checklist** - [x] Fixes #961 (fixes example) - [ ] Tests added - [x] Documentation/examples added - [x] [Good commit messages](https://cbea.ms/git-commit/) and/or PR title **Description of PR** Currently, the pydantic IO example does not work. Combined with fixes in PRs #974 and #977, this doc change shows how to use the Runner IO features. --------- Signed-off-by: Elliot Gunton <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Thank you for this framework. I am facing an issue using "RunnerInput" with typical inputs i would like to structure.
Issue
The code is as below:
I would like to use the statement below mentioned in the documentation:
I want to use annotation feature so I don't have to duplicate the declaration. In my context, the goal is to use a variable referenced in "inputs" (as parameter, so without having to create a "temporary" file), fill the content during execution, record it as artefact, and after the exit to be available to others tasks (as well as others output).
Additional information
I am using latest version, I have embedeed the python lib to be run on the image. All works fine for this side. However for the declaration, I am not sure what i am doing wrong here.
Notes :
Thank you for any helps/pointers.
The text was updated successfully, but these errors were encountered: