Skip to content

NonPopularPoint/mlops-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MLOps Batch Signal Pipeline

Computes binary trading signals from OHLCV data. Uses rolling mean comparison: signal = 1 if close > rolling mean, else 0.

Setup

pip install -r requirements.txt

Run

python run.py --input data.csv --config config.yaml --output metrics.json --log-file run.log

Or with defaults (no args):

python run.py

All CLI options:

python run.py --help

Tests

python -m pytest tests/ -v

Docker

Start Docker Desktop first, then:

docker build -t mlops-task .
docker run --rm mlops-task

Container generates metrics.json and run.log.

Config Parameters

Key Description Default
seed Random seed for reproducibility 42
window Rolling mean window size 5
version Output version string v1

Output

Success:

{
  "version": "v1",
  "rows_processed": 10000,
  "metric": "signal_rate",
  "value": 0.4991,
  "latency_ms": 16,
  "seed": 42,
  "status": "success"
}

Error:

{
  "version": "v1",
  "status": "error",
  "error_message": "description"
}

After JSON, a summary line is printed:

Done: 10000 rows, 9996 signals, rate=0.4991, 22ms

Structure

.
├── run.py
├── config.yaml
├── data.csv
├── requirements.txt
├── Dockerfile
├── metrics.json
├── run.log
├── app/
│   ├── __init__.py
│   ├── config_loader.py
│   ├── validator.py
│   ├── signal_generator.py
│   ├── metrics_writer.py
│   └── logger.py
├── tests/
│   ├── test_config.py
│   ├── test_validation.py
│   ├── test_signal_generation.py
│   ├── test_metrics_writer.py
│   └── test_integration.py
└── docs/
    ├── adr/0001-drop-nan-rolling-mean-rows.md
    └── plan/{SCOPE,ROADMAP,IMPLEMENTATION_PLAN}.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages