L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Déploiement et opérations · SKILL.md

deployment

deployment

Serve fitted igel models through FastAPI/uvicorn and call the prediction API safely.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: deployment description: "Serve fitted igel models through FastAPI/uvicorn and call the prediction API safely." metadata: disco-role: operating disable-model-invocation: true license: MIT

Deployment

Use this sub-skill when the user asks to serve a fitted igel model, start the REST endpoint, call the prediction API, use the client example, debug IGEL_MODEL_RESULTS_PATH, or reason about host/port options for serving.

Routing contract

  • Prerequisite route: serving depends on a fitted classic igel model and its model_results/ directory. If the user has not already run fit or does not have a results directory, route them to tabular-workflows first.
  • Root route: for broader package routing or uncertainty about whether this is a serving task, return to the root router.
  • Stay here for: igel serve, FastAPI/uvicorn startup, IGEL_MODEL_RESULTS_PATH, /predict JSON shape, curl/client calls, deployment-specific failure modes, stale Docker/GUI deployment notes.
  • Route elsewhere for: training, evaluation, CLI predict, export/ONNX, model catalogs, config schemas, tabular preprocessing, or AutoKeras workflows.

Minimal operating workflow

  1. Confirm the fitted model directory contains the artifacts described in API reference: at minimum model.joblib and description.json; predictions.csv is the endpoint output path.

  2. Start the server with the package CLI:

    igel serve -res_dir model_results --host localhost --port 8080
    

    The CLI sets IGEL_MODEL_RESULTS_PATH before running igel's FastAPI app with uvicorn.

  3. Call POST /predict with a JSON object whose keys are the feature columns used for prediction. Use serving workflows for curl and bundled-client examples.

  4. If the request fails, inspect troubleshooting before changing the model or retraining.

Bundled helper

Use scripts/predict_client.py to format JSON or CSV rows and call the service without relying on the original source example. It supports --json, --json-file, --csv, --host, --port, --path, --dry-run, and shape validation for scalar-vs-list payloads.

Reference map

  • API reference: serve options, environment variable contract, FastAPI routes, request/response shape.
  • Serving workflows: fitted-model handoff, local startup, curl calls, helper usage, manual uvicorn path.
  • Troubleshooting: missing results paths/files, bad payload shapes, host/help confusion, stale Dockerfile, external GUI path.
Skills enregistrées