Skip to content
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

Cannot use resource request based on PipelineParam #1956

Closed
gabrielvcbessa opened this issue Aug 26, 2019 · 21 comments
Closed

Cannot use resource request based on PipelineParam #1956

gabrielvcbessa opened this issue Aug 26, 2019 · 21 comments
Assignees
Labels
help wanted The community is welcome to contribute. kind/feature

Comments

@gabrielvcbessa
Copy link

We are trying to build a generic pipeline that will have some steps with configurable resources. This is needed because based on what is being run it might need more or less cpu, memory and etc.

Consider the pipeline described bellow:

@dsl.pipeline(
    name='Generic Pipe'
)
def pipeline_definition(memory_request: str = '8G', cpu_request: str = '4'):
    op = ContainerOp(...)

    op.set_memory_request(memory_request)\
      .set_cpu_request(cpu_request)

This pipeline will fail to match the expected resource Regex and would not be successfully uploaded. This is what would be generated on the yaml file:

 resources:
    requests:
        cpu: '{{inputs.parameters.cpu-request}}'
        memory: '{{inputs.parameters.memory-request}}'

And here is the error:

kfp_server_api.rest.ApiException: (500)
Reason: Internal Server Error
HTTP response headers: HTTPHeaderDict({'Server': 'nginx/1.15.6', 'Date': 'Mon, 26 Aug 2019 21:46:03 GMT', 'Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '601', 'Connection': 'keep-alive', 'x-powered-by': 'Express', 'x-envoy-upstream-service-time': '55'})
HTTP response body: {"error_message":"Error creating pipeline: Create pipeline failed: Failed to get parameters from the workflow: InvalidInputError: Failed to parse the parameter.: error unmarshaling JSON: while decoding JSON: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'","error_details":"Error creating pipeline: Create pipeline failed: Failed to get parameters from the workflow: InvalidInputError: Failed to parse the parameter.: error unmarshaling JSON: while decoding JSON: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'"}
@gabrielvcbessa
Copy link
Author

@IronPan Do you have any idea of how to solve this?

@elikatsis
Copy link
Member

Hello,

This issue is related to argoproj/argo-workflows#703 and it is not fixed yet.

@kierenj
Copy link

kierenj commented Oct 20, 2019

It looks like argoproj/argo-workflows#1687 might fix this. I'm very new to kubeflow - can anyone explain the workaround in argoproj/argo-workflows#703 - is it available to kubeflow-land?

@rmgogogo
Copy link
Contributor

@Ark-kun, any suggested workaround?

@Ark-kun
Copy link
Contributor

Ark-kun commented Apr 15, 2020

This is a problem with trying to use templates in structures with strict schemas. @numerology had the same issue when trying to template protobufs.

The addition pf PatchPodSpec argoproj/argo-workflows#1687 in Argo v2.4.2 makes it possible to fix this, although this will require some amount of work on the SDK side, upgrade to Argo v2.4.2. It will also be backwards incompatible with existing KFP backends (since older versions of Argo do not support the feature).

@Ark-kun Ark-kun self-assigned this Apr 15, 2020
@jackwhelpton
Copy link
Contributor

I'm getting blocked by this too. We're also trying to configure GPU dynamically, but that's running into problems because add_node_selector_constraint can't take PipelineParams: I was hoping I could use a previous parse step to build the node selector and then apply it using parse_task.outputs.

Would that be covered by this ticket, or need a new one, or is there a workaround I'm missing?

@stale
Copy link

stale bot commented Jul 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the lifecycle/stale The issue / pull request is stale, any activities remove this label. label Jul 16, 2020
@stale
Copy link

stale bot commented Jul 23, 2020

This issue has been automatically closed because it has not had recent activity. Please comment "/reopen" to reopen it.

@stale stale bot closed this as completed Jul 23, 2020
@jackwhelpton
Copy link
Contributor

/reopen

This would still be a useful feature to have.

@k8s-ci-robot
Copy link
Contributor

@jackwhelpton: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

This would still be a useful feature to have.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Bobgy
Copy link
Contributor

Bobgy commented Jul 24, 2020

/reopen
for @jackwhelpton

@k8s-ci-robot
Copy link
Contributor

@Bobgy: Reopened this issue.

In response to this:

/reopen
for @jackwhelpton

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot reopened this Jul 24, 2020
@stale stale bot removed the lifecycle/stale The issue / pull request is stale, any activities remove this label. label Jul 24, 2020
@stale
Copy link

stale bot commented Oct 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the lifecycle/stale The issue / pull request is stale, any activities remove this label. label Oct 22, 2020
@mnoble-vody
Copy link

Argo was upgraded to 2.7.5 in #3537 so now Argo's pod spec patching (argoproj/argo-workflows#1687) is available to implement a fix in the Pipelines SDK.

@stale stale bot removed the lifecycle/stale The issue / pull request is stale, any activities remove this label. label Oct 22, 2020
@Bobgy
Copy link
Contributor

Bobgy commented Nov 12, 2020

/assign @chensun
FYI, this is the top open issue with the most thumb ups

@chensun chensun added the help wanted The community is welcome to contribute. label Nov 12, 2020
@numerology
Copy link

@chensun

I don't think this will be super complicated to fix. I guess it's currently blocked by this allowlist here. We can take a look when we have some cycle.

@NikeNano
Copy link
Member

NikeNano commented Apr 4, 2021

/assign

@NikeNano
Copy link
Member

NikeNano commented Apr 4, 2021

I will take a look at this.

@Bobgy

This comment has been minimized.

@NikeNano
Copy link
Member

NikeNano commented Apr 4, 2021

Is #5239 a better alternative now?

I don't fully follow how the additions of K8s create/apply components would allow the user to specify the resource specs as input parameters to a pipeline? Could you elaborate @Bobgy?

@Bobgy
Copy link
Contributor

Bobgy commented Apr 6, 2021

Sorry, I misread the issue's description. Please ignore my comment above

jagadeeshi2i pushed a commit to chauhang/pipelines that referenced this issue Jun 12, 2021
…ow#5447)

* added resource request at runtime

* fixed things

* Update to use read only parameter insteadt

* added test case and better example

* Updated again

* add the validation

* add to the test suit

* work in progress

* update after feedback

* fix the test

* clean up

* clean up

* fix the path

* add the test again

* clean up

* fix tests

* feedback fix

* comment out and clean up
magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this issue Oct 22, 2023
* rename framework struct
SupportedModelTypes -> SupportedModelFormats
ServingRuntimeFramework -> SupportedModelFormat
Framework -> ModelFormat

Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>

* added openapi-gen marker for servingruntime structs

Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>

* updated openapigen and swagger for servingruntime

Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>

* update supportedmodelformat in runtime yaml files

Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The community is welcome to contribute. kind/feature
Projects
None yet
Development

No branches or pull requests