Skip to content
Public template

About

πŸ₯§ Development toolkit & templates. Advanced AI context engineering, production project frameworks.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

Odipie

Fast AI/ML Workflows Through Intelligent Lazy Loading

Python Version License Template Docker

Reduce startup cost by loading heavy AI/ML libraries only when a code path actually uses them.

Odipie is a lightweight Python toolkit and project template for lazy-loading optional AI/ML dependencies. The base install stays small. Frameworks such as TensorFlow, PyTorch, scikit-learn, Transformers, Pandas, NumPy, Matplotlib, and OpenCV can be installed as optional extras.

Features

  • Lazy proxy objects for common AI/ML libraries.
  • Optional dependency extras instead of one oversized required install.
  • Compatibility shim for older examples that use import lazy_init_py as odipie.
  • Small CLI and smoke-check app for verifying the package install.
  • Docker and Compose workflow that builds from the real repository tree.
  • Wiki source files under docs/wiki-src/ for longer engineering notes.

Project Tree

odipie/
β”œβ”€β”€ odipie/
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── __main__.py
β”œβ”€β”€ ROProj/
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ config.py
β”‚   β”œβ”€β”€ docker-compose.yml
β”‚   └── requirements.txt
β”œβ”€β”€ docker/
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ .dockerignore
β”‚   β”œβ”€β”€ entrypoint.sh
β”‚   └── README.md
β”œβ”€β”€ docs/
β”‚   └── wiki-src/
β”œβ”€β”€ tests/
β”‚   └── test_imports.py
β”œβ”€β”€ .dockerignore
β”œβ”€β”€ app.py
β”œβ”€β”€ config.py
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ lazy_init_py.py
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ requirements.txt
└── README.md

Installation

Create and activate a virtual environment, then install the package in editable mode:

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -e .

Install optional stacks only when you need them:

pip install -e .[data]
pip install -e .[tensorflow]
pip install -e .[torch]
pip install -e .[ml]

Usage

import odipie

print("App ready")
print(odipie.get_loaded_modules())

# TensorFlow imports only when this attribute chain is used.
model = odipie.tensorflow.keras.Sequential([...])

# scikit-learn imports only when this code path runs.
processed = odipie.preprocess_data(data, method="standard")

Older examples still work:

import lazy_init_py as odipie

CLI Smoke Checks

python -m odipie --loaded
python -m odipie --versions
python app.py

Tests

pip install -e .[dev]
pytest

Docker

docker compose build
docker compose up

See docker-setup.md for the Docker walkthrough.

Documentation

Resource Description Link
Wiki Home Complete knowledge base Wiki
Getting Started Install, optional extras, Docker, and troubleshooting docs/wiki-src/Getting-Started.md
Docker Guide Build and run the package in Docker docker-setup.md
AI Terminology & FAQ Plain-language AI and agentic-system reference docs/wiki-src/AI-Terminology-and-FAQ.md
Agents, MCP & Orchestration Agents, graph workflows, MCP, and WebMCP docs/wiki-src/Agents-MCP-and-Orchestration.md
Prompt Engineering Prompt ideation and context engineering adv_promptGuide.md
Wiki Sources Source markdown for wiki pages docs/wiki-src

Security Note

Do not use wildcard imports in project code. For PyTorch model files, only load artifacts from trusted sources; Odipie uses safer torch.load(..., weights_only=True) defaults when supported by the installed PyTorch version.

License

This project is licensed under the Apache License 2.0.

About

πŸ₯§ Development toolkit & templates. Advanced AI context engineering, production project frameworks.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages