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] slashes in deployment name cause actor failure #51280

Open
crypdick opened this issue Mar 11, 2025 · 0 comments
Open

[Serve] slashes in deployment name cause actor failure #51280

crypdick opened this issue Mar 11, 2025 · 0 comments
Labels
bug Something that is supposed to be working; but isn't serve Ray Serve Related Issue triage Needs triage (eg: priority, bug/not-bug, and owning component)

Comments

@crypdick
Copy link
Contributor

What happened + What you expected to happen

When creating a Serve deployment with a name containing a slash (such as TextGenerationModel.options(name="huawei-noah/TinyBERT_General_4L_312D")) leads to actor failures. The error occurs because the slash in the name is likely being used as a path separator in log files.

Error: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ray/session_2025-03-11_16-02-48_264712_45753/logs/serve/replica_default_huawei-noah/TinyBERT_General_4L_312D_eo3vqu7d.log'

Versions / Dependencies

ray, version 2.43.0

Reproduction script

from ray import serve

# The problematic model name containing a slash
model_with_slash = "huawei-noah/TinyBERT_General_4L_312D"
model_without_slash = "distilgpt2"  # This one works fine

@serve.deployment
class MyModel:
    def __init__(self, model_name):
        self.model_name = model_name

    def __call__(self, text):
        return f"Generated text using {self.model_name}: {text}"


def main():
    serve.start()
    
    print("Creating deployment with model name that doesn't contain a slash (works):")
    working_app = MyModel.options(name=model_without_slash).bind(model_without_slash)
    
    print("\nCreating deployment with model name that contains a slash (fails):")
    try:
        failing_app = MyModel.options(name=model_with_slash).bind(model_with_slash)
        serve.run(failing_app)
    except Exception as e:
        print(f"Error occurred: {type(e).__name__}")
        print(f"Error message: {str(e)}")



if __name__ == "__main__":
    main()

Issue Severity

Low: It annoys or frustrates me.

@crypdick crypdick added bug Something that is supposed to be working; but isn't serve Ray Serve Related Issue triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't serve Ray Serve Related Issue triage Needs triage (eg: priority, bug/not-bug, and owning component)
Projects
None yet
Development

No branches or pull requests

1 participant