ci: fix setup-go cache and refresh docs
setup-go@v5 aborts when go.sum is missing, and this stdlib-only module has none. Disable the action cache and cap the job at 10 minutes. Lead the README with what the service does and a runnable quick start, fix stale contract and cache comments, and remove comments that only restate the code.
This commit is contained in:
1 parent
80c8eeb0b9
commit
f4693af748
12 files changed
+66
-26
No files matched your search
@@ -1,6 +1,6 @@
|
||||
// Package ml is the FastAPI client. Prediction calls are bounded by a 1.5 s
|
||||
// timeout; callers fall back to the last good forecast on any error. The larger
|
||||
// /bootstrap snapshot gets its own, longer transport timeout.
|
||||
// Package ml is the FastAPI client. Prediction calls use the caller's deadline
|
||||
// (1.5 s by default); callers fall back to the last good forecast on any error.
|
||||
// The larger /bootstrap snapshot gets its own, longer transport timeout.
|
||||
package ml
|
||||
|
||||
import (
|
||||
@@ -91,7 +91,7 @@ func (c *Client) Bootstrap(ctx context.Context) (model.Bootstrap, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PredictRequest mirrors CONTRACT.md §3 POST /predict.
|
||||
// PredictRequest mirrors the API contract POST /predict.
|
||||
type PredictRequest struct {
|
||||
Sensor string `json:"sensor"`
|
||||
Horizon string `json:"horizon"`
|
||||
@@ -106,7 +106,7 @@ type WeatherInput struct {
|
||||
PrecipMM float64 `json:"precip_mm"`
|
||||
}
|
||||
|
||||
// SimulateRequest mirrors CONTRACT.md §3 POST /simulate.
|
||||
// SimulateRequest mirrors the API contract POST /simulate.
|
||||
type SimulateRequest struct {
|
||||
Scenario string `json:"scenario"`
|
||||
Weather model.WeatherInput `json:"weather"`
|
||||
@@ -119,7 +119,7 @@ type TrainRequest struct {
|
||||
Model string `json:"model"`
|
||||
}
|
||||
|
||||
// TrainModels are the accepted training targets from CONTRACT.md §3.
|
||||
// TrainModels are the accepted training targets.
|
||||
var TrainModels = []string{"small", "forecast"}
|
||||
|
||||
// Predict calls POST /predict and returns the forecast points. The contract
|
||||
|
||||
Reference in new issue
Block a user