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

Pipeline Editor: Allow for configuration of shared memory size #2942

Merged
merged 42 commits into from
Oct 18, 2022

Conversation

ptitzler
Copy link
Member

@ptitzler ptitzler commented Sep 28, 2022

Requires #2957 RESOLVED

Extend the pipeline editor to allow for setting a custom shared memory size in generic and custom components. A pipeline default can be configured in the pipeline properties. Support is limited to Kubeflow Pipelines and Apache Airflow.

image

To define a custom size the user needs to specify a value other than zero. Zero implies that the Kubernetes default is used, which is 64Mi.

image

When a custom shared memory size is configured, Elyra adds a volume and volume mount to the pod, as shown here for Kubeflow Pipelines:

    volumeMounts:
     - {mountPath: /dev/shm, name: shm}
    volumes:
    - emptyDir: {medium: Memory, sizeLimit: 2G}
      name: shm

Closes #2838

TODO:

  • pipeline editor release and merge

What changes were proposed in this pull request?

  • See above
  • Add new property description to pipeline documentation

How was this pull request tested?

  • Added validation tests (for valid and invalid inputs)
  • Updated handlers test

pipeline defaults:

  • no custom size specified
  • invalid custom size specified
  • valid size specified

generic nodes (KFP and Airflow):

  • no custom size specified and no pipeline default defined
  • invalid custom size specified
  • valid size specified

custom nodes (KFP and Airflow):

  • no custom size specified and no pipeline default defined
  • invalid custom size specified
  • valid size specified

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@ptitzler ptitzler added kind:enhancement New feature or request component:pipeline-editor pipeline editor platform: pipeline-Kubeflow Related to usage of Kubeflow Pipelines as pipeline runtime labels Sep 28, 2022
@ptitzler ptitzler added this to the 3.12.0 milestone Sep 28, 2022
@elyra-bot
Copy link

elyra-bot bot commented Sep 28, 2022

Thanks for making a pull request to Elyra!

To try out this branch on binder, follow this link: Binder

@ptitzler ptitzler marked this pull request as draft September 28, 2022 05:48
@@ -40,6 +40,7 @@
from elyra.metadata.manager import MetadataManager
from elyra.pipeline.component import Component
from elyra.pipeline.component_catalog import ComponentCache
from elyra.pipeline.component_parameter import CustomSharedMemorySize

Check notice

Code scanning / CodeQL

Cyclic import

Import of module [elyra.pipeline.component_parameter](1) begins an import cycle.
@ptitzler ptitzler marked this pull request as ready for review September 28, 2022 12:24
@marthacryan marthacryan added the impact:requires-pipeline-editor-release PR is dependent on a pipeline editor release that needs to be published first. label Sep 28, 2022
@marthacryan

This comment was marked as outdated.

@ptitzler

This comment was marked as outdated.

@ptitzler ptitzler removed the platform: pipeline-Kubeflow Related to usage of Kubeflow Pipelines as pipeline runtime label Sep 29, 2022
@ptitzler
Copy link
Member Author

In today's community meeting it was brought up that giving the user the option to choose from multiple units might be complicating things. While I agree that it might not be necessary to support Gi/Mi and G/M by choosing a basis that is applied to all memory units in Elyra, there would benefits to giving the user the option to choose a unit (e.g GB/MB ignoring for now what basis is used) if the units are supposed to be internally interpreted using power of two instead of power of ten.

It's not clear to me which basis is used today for the generic components RAM resources setting. The implementation for the KFP and Airflow processor appear to be in disagreement, with the KFP processor applying the G (power of ten-based) suffix, whereas the Airflow processor applying none (which may or may not be a bug). Anybody have insights whether G or Gi is the "correct" one?

@ptitzler ptitzler added impact:requires-pipeline-editor-release PR is dependent on a pipeline editor release that needs to be published first. and removed status:Work in Progress Development in progress. A PR tagged with this label is not review ready unless stated otherwise. impact:requires-pipeline-editor-release PR is dependent on a pipeline editor release that needs to be published first. labels Oct 11, 2022
@ptitzler
Copy link
Member Author

Follow-up required: When I merged the main branch into this PR branch I overrode the pipeline editor dependency because I believed the necessary changes were already included already included the the most recent pipeline editor release. I'm not sure if this assumption is true. @marthacryan is elyra-ai/pipeline-editor#202 specific to this PR?

@ptitzler

This comment was marked as resolved.

@marthacryan marthacryan force-pushed the add-shared-mem-configuration-support branch from b91060f to d9b0b25 Compare October 13, 2022 21:42
docs/source/user_guide/pipelines.md Outdated Show resolved Hide resolved
elyra/pipeline/airflow/processor_airflow.py Outdated Show resolved Hide resolved
elyra/pipeline/airflow/processor_airflow.py Show resolved Hide resolved
elyra/pipeline/component_parameter.py Outdated Show resolved Hide resolved
elyra/pipeline/kfp/processor_kfp.py Outdated Show resolved Hide resolved
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akchinSTC akchinSTC merged commit 4f78ac4 into elyra-ai:main Oct 18, 2022
@ptitzler ptitzler deleted the add-shared-mem-configuration-support branch October 19, 2022 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:pipeline-editor pipeline editor impact:requires-pipeline-editor-release PR is dependent on a pipeline editor release that needs to be published first. kind:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable user to provision shared memory for pipeline node
5 participants