Skip to content

Tech Guide: Ray Serve: Composable Model Serving from Laptop to Kubernetes - #109

Open
bits-bytes-nn wants to merge 3 commits into
mainfrom
paper-reviews/guide-e7c657a05d90
Open

bits-bytes-nn wants to merge 3 commits into
mainfrom
paper-reviews/guide-e7c657a05d90

Conversation

@bits-bytes-nn

@bits-bytes-nn bits-bytes-nn commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

This PR adds an AI-generated technical guide: Ray Serve: Composable Model Serving from Laptop to Kubernetes

  • Sources: 23 page(s)
  • Characters: 54,705

This pull request was automatically generated by the Scholar-Lens system.

Review checklist

  • Target version 2.60.0 (the latest ray release): docs and repository pages at other versions are marked as another version.
  • Evidence that misstates its quote was left out: E72 (Scope names Ray Serve 2.60.0, a version the quote does not support (other version-scoped items in this set say 2.59.0).); E78 (Claim says the nested-object approach was 'completely discontinued'; the quote only says to use _to_object_ref() instead)
  • Section 'Multi-model inference pipelines that outgrow a single web server': review problems no fix addressed: sources: 이 문장은 표 값의 출처와 작성 방식을 설명할 뿐 주제를 다루지 않으니 지웁니다. 근거 표시는 표 앞 문장의 [[E46]]으로 충분합니다. — in: 표의 Ray Serve 열은 공식 설명에 근거합니다 [[E46]]. 정적 그래프 열은 그와 대비해 정리한 것입니다. | sources: 정적 그래프 열의 '설정에 묶입니다', '그래프 정의와 로직이 분리됩니다'는 근거가 받쳐 주지 않는 주장입니다. 근거에 있는 '제약이 많고 다루기 어렵다'만 남기거나, 표를 빼고 본문 문장으로 대비를 설명합니다. — in: | 단계별 자원 | 설정에 묶입니다 | 모델마다 다른 자원을 쓰고 클러스터의 다른 머신에서 실행할 수 있습니다 | | kindness: 레플리카가 무엇인지 한 문장으로 정의합니다. 배포(deployment)는 같은 코드를 실행하는 레플리카(Ray 위의 프로세스) 묶음이고, 단계마다 배포가 따로 있어 레플리카 수를 따로 정할 수 있다고 쓰면 됩니다. 이 정의가 있어야 '단계별로 따로 확장'이라는 핵심 주장이 어떻게 가능한지 독자가 따라옵니다. — in: 확장 수단도 기본으로 | flow: '배포 그래프'라는 말을 정의하기 전에 썼습니다. '여러 배포를 이어 만든 애플리케이션 전체'처럼 풀어 쓰거나, 배포 개념을 소개한 뒤에 이 문장을 둡니다. — in: 로컬 머신에서 배포 그래프 전체를 시험한 뒤 그대로 클러스터로 옮기면 되고, 그 과정에서 무거운 Kubernetes 개념이나 클라우드 설정을 알 필요는 없습니다 [[E54]]. | kindness: '분수 GPU'를 짧게 풀어 줍니다. 예를 들어 '레플리카 하나에 GPU 0.5개처럼 GPU 일부만 할당하는 방식'이라고 덧붙입니다. — in: 분수 GPU 같은 유연한 스케줄링도 지원하므로, 자원을 나눠 쓰면서 여러 모델을 낮은 비용으로 서빙할 수 있습니다 [[E44]].
  • Section '확장 단위가 되는 배포, 레플리카, 인그레스, 애플리케이션': 1 edit(s) not applied: would add a writing-rule slip (self-reference '이 절'): '그래프 전체를 하나의 애플리케이션으로 묶으면, 인그레스 배포 하나가 바깥 경계를 맡고 그 뒤의 각 배포가 레'
  • Section '확장 단위가 되는 배포, 레플리카, 인그레스, 애플리케이션': 1 edit(s) not applied: would add a writing-rule slip (self-reference '이 절'): '그래프 전체를 하나의 애플리케이션으로 묶으면, 인그레스 배포 하나가 바깥 경계를 맡고 그 뒤의 각 배포가 레'
  • Section 'Deployments, replicas, ingress and applications as the unit of scaling' still has: a standard section needs at least 1 visuals (its figures, an equation, or a small table from its number evidence)
  • Section '무작위 두 후보 중 덜 바쁜 쪽을 고르는 기본 요청 라우터와 교체 가능한 라우팅 정책': the writer could not fix: The evidence never shows the full signatures of choose_replicas, on_request_routed or on_replica_actor_died, and it never says whether the two callbacks are async. In the skeleton I used generic *args, **kwargs parameters and made all three methods async, as the problem asked. I marked the b
  • Section '세 군데만 고쳐 로컬 HTTP로 여는 번역 모델 배포': 1 edit(s) not applied: would add a writing-rule slip (self-reference '앞 절'): '생성자가 인자를 받지 않으므로 bind()는 빈 호출로 끝납니다 [[E3]].'
  • Section 'A translation model turned into a deployment and queried over local HTTP': 1 sentence(s) removed that contradict their evidence, talk about the post's sources or that their evidence does not support: 위 코드의 값은 앞서 라우팅 절에서 본 두 레플리카 구성 그대로입니다. (unsupported: None of the earlier routing-section evidence shows a two-replica se)
  • Section 'Model composition with DeploymentHandle: chaining, streaming and independent scaling': review problems no fix addressed: flow: 앞 섹션의 클라이언트는 model_client.py라는 이름으로 나온 적이 없습니다. 게다가 params={'text': ...}로 보내고 response.json()으로 읽었습니다. 새 클라이언트는 json=english_text로 보내고 response.text로 읽으므로, 입력 문장만 바뀐 게 아닙니다. 본문 형식(JSON | flow: 앞에서 정의한 Translator는 두 가지입니다. __call__(http_request)를 가진 버전과 @serve.ingress(app)·translate(text)를 가진 FastAPI 버전입니다. Summarizer는 translate 메서드를 호출하므로 어느 클래스를 쓰는지 밝히세요. 이 조합에서 @serve.i | flow: 체이닝 예제는 실행 중인 예제 대신 Adder/Multiplier로 처음부터 다시 시작합니다. 이 문장도 실행 예제에는 체이닝이 적용되지 않는다고 인정합니다. 요약 단계를 배포로 분리하고 그 응답을 self.translator.translate.remote(...)에 바로 넘기는 짧은 코드를 실행 예제 위에 보여 주세요. 아니면 숫자 예제가 | flow: SpanishResponder, FrenchResponder, hello.py, language_classifier는 코드로 보여 준 적이 없는데 갑자기 등장합니다. 이 예제를 빼고 Summarizer와 Translator 데코레이터에 서로 다른 num_replicas·num_gpus를 주는 짧은 코드로 대신 보여 주세요. | depth: 독자가 본 적 없는 예제를 실행하는 방법과 출력에 지면을 쓰고 있습니다. 이 섹션의 요점인 배포별 독립 확장과는 관계가 없으니 삭제하세요. — in: 이 예제도 같은 방식으로 띄웁니다. hello.py가 있는 디렉터리에서 serve run hello:language_classifier를 실행하고 [[E66]], {"language":
  • Section 'Model composition with DeploymentHandle: chaining, streaming and independent scaling' still has: a 43-line code block; show the 40 or fewer lines the text explains and say what the rest does
  • Section '설정 파일이 코드를 덮어쓰는 배포 파라미터와 처리량을 정하는 기본값': the writer could not fix: graceful_shutdown_timeout_s의 기본값은 넣지 않았습니다. 제공된 근거 어디에도 그 값이 없습니다(E105의 20은 예시 값일 뿐 기본값이 아닙니다).
  • Section '코드에서 만들어 클러스터 목표 상태로 적용하는 Serve 설정 파일': the writer could not fix: get_app_handle 예시의 문제 요청은 이미지 분류 애플리케이션이 텍스트 애플리케이션에 '번역'을 맡긴다고 쓰라는 것이었습니다. 그런데 text_ml:app의 인그레스는 Summarizer이고, 여기에는 translate 메서드가 없습니다. 그래서 정의된 summarize를 호출하도록 바꾸고 플래그 이름도 should_summarize로 바꿨습니다. 즉 이 분기는 번역이 아니라 요약을 맡깁니다. 근거 코드(E87)의 메서드 이름과도 다릅니다.
  • Section '한 매니페스트로 묶는 RayService와 대시보드·로그·메트릭으로 읽는 운영 상태': the writer could not fix: 요청 ID 문제는 일부만 고쳤습니다. 근거에는 요청 ID를 응답에서 돌려받을 수 있다는 내용만 있고, 어느 응답 헤더에 담기는지는 나오지 않습니다. 그래서 코드는 특정 헤더 이름을 지어내지 않고 응답 헤더 전체를 출력합니다. 길이 문제도 일부만 고쳤습니다. 여러 문장을 지웠지만, 다른 문제를 고치느라 들어간 설명 문장 때문에 산문이 아직 목표 2,500자를 넘을 수 있습니다.
  • Section 'Where Ray Serve fits against Triton, MLflow serving and full ML platforms': review problems no fix addressed: sources: This paragraph is the guide's own scenario, not something a source states, so a placeholder evidence marker like [[EX]] does not belong here. Remove the [[EX]] markers from both sentences. Al | style: The sentence has no subject, so the reader can't tell who is making the recommendation: the guide, MLflow or Ray. State the subject plainly, or write it as a direct recommendation without a hid | style: This heading is a topic label. Turn it into a claim noun phrase, for example "### 여러 단계의 Python 파이프라인에서 기본값이 되는 Serve". Keep the guide's-view marker inside the body, once. — in: ### 이 글의 판단 | style: Rewrite the sentence without the "~다는 점" noun frame, for example "가장 큰 이점은 노트북에서 만든 코드를 거의 그대로 Kubernetes까지 옮길 수 있는 것입니다", or restructure it more freely. — in: 노트북에서 만든 코드를 거의 그대로 Kubernetes까지
  • Section 'Where Ray Serve fits against Triton, MLflow serving and full ML platforms': check 1 sentence(s) the evidence may not support: GPU가 모자라면 추가된 레플리카는 PENDING 상태로 기다립니다 [[E248]]. (unsupported: Only a third-party blog (E248) reports the PENDING behaviour. The sentence states it as current tool behaviour without crediting the blog, and no official source confirms it. (not supported: GPU가 모자라면 추가된 레플리카는 PENDING 상태로 기다립니다 (stated as current behaviour; only a third-party source gives it)))
  • Section 'Where Ray Serve fits against Triton, MLflow serving and full ML platforms' still has: [503] already stated in '설정 파일이 코드를 덮어쓰는 배포 파라미터와 처리량을 정하는 기본값': refer back without repeating: max_queued_requests를 넘긴 요청은 핸들에서 BackPressureError, HTTP에서 기본 503으로 돌아오고 , 모델 코드의 예외는 500과 트레이스백으로 돌아오며 레플리카는 계속 요청을 처리합니다 . | [500] already stated in '제어 평면만 맡는 컨트롤러와 프록시·레플리카로 이어지는 데이터 경로': refer back without repeating: max_queued_requests를 넘긴 요청은 핸들에서 BackPressureError, HTTP에서 기본 503으로 돌아오고 , 모델 코드의 예외는 500과 트레이스백으로 돌아오며 레플리카는 계속 요청을 처리합니다 .
  • Section 'Deployments, replicas, ingress and applications as the unit of scaling' still has: a standard section needs at least 1 visuals (its figures, an equation, or a small table from its number evidence)
  • Section '제어 평면만 맡는 컨트롤러와 프록시·레플리카로 이어지는 데이터 경로': the writer could not fix: 출처를 밝히던 '아키텍처 페이지 기준으로'를 지웠습니다. 제안된 문구 '헤드 노드에 하나 둘 수 있고'는 쓰지 않았습니다. 근거 자료는 이것을 기본값("By default there is one HTTP proxy actor on the head node")으로 설명하므로, 그 표현을 쓰면 '기본적으로'라는 조건이 빠집니다. 그래서 '기본적으로 헤드 노드에 하나 있고'를 남겼습니다.
  • Section '무작위 두 후보 중 덜 바쁜 쪽을 고르는 기본 요청 라우터와 교체 가능한 라우팅 정책': 1 edit(s) not applied: would remove the only code block: 'bash\npip install "ray[serve,llm]"\n\n\n'
  • Section 'Model composition with DeploymentHandle: chaining, streaming and independent scaling' still has: a 43-line code block; show the 40 or fewer lines the text explains and say what the rest does
  • Section 'Deployment parameters for scaling, resources and backpressure, and their precedence': whole-post review problems left as they were (adds problems: [100] already stated in '제어 평면만 맡는 컨트롤러와 프록시·레플리카로 이어지는 데이터 경로': refer back without repeating: max_ongoing_requests는 응): 데코레이터 발췌의 class Translator: 본문에는 주석 한 줄만 있습니다. 이대로는 IndentationError가 납니다. 이어지는 .options() 예시와 configure_serve.py도 이 클래스를 전제로 합니다. Fix: 클래스 본문에 앞의 __init__ | '기본값은 앞서 데이터 경로에서 본 그대로'라고 하지만, 데이터 경로 섹션은 5를 가상의 값으로 들었을 뿐 기본값을 밝힌 적이 없습니다. 그런데 뒤 문단은 '기본값 5'를 사실처럼 씁니다. Fix: 'max_ongoing_requests는 응답을 받지 않은 채 레플리카 하나에 보낼 | '번역처럼 요청 하나가 레플리카를 오래 붙잡지 않는 모델'은 앞의 'Translator처럼 모델 추론이 무거운 핸들러'와 모순됩니다. 게다가 Translator의 async call은 동기 translate`를 호출하므로 이벤트 루프를 막습니다. 따라서 max_ongoing
  • Section '코드에서 만들어 클러스터 목표 상태로 적용하는 Serve 설정 파일': 2 edit(s) not applied: would remove the only code block: '번역 언어는 Translator의 다음 메서드가 정하는 prefix로 바뀝니다.\n\npython\n# ' | would remove the only code block: 'python\n# excerpt: 다른 애플리케이션의 핸들을 얻어 번역을 위임하는 분기\nif req.ge'
  • Section 'Serve config files as the single source of truth for single and multi-app clusters': whole-post review problems left as they were (adds problems: an evidence marker inside code; markers go at the end of prose sentences only: ``` serve build는 이 import path를 받아 코드에 | a 41-line code block; show the 40 or fewer lines the text explains and say what the rest does | 코드에서 만들어 클러스터 목표 상태로 적용하는 Serve 설정 파일: a python block does not parse (invalid syntax): # excerpt: text_ml.py의 Translator): serve_config.yaml은 Translator에 `user_config: language: french`를 주는데, user_config를 받는 `reconfigure` 메서드는 다음 하위 섹션에서야 나옵니다. 그래서 앞서 정의한 Translator로 `serve deploy`하 | reconfigure는 `self.prefix`를 정하지만 translate는 여전히 `f"translate English to French: {text}"`로 고정되어 있습니다. 그래서 `language`를 german으로 바꿔 재적용해도 번역 언어는 바뀌지 않습니다. 실행 예제가 본 | `serve build image_classifier:app text_ml:app`의 image_classifier.py는 글 어디에도 나오지 않습니다. get_app_handle 발췌는 주석으로는 '번역을 위임'한다면서 실제로는 `summarize`를 호출합니다. 이 호출은 영어 요약
  • Section '한 매니페스트로 묶는 RayService와 대시보드·로그·메트릭으로 읽는 운영 상태': the writer could not fix: The RayService YAML is an excerpt (serveConfigV2 with a remote working_dir only). The evidence does not contain the full CR fields (apiVersion, kind, head/worker group specs, container image), so rayClusterConfig is taken from the sample CR ray-service.text-ml.yaml. The Dockerfile option was not use
  • Code that may not run as pasted: 설정 파일이 코드를 덮어쓰는 배포 파라미터와 처리량을 정하는 기본값: a python block does not parse (expected an indented block after class definition on line 14): # excerpt: 데코레이터에 배포 파라미터를 모은 Translator 정의 (클래스 본문은 앞서 정의한 그대로)
    fr | 코드에서 만들어 클러스터 목표 상태로 적용하는 Serve 설정 파일: a python block uses names no earlier block or import defines: req, result; define or import them where a reader pasting the blocks in order has them
  • [image] line 127: remote image not localized (linked to its source): https://docs.ray.io/en/latest/_images/architecture-2.0.svg
  • [image] line 175: remote image not localized (linked to its source): https://raw.githubusercontent.com/ray-project/images/master/docs/serve/autoscaling.svg
  • [image] line 1027: remote image not localized (linked to its source): https://raw.githubusercontent.com/ray-project/images/master/docs/serve/multi-app/applications-dashboard.png
  • [image] line 1031: remote image not localized (linked to its source): https://raw.githubusercontent.com/ray-project/images/master/docs/serve/multi-app/deployments-dashboard.png
  • [image] line 1035: remote image not localized (linked to its source): https://raw.githubusercontent.com/ray-project/images/master/docs/serve/multi-app/replica-dashboard.png

@bits-bytes-nn bits-bytes-nn changed the title Tech Guide: Ray Serve: Building and Operating Scalable Model-Serving Apps Tech Guide: Ray Serve: Composable Model Serving from Laptop to Kubernetes Nov 12, 2026

This branch has not been deployed

No deployments
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.

1 participant