Skip to content

Repository files navigation

title Forecast Audit OpenEnv
emoji 📈
colorFrom blue
colorTo indigo
sdk docker
pinned false

Forecast-Audit

Repository: https://github.com/MAYANKSHARMA01010/Forecast-Audit

Forecast-Audit is an OpenEnv-compatible benchmark environment for forecast and time-series quality auditing.

The agent acts like a data/forecast analyst and must:

  • identify data quality issues
  • repair missing or corrupted values
  • respect business/operational constraints
  • return structured actions with clear rationale

What This Project Uses

  • Python 3.11+
  • FastAPI + Uvicorn for HTTP API serving
  • Pydantic for request/response/state models
  • OpenEnv spec (openenv.yaml) for environment packaging and validation
  • Docker for containerized local and deployment runs
  • Validation and inference scripts for local checks and baseline runs

What This Project Does

  • Provides task episodes through POST /reset
  • Accepts agent decisions through POST /step
  • Tracks environment state through GET /state
  • Returns reward breakdowns to score action quality
  • Supports easy, medium, and hard task difficulty paths
  • Exposes a health endpoint for deployment checks

Installation

See the dedicated setup pages:

Run Locally

Use docs/local.md for full local run steps. For URLs and ports in all run modes, use docs/access-urls-and-ports.md.

Quick local verification:

python validate.py
python inference.py
python -c "from collections import Counter; from server.environment import TASKS; print(len(TASKS), Counter(t.difficulty for t in TASKS))"

Expected: validation passes, inference prints summary JSON, and task counts show 33 total with 11 each for easy/medium/hard.

Docker

Use docs/docker.md for Docker build and run steps. For URL/port mapping details and custom host ports, use docs/access-urls-and-ports.md.

Quick Docker verification:

docker build -t forecast-audit-openenv .
docker run --rm -p 7860:7860 forecast-audit-openenv

In another terminal:

curl http://127.0.0.1:7860/health
curl -X POST http://127.0.0.1:7860/reset -H "Content-Type: application/json" -d '{"difficulty":"easy"}'
curl -X POST http://127.0.0.1:7860/reset -H "Content-Type: application/json" -d '{"difficulty":"medium"}'
curl -X POST http://127.0.0.1:7860/reset -H "Content-Type: application/json" -d '{"difficulty":"hard"}'

Hugging Face Space

Quick live tests:

SPACE_URL="https://manku69-forecast-audit-openenv.hf.space"

curl "$SPACE_URL/health"

curl -X POST "$SPACE_URL/reset" \
  -H "Content-Type: application/json" \
  -d '{"difficulty":"easy"}'

curl -X POST "$SPACE_URL/step" \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "impute",
    "target_index": 3,
    "predicted_value": 135.0,
    "severity": "low",
    "violated_constraints": [],
    "rationale": "Stable +5 ramp"
  }'

curl "$SPACE_URL/state"

Expected: /health returns {"status":"healthy"}, and /reset and /step return valid JSON payloads.

For a consolidated Local/Docker/HF access matrix, see docs/access-urls-and-ports.md.

API Endpoints

  • POST /reset -> starts a task episode
  • POST /step -> submits one action
  • GET /state -> returns current environment state
  • GET /health -> health check

Round 1 Quick Checks

Use docs/round1/submission-guide.md for Round 1 validation and submission checks.

OpenEnv Deploy

source .venv/bin/activate
source scripts/setup_env.sh
openenv validate
openenv push --repo-id Manku69/Forecast-Audit-OpenEnv

Or use the helper script:

bash scripts/deploy_openenv.sh Manku69/Forecast-Audit-OpenEnv

Project Structure

Forecast-Audit/
├── server/
│   ├── app.py
│   └── environment.py
├── client.py
├── inference.py
├── models.py
├── openenv.yaml
├── requirements.txt
├── validate.py
└── scripts/

Documentation Index

All detailed documentation is in separate Markdown files linked below.

Releases

Packages

Contributors

Languages