Skip to content

[3/X][Pipeline] Handle deployment handle replacement in DeploymentNode init args, support nested#22646

Merged
edoakes merged 15 commits intoray-project:masterfrom
jiaodong:_X_Pipeline_nested_deployment_handle_rep
Feb 26, 2022
Merged

[3/X][Pipeline] Handle deployment handle replacement in DeploymentNode init args, support nested#22646
edoakes merged 15 commits intoray-project:masterfrom
jiaodong:_X_Pipeline_nested_deployment_handle_rep

Conversation

@jiaodong
Copy link
Copy Markdown
Member

@jiaodong jiaodong commented Feb 25, 2022

Changes

  • Moved all Deployment instance creation to DeploymentNode level with only relevant info passed into it from generate.py. This abstraction makes more sense and less leaky.
  • In DeploymentNode, we leverage ray core DAG's _PyObjScanner to find and replace only Deployment nodes init args & kwargs to deployment handle, which is only specific to Deployment instance, but not DeploymentNode itself. However this is the simplest and most robust way to handle nested args at DAGNode level.
    • This implementation lives in ray core DAGNode level so we don't need to expose _PyObjScanner directly.
  • Added serve pipeline tests to BUILD CI.

Next steps

  • JSON serialization
  • Build()
  • InputNode -> HTTP with ModelWrapper
  • InputNode enhancement to take arbitrary inputs, not just first value in arg
  • Remote import path

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@jiaodong jiaodong changed the title [3/X] Handle deployment handle replacement in DeploymentNode init args, support nested [3/X][Pipeline] Handle deployment handle replacement in DeploymentNode init args, support nested Feb 25, 2022
@jiaodong jiaodong requested review from edoakes and ericl February 25, 2022 01:39
@jiaodong jiaodong marked this pull request as ready for review February 25, 2022 01:39
@edoakes edoakes added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Feb 25, 2022
@jiaodong jiaodong added tests-ok The tagger certifies test failures are unrelated and assumes personal liability. and removed @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. labels Feb 26, 2022
@jiaodong jiaodong removed the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Feb 26, 2022
@jiaodong jiaodong added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Feb 26, 2022
@jiaodong jiaodong requested a review from edoakes February 26, 2022 06:30
Copy link
Copy Markdown
Collaborator

@edoakes edoakes left a comment

Choose a reason for hiding this comment

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

One nit, please address in follow up

)
)

def _apply_functional(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

shouldn't be prefixed with _ if public method

@edoakes edoakes merged commit 25d60d9 into ray-project:master Feb 26, 2022
simonsays1980 pushed a commit to simonsays1980/ray that referenced this pull request Feb 27, 2022
…e init args, support nested (ray-project#22646)

- Moved all `Deployment` instance creation to `DeploymentNode` level with only relevant info passed into it from `generate.py`. This abstraction makes more sense and less leaky.
- In `DeploymentNode`, we leverage ray core DAG's `_PyObjScanner` to find and replace only Deployment nodes init args & kwargs to deployment handle, which is only specific to `Deployment` instance, but not `DeploymentNode` itself. However this is the simplest and most robust way to handle nested args at `DAGNode` level.
  - This implementation lives in ray core DAGNode level so we don't need to expose  `_PyObjScanner` directly.
- Added serve pipeline tests to BUILD CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests-ok The tagger certifies test failures are unrelated and assumes personal liability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants