codeflare-sdk icon indicating copy to clipboard operation
codeflare-sdk copied to clipboard

Create local_client_url() cluster method to return the local client url

Open tedhtchang opened this issue 2 years ago • 0 comments

The PR tracks the following issues:

  1. Get rid of the following code in the notebook in this PR: The conversation.
with oc.project(cluster.config.namespace):
    routes=oc.selector("route").objects()
    rayclient_url=""
    for r in routes:
        if "rayclient" in r.name():
            rayclient_url=r.model.spec.host
ray.init(address=f"ray://{rayclient_url}", logging_level="DEBUG")

and create a local_client_url() method so we only need to do:

ray.init(address=cluster.local_client_url(), logging_level="DEBUG")

(Edited)

  1. Also remove the oc.whoami with the k8s client implementation.

tedhtchang avatar Jun 22 '23 18:06 tedhtchang