Skip to content

[serve] Implement serve.build - #23232

Merged
edoakes merged 122 commits into
ray-project:masterfrom
edoakes:build_serve
Mar 25, 2022
Merged

edoakes merged 122 commits into
ray-project:masterfrom
edoakes:build_serve

Conversation

@edoakes

@edoakes edoakes commented Mar 16, 2022 •

Copy link
Copy Markdown
Collaborator

Why are these changes needed?

The Serve REST API relies on YAML config files to specify and deploy deployments. This change introduces serve.build() and serve build, which translate Pipelines to YAML files.

Related issue number

Closes #23137, closes #23138, and closes #23139.

Checks

Comment thread python/ray/serve/scripts.py Resolved
Comment thread python/ray/serve/api.py Resolved
Comment thread python/ray/serve/scripts.py Resolved
Comment thread python/ray/serve/scripts.py Resolved
Comment thread python/ray/serve/api.py Outdated

parameter_group.append(deployment_parameters)

internal_get_global_client().deploy_group(parameter_group, _blocking=blocking)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

does deploy_group return a RayServeHandle as func signature says ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, not it doesn't. However, it also doesn't look like anything is using the public deploy_group, so I'll remove it.

Comment thread python/ray/serve/drivers.py Resolved
Comment thread python/ray/serve/drivers.py Resolved

@jiaodong jiaodong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dag part looks good to me, only nits.

Comment thread python/ray/serve/tests/test_cli.py Resolved
with open(output_path, "w") as f:
app.to_yaml(f)
else:
print(app.to_yaml(), end="")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not for this PR, but as a follow up it will be much more actionable to print other instructions for next step, such as providing a file path, or calling other clis to deployment the yaml file.

@jiaodong jiaodong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lg, i noticed last green commit has 500+ added lines but after lastest commit it's 338, did any file got untracked ?

@simon-mo simon-mo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM feel free to ignore my comment but would be a good check

attr_name = full_path[last_period_idx + 1 :]
module_name = full_path[:last_period_idx]

if ":" in full_path:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: check only one ":" exists?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I added a conditional to handle this.

@edoakes
edoakes merged commit cf7b4e6 into ray-project:master Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants