Skip to content

c2siorg/tensormap

Repository files navigation

TensorMap

License CI Build Status

A web application for visually creating machine learning algorithms via drag-and-drop, with reverse engineering to TensorFlow code.

Features

  • Drag-and-drop neural network design using ReactFlow
  • Reverse engineer visual models to TensorFlow Python code
  • Real-time model training with live progress via WebSocket
  • CSV and image dataset upload and preprocessing
  • Correlation matrix visualization and target field selection

Prerequisites

  • Node.js >= 18
  • Python 3.12+
  • PostgreSQL
  • Docker (optional, for containerized setup)

Getting Started

Quick Start (Docker)

# Backend
cd tensormap-backend
docker build -t tensormap-backend .
docker run -p 4300:4300 --env-file .env tensormap-backend

# Frontend
cd tensormap-frontend
docker build -t tensormap-frontend .
docker run -p 3300:3300 tensormap-frontend

Backend

cd tensormap-backend
cp .env.example .env          # Configure DB credentials
uv sync
uv run uvicorn app.main:socket_app --reload --port 4300

Frontend

cd tensormap-frontend
cp .env.example .env          # Optional: configure API URL
npm install
npm start
Service Port
Frontend 3300
Backend 4300

Branch Protection Rules

To enforce code quality, ensure that you set up GitHub Branch Protection rules for the main branch.

  1. Go to Settings > Branches.
  2. Add branch protection rule for main.
  3. Check "Require status checks to pass before merging".
  4. Search and select backend-tests and frontend-tests.

Development Setup

Running Backend Tests

To run the backend tests locally with SQLite (fallback):

cd tensormap-backend && pytest tests/ -v

To run tests with PostgreSQL:

export DATABASE_URL=postgresql://test:test@localhost:5432/tensormap_test
cd tensormap-backend && pytest tests/ -v

Running Frontend Tests

To run frontend tests locally:

cd tensormap-frontend && npx vitest

Project Structure

tensormap/
  tensormap-backend/    # Python FastAPI server
  tensormap-frontend/   # React + Vite SPA

Contributing

See CONTRIBUTING.md for guidelines.

License

Apache 2.0

Author

Oshan Mudannayake

For questions or queries about this project, please reach out via email.

About

TensorMap will be a web application that will allow the users to create machine learning algorithms visually. TensorMap will support reverse engineering of the visual layout to a Tensorflow implementation in preferred languages. The goal of the project is to let the beginners play with machine learning algorithms in Tensorflow without less backg…

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors