Skip to content

A Python-based tool that automates machine learning model training and prediction via a simple API interface. It streamlines dataset upload, model monitoring, and prediction workflows for rapid experimentation.

Notifications You must be signed in to change notification settings

arnchlmcodes/automation-ml-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Automated-Ml Backend

Overview

Automated-Ml is a backend API for automated machine learning workflows. It allows you to:

  • Train machine learning models on tabular data (CSV)
  • Monitor the status of training jobs
  • Make predictions using trained models

This project is backend-only (no frontend UI). You interact with the API using Python scripts, curl, or tools like Postman. The backend is accessible only on your local machine (no ngrok or public tunneling required).


Features

  • Model Training: Upload a CSV file to start a new training job. The backend will train a model and return a unique task_id.
  • Status Monitoring: Check the status of your training job using the task_id.
  • Prediction: Use a trained model to make predictions on new data by uploading a CSV and providing the task_id.

Project Structure

  • app.py — Example Python client for interacting with the backend API
  • autoML_builder.ipynb — (Optional) Jupyter notebook for backend logic
  • Benchmarking/Datasets/ — Example datasets (e.g., car_insurance.csv)

How to Use

1. Start the Backend Server

You need a backend server running at http://127.0.0.1:8000 (or change the URL in app.py).

Start the FastAPI backend with:

uvicorn app:app --reload --host 127.0.0.1 --port 8000

Note: This repository only contains the client and example data. You must have a compatible backend server running. The backend is only accessible locally; ngrok or public tunneling is not required or supported.

2. Train a Model (Python Example)

Edit and run app.py to train a model using the provided dataset:

if __name__ == "__main__":
    dataset_path = "Benchmarking/Datasets/car_insurance.csv"
    train_result = train_model(dataset_path)
    print("Train result:", train_result)
    # ... polling and prediction code ...

Or use curl:

curl -X POST -F "file=@Benchmarking/Datasets/car_insurance.csv" http://127.0.0.1:8000/train

3. Monitor Training Status

curl http://127.0.0.1:8000/monitor/<task_id>

4. Make Predictions

curl -X POST -F "task_id=<task_id>" -F "file=@Benchmarking/Datasets/car_insurance.csv" http://127.0.0.1:8000/predict

Example Workflow

  1. Train: Upload your CSV to /train and get a task_id.
  2. Monitor: Poll /monitor/<task_id> until status is done.
  3. Predict: POST to /predict with your task_id and a CSV file.

Requirements

  • Python 3.8+
  • requests
  • pandas

Install dependencies:

pip install requests pandas

Notes

  • This project does not include a frontend. All interaction is via API calls.
  • The backend server must be running and accessible at the specified URL.
  • Example datasets are provided in benchmark/Datasets/.
  • Ngrok or any tunneling service is not required; all usage is local-only.

About

A Python-based tool that automates machine learning model training and prediction via a simple API interface. It streamlines dataset upload, model monitoring, and prediction workflows for rapid experimentation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published