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.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- serving-and-clients
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- 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
02 资源文件 8
- 参考文档references/alternate-clients.md3.5 KB
- 参考文档references/http-service.md2.1 KB
- 参考文档references/minimal-benchmark.md3.4 KB
- 参考文档references/python-grpc-client.md3.5 KB
- 参考文档references/troubleshooting.md3.6 KB
- 脚本scripts/benchmark_minimal_model.py5.7 KB
- 脚本scripts/predict_dense.py5.0 KB
- 脚本scripts/predict_sparse.py6.9 KB
03 SKILL.md 正文
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
- references/python-grpc-client.md for the dense and sparse
PredictRequestcontract, tensor names, dtypes, and shape rules. - references/minimal-benchmark.md for the safe minimal-model latency and QPS helper.
- references/http-service.md for the legacy Django checkpoint-backed wrapper and its failure modes.
- references/alternate-clients.md when the question is about Java, Go, C++, Android, iOS, or Spark clients.
- references/troubleshooting.md when the user reports a timeout, connection refusal, model mismatch, or shape error.
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
- Run scripts/predict_dense.py to inspect or send the dense serving payload.
- Run scripts/predict_sparse.py to inspect or send the sparse serving payload.
- Run scripts/benchmark_minimal_model.py for the minimal model's local or gRPC benchmark modes.
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, andportvalues should match the server? - What are the dense and sparse input tensor names, dtypes, and shapes?
- When should
signature_namebe 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
- Use the dry-run mode first when the user only needs to validate request shape or payload construction.
- Use the live gRPC path only when a server is already running and the model export is known.
- Prefer the dense or sparse reference that matches the user's tensor layout rather than guessing from the serving port alone.
- 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.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).