Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
model-serving【部署与运维】Use FedML for model cards, local predictors, on-prem or cloud deployment, inference requests, and streaming response serving.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill for FedML model cards, local model serving, cloud/on-prem deployment, endpoint requests, streaming responses, FedMLPredictor, FedMLInferenceRunner, and fedml model CLI/API workflows.
../distributed-training/SKILL.md.../launch-and-packaging/SKILL.md.../workflow-orchestration/SKILL.md.| User task | Preferred path |
|---|---|
| local predictor smoke | subclass FedMLPredictor, wrap with FedMLInferenceRunner, test readiness/predict |
| streaming inference | use the streaming predictor pattern and stream chunks explicitly |
| model card creation | fedml model create or fedml.api.model_create |
| package/push/deploy | fedml model package/push/deploy or matching fedml.api.model_* calls |
| remote endpoint invocation | fedml model run or fedml.api.model_run(endpoint_id, json_string) |
Run the bundled local predictor helper from the root skill directory:
python sub-skills/model-serving/scripts/local_predictor_smoke.py
python sub-skills/model-serving/scripts/local_predictor_smoke.py --streaming
The helper uses FedML serving classes without pushing or deploying a model card.
Discovery commands are safe:
fedml model --help
fedml model create --help
fedml model deploy --help
fedml model run --help
Remote operations require approval and credentials:
fedml model create <name> --model <path> --config <config.yaml>
fedml model package <name>
fedml model push <name> --api-key <key>
fedml model deploy <name> --endpoint-name <endpoint>
fedml model run <endpoint-id> '{"inputs": ...}'
Python equivalents are listed in ../../references/api-reference.md#public-fedmlapi-helpers.
python/fedml/serving/fedml_predictor.py — predictor base class.python/fedml/serving/fedml_inference_runner.py — local inference runner.python/examples/deploy/quick_start/src/main_entry.py — simple predictor shape.python/examples/deploy/streaming_response/src/main_entry.py — streaming response pattern.python/tests/test_model_cli/ — model CLI reference paths, credential-bound for real execution.fedml model deploy can create endpoints and consume resources; ask before running.A model-serving task is complete when the serving mode, predictor interface, model artifact path, endpoint/credential requirements, and local-vs-remote decision are explicit, and local smoke or remote deployment status is recorded.