界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

serving-and-clients

serving-and-clients

【开发与工程】Use this sub-skill to build TensorFlow Serving PredictRequest payloads, run the Python gRPC dense and sparse clients, benchmark the minimal model, or reason about the legacy HTTP and non-Python client surfaces.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: "serving-and-clients" description: "Use this sub-skill to build TensorFlow Serving PredictRequest payloads, run the Python gRPC dense and sparse clients, benchmark the minimal model, or reason about the legacy HTTP and non-Python client surfaces." disable-model-invocation: true metadata: disco-role: operating license: Apache 2.0

Serving and Clients

Use this route when a user asks how to send predictions to an exported model, why a serving request fails, which model name or port to use, or how the repo's legacy client examples map to dense and sparse tensors.

Read first

What this sub-skill owns

  • Python gRPC dense and sparse serving payloads.
  • Model name, version, port, and signature behavior for serving calls.
  • The safe dry-run path that prints request tensors without contacting a server.
  • The minimal model benchmark helper for local latency and live gRPC checks.
  • The legacy HTTP cancer prediction wrapper as a checkpoint-backed pattern.
  • Alternate clients as reference-only surfaces that need external toolchains.

Use these bundled helpers

Route boundaries

  • If the user needs data conversion, TFRecords, or fixture creation, route that to the data-preparation sub-skill.
  • If the user needs training, checkpointing, SavedModel export, or TensorBoard, route that to the training-and-export sub-skill.
  • If the user wants Java, Go, C++, Android, or iOS build instructions, keep those as reference-only and do not promise a runnable helper in this environment.
  • If the user wants to modify the exported model itself, stay within the serving contract and do not drift into training logic.

Common questions this route should answer

  • Which model_name, model_version, and port values should match the server?
  • What are the dense and sparse input tensor names, dtypes, and shapes?
  • When should signature_name be set or omitted?
  • How do I tell a connection refusal from a request-shape mismatch?
  • Why does the legacy HTTP wrapper exit when the checkpoint is missing?

Working style

  1. Use the dry-run mode first when the user only needs to validate request shape or payload construction.
  2. Use the live gRPC path only when a server is already running and the model export is known.
  3. Prefer the dense or sparse reference that matches the user's tensor layout rather than guessing from the serving port alone.
  4. For non-Python clients, answer from the bundled reference pages and call out external toolchain needs clearly.

Notes

  • The dense and sparse helpers normalize request tensors before sending them.
  • The bundled benchmark helper separates a local NumPy check from the live serving call so the user can reason about minimal-model behavior without a server.
  • This sub-skill intentionally does not bundle native Java, Go, C++, Android, or iOS build systems.
我的收藏