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

[Serve] multiple submodels serve #298

Merged
merged 105 commits into from
Jan 24, 2025
Merged

Conversation

cyber-pioneer
Copy link
Collaborator

@cyber-pioneer cyber-pioneer commented Dec 26, 2024

Type

New Feature

Description

  1. multiple submodels serve
    Given many submodules. Simply configure the keywords of the submodules, including resource allocation and interdependencies among the submodels.
  2. multiple nodes serve
    Given many well-connected nodes. Simply configure the keywords of the nodes, including resource type and address messages.
  3. ci support serve case
    Serve test case contains 2 steps: serve and call.

@cyber-pioneer cyber-pioneer requested a review from a team as a code owner December 26, 2024 12:00
@cyber-pioneer cyber-pioneer changed the title [Debug]Serve] expected serve [Debug][Serve] expected serve Dec 26, 2024
@cyber-pioneer cyber-pioneer force-pushed the final_serve branch 4 times, most recently from 61007c2 to 7b89e05 Compare December 27, 2024 08:34
@cyber-pioneer cyber-pioneer changed the title [Debug][Serve] expected serve [Serve] expected serve Jan 20, 2025
if with_test:
f.write(f'bash -c "$cmd; sync" \n')
# TODO: need a option to control whether to append or overwrite the output file
# Now, it always appends to the output file
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, if there is an option available, users will be satisfied.

if self.command_line_mode:
self.user_script = "flagscale/serve/run_vllm.py"
elif isinstance(entrypoint, str) and entrypoint.endswith(".py"):
self.user_script = entrypoint
elif entrypoint is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we require users to provide the entrypoint?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is an option. Models pipeline can be built via user's entrypoint file or yaml config.

from flagscale.logger import logger


class Builder:
Copy link
Contributor

Choose a reason for hiding this comment

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

Builder for what? I believe the name should be more specific.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Comment on lines 49 to 56
def check_and_get_port(self, target_port=None, host="0.0.0.0"):
"""
Check if a specific port is free; if not, allocate a free port.
:param target_port: The port number to check, default is None.
:param host: The host address to check, default is "0.0.0.0".
:return: A tuple (is_free, port), where `is_free` indicates if the target port is free,
and `port` is the allocated port (target_port if free, or a new free port).
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

The code should be placed in the utilities so that it can be reused.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

Copy link
Contributor

@aoyulong aoyulong left a comment

Choose a reason for hiding this comment

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

LGTM

@aoyulong aoyulong merged commit b139a54 into FlagOpen:main Jan 24, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants