Skip to main content

A modular, scalable AI framework for PyPI with dynamic architecture plugins and benchmarking suite.

Project description

PYMBBO ⚡

PyPI version License: MIT Python Version

PYMBBO es un framework modular, intuitivo y de alto rendimiento en Python diseñado para facilitar la experimentación, entrenamiento, evaluación y despliegue de redes neuronales, ofreciendo un sistema Plug-and-Play de Arquitecturas y herramientas avanzadas de Benchmarking y Comparación de Modelos.


🔥 Características Principales

  1. Gestión de Hiperparámetros (Config / Hyperparameters): Objeto central con acceso tipo atributo/diccionario y guardado/carga en formato JSON.
  2. Ingesta y Preparación de Datos (load_dataset, Dataset, Batcher): Carga desde CSV, matrices NumPy, tensores y carpetas, con división de conjuntos (split) y flujo de transformaciones (transform).
  3. Construcción y Ensamblado de Redes (build_model): Soporta modo secuencial (add_layer), resúmenes visuales (summary()), congelamiento de capas (freeze_layers) y fine-tuning.
  4. Sistema Plug-and-Play de Arquitecturas (pymbbo/architectures/): Agrega nuevas arquitecturas creando una simple subcarpeta. El framework la descubre y registra automáticamente.
  5. Entrenamiento Avanzado (fit): Motor de entrenamiento con soporte para Callbacks (EarlyStopping, ModelCheckpoint, LRScheduler).
  6. Métricas Especializadas y Benchmarking (token_scaling_benchmark, compare_models): Pruebas automáticas de velocidad de tokens, rendimiento (tokens/seg), latencia, costo estimado y comparación simultánea lado a lado de modelos.
  7. Persistencia y Exportación (save, load_model, export): Exportación directa a .mbbo, ONNX y TorchScript.

⚡ Instalación Rápida

pip install pymbbo

O desde el código fuente:

git clone https://github.com/pymbbo/pymbbo.git
cd pymbbo
pip install -e .

💡 Ejemplo Rápido de Uso

import numpy as np
from pymbbo import Config, load_dataset, build_model, EarlyStopping, ModelCheckpoint

# 1. Configurar Hiperparámetros
config = Config(learning_rate=0.001, batch_size=32, epochs=10)

# 2. Cargar y Preparar Datos
X = np.random.randn(500, 10).astype(np.float32)
Y = np.random.randint(0, 2, (500, 1)).astype(np.float32)
dataset = load_dataset((X, Y))
train_ds, val_ds, test_ds = dataset.split(train=0.8, val=0.1, test=0.1)

# 3. Construir el Modelo (Usando arquitectura incorporada 'mlp')
model = build_model("mlp", input_dim=10, hidden_units=[64, 32], output_dim=1)
model.summary()

# 4. Compilar y Entrenar
model.compile(optimizer="adam", loss_function="bce", metrics=["accuracy"])

callbacks = [
    EarlyStopping(patience=3),
    ModelCheckpoint("best_model.mbbo")
]

model.fit(train_ds, validation_data=val_ds, epochs=10, callbacks=callbacks)

# 5. Inferencia y Evaluación
predicciones = model.predict(test_ds)
reporte = model.evaluate(test_ds)
print("Resultado Evaluación:", reporte)

# 6. Guardar y Exportar
model.save("modelo_final.mbbo")
model.export("modelo.onnx", format="onnx")

📖 Documentación Completa

Para acceder al manual completo de desarrollador, explicación detallada de cada módulo y la guía paso a paso para crear plugins de arquitectura, consulta DOCS.md.


📄 Licencia

Este proyecto está bajo la Licencia MIT. Consulta el archivo LICENSE para más detalles.

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

pymbbo-0.1.14.tar.gz (96.1 kB view details)

Uploaded Source

Built Distribution

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

pymbbo-0.1.14-py3-none-any.whl (82.0 kB view details)

Uploaded Python 3

File details

Details for the file pymbbo-0.1.14.tar.gz.

File metadata

  • Download URL: pymbbo-0.1.14.tar.gz
  • Upload date:
  • Size: 96.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pymbbo-0.1.14.tar.gz
Algorithm Hash digest
SHA256 a57f8c8501a39eeb6a6131ec950b70d2b9527312b403b0848a70fd4d84d8c847
MD5 d19069f2040c3754eea7de05b599f56d
BLAKE2b-256 15da23257e61575dbfa360dd9ed17b66b32e216cad383a546026bd74c897f70d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymbbo-0.1.14.tar.gz:

Publisher: publish.yml on bueormnew/pymbbo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymbbo-0.1.14-py3-none-any.whl.

File metadata

  • Download URL: pymbbo-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 82.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pymbbo-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 1350512b74fae07eff8a374998c3520d9234ffd1f6fae6433b7512a1d31c14f0
MD5 9107c7b26ea100806916145b5af3887a
BLAKE2b-256 45d18cf7b072264487cc6e023ad71c5d8aca88c4c524576115948ee5019a4ce5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymbbo-0.1.14-py3-none-any.whl:

Publisher: publish.yml on bueormnew/pymbbo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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