计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
serving【效率与协作】Use Earth2Studio's optional REST server and Python client to register workflows, submit and monitor inference, retrieve results, configure storage and authentication boundaries, or diagnose serving failures.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route when a task involves a remote Earth2Studio inference endpoint,
workflow registration/schema, asynchronous execution, result retrieval, Redis/RQ
service prerequisites, object storage, or serving diagnostics. This is an
optional capability of Earth2Studio 0.18.0a0, not a replacement for local
run.* workflows.
RemoteEarth2Workflow for an Earth2Studio-compatible, lazy xarray/data
source/model result. Read client-workflows.md.Earth2StudioClient for explicit request IDs, polling, file manifests,
downloads, health checks, and custom integrations.Workflow or Earth2Workflow contract only when authoring
a workflow that the service will discover. Read
server-reference.md.python path/to/earth2studio-skill/sub-skills/serving/scripts/check_service_config.py --help.uv pip install 'earth2studio[serve]', in the environment used by the
client or server. The extra includes FastAPI/Uvicorn, Pydantic, Redis/RQ,
metrics, Hydra, HTTP requests, and object-storage packages; model/data
extras remain separate.GET /health (or /readiness), then discover
the actual deployed workflow names with GET /v1/infer/workflows and its
.../{workflow_name}/schema endpoint. Do not assume example workflow names
are installed or exposed.POST /v1/infer/{workflow_name},
GET .../{execution_id}/status, and
GET .../{execution_id}/results. The unnamed POST /v1/infer route is only
a narrow compatibility convenience when exactly one workflow is exposed;
legacy workflow_type request bodies are not the current contract.Earth2StudioClient(token=...)
or RemoteEarth2Workflow(..., token=...). The package client sends the
header; an authentication gateway or server deployment must enforce it.
Never put credentials in a skill command, log, fixture, or committed file.health_check(), construct InferenceRequest(parameters={...}), and
call submit_inference_request(). Save the returned execution_id.get_request_status(id) until COMPLETED,
then call get_request_results(id). For a bounded synchronous operation,
use run_inference_sync(request, poll_interval=..., timeout=...) or
wait_for_completion(id, ...).output_files and result_paths() before opening data. Use
download_result(result, path) for individual files or a high-level result
object's as_dataset(), as_data_source(), or as_model().RemoteEarth2WorkflowResult(workflow, execution_id).The server can expose deterministic, diagnostic, ensemble, downscaling, or
user-defined computations, but the deployed registry—not this skill—defines
what is available. A workflow's Pydantic schema defines its required and
optional JSON parameters. Ensemble parameters commonly include nensemble,
batch_size, and a perturbation choice, but use the discovered schema rather
than copying an example blindly.
For a custom workflow, keep permanent resources in __init__, validate typed
parameters, write under the execution output directory, and report progress.
For an Earth2Workflow, __call__ must accept io: IOBackend; its remaining
annotated arguments become the request schema. The server selects zarr or
netcdf4 output, wraps IO for progress, and finalizes result metadata.
HealthStatus(status, timestamp); unhealthy/readiness failures are
service failures, not invalid forecast parameters.pending_results means computation finished but result finalization
is not yet ready.as_dataset() supports
.zarr and .nc; it does not interpret arbitrary files. Large downloads are
buffered in memory by download_result, so prefer lazy Zarr access where
supported and bound result size operationally.