Skip to main content

Mindtrace monorepo with modular packages

Project description

PyPI version License Downloads

Mindtrace Module Dependency Structure

Mindtrace is organized into a layered workspace to support ML components as Python modules with clearly defined boundaries and dependencies.


📐 Layered Architecture

We use a level-based system for organizing modules based on dependency direction and build order.

Level 1: Core

  • core: Foundational utilities and base classes used across all other modules.

Level 2: Core Consumers

  • jobs: Job execution and backend interfaces.
  • registry: Artifact and metadata management.
  • database: Redis, Mongo, and DB access layers.
  • services: Service base classes, authentication, and gateways.
  • ui: Optional UI libraries and components.

Level 3: Infrastructure Modules

  • hardware: Interfaces for cameras, PLCs, scanners, etc.
  • cluster: Runtime cluster management, nodes, and workers.
  • datalake: Dataset interfaces for HuggingFace and Mindtrace datasets.
  • models: Core model definitions and leaderboard utilities.

Level 4: Automation

  • automation: Integration of pipelines and orchestration using level 2–3 modules.

Level 5: Applications

  • apps: End-user applications composed of all previous levels.
    • E.g., Demo pipelines

🔄 Dependency Flow

Each layer only depends on modules in lower levels.

Module Depends On
core
jobs core, services
registry core
database core
services core
ui core
cluster jobs, registry, database, services
datalake registry, database, services
models registry, services
hardware core
automation jobs, registry, database, services, datalake, models, cluster
apps Everything

🛠️ Build

Building wheels and source distributions, from the root of the repo:

uv build --all-packages
ls dist/

For building only wheels:

uv build --all-packages --wheel
ls dist/

They may then be installed in a new venv (the entire mindtrace package or any submodule mindtrace-core) via:

uv pip install mindtrace --find-links /path/to/dist
# or
uv pip install /path/to/dist/mindtrace.whl

Note: You may need to use uv pip install --force-reinstall in case you encounter ModuleNotFoundError.
Checking the installation:

uv run python -c "from mindtrace.core import Mindtrace; print('OK')"

🛠️ Usage Examples

Installing the full Mindtrace package:

uv add mindtrace

Installing a minimal dependency chain (e.g., for Datalake development):

uv add mindtrace-datalake

Python Imports

from mindtrace import core, registry, database, services

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mindtrace-0.7.0.tar.gz (304.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mindtrace-0.7.0-py3-none-any.whl (394.0 kB view details)

Uploaded Python 3

File details

Details for the file mindtrace-0.7.0.tar.gz.

File metadata

  • Download URL: mindtrace-0.7.0.tar.gz
  • Upload date:
  • Size: 304.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mindtrace-0.7.0.tar.gz
Algorithm Hash digest
SHA256 4e8fb757fef5dd7c2da41a8127b706b475986455269bc8b53b6358ec3bff0c69
MD5 d92d7cbaecb5c9f2cc33e9f996621c6e
BLAKE2b-256 1aeddd76f11c85d895eb8d6b18f5a96d87a209357fbd24181763acf1e75f6fd0

See more details on using hashes here.

File details

Details for the file mindtrace-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: mindtrace-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 394.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mindtrace-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc4f205bb04b5a59ebc84746df3f37a904a4930ed0c22881148da17214b49039
MD5 5283dfdb555e9bfed45b1cab705b874b
BLAKE2b-256 01b9811b29a0876dfa889321b6695a4e0d3479f7c92e6ba8e5efcb5e257dc15a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page