A modular, scalable AI framework for PyPI with dynamic architecture plugins and benchmarking suite.
Project description
PYMBBO ⚡
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
- Gestión de Hiperparámetros (
Config/Hyperparameters): Objeto central con acceso tipo atributo/diccionario y guardado/carga en formato JSON. - 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). - 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. - Sistema Plug-and-Play de Arquitecturas (
pymbbo/architectures/): Agrega nuevas arquitecturas creando una simple subcarpeta. El framework la descubre y registra automáticamente. - Entrenamiento Avanzado (
fit): Motor de entrenamiento con soporte para Callbacks (EarlyStopping,ModelCheckpoint,LRScheduler). - 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. - Persistencia y Exportación (
save,load_model,export): Exportación directa a.mbbo,ONNXyTorchScript.
⚡ 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymbbo-0.1.12.tar.gz.
File metadata
- Download URL: pymbbo-0.1.12.tar.gz
- Upload date:
- Size: 95.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65770cd20c5e814c3304c0062e0172e3a0ac0b86b65e5ac5e03bd2bcf3ae14e1
|
|
| MD5 |
4d709b15ef07a8387c95468e6962b902
|
|
| BLAKE2b-256 |
d32943b8596a4f3cdc48d11185638e890103e7564ce30eaa870d7fc5c4c77751
|
Provenance
The following attestation bundles were made for pymbbo-0.1.12.tar.gz:
Publisher:
publish.yml on bueormnew/pymbbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymbbo-0.1.12.tar.gz -
Subject digest:
65770cd20c5e814c3304c0062e0172e3a0ac0b86b65e5ac5e03bd2bcf3ae14e1 - Sigstore transparency entry: 2249430694
- Sigstore integration time:
-
Permalink:
bueormnew/pymbbo@c060c394da0de24784c0a82c0cb4c70cbe95355c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bueormnew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c060c394da0de24784c0a82c0cb4c70cbe95355c -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymbbo-0.1.12-py3-none-any.whl.
File metadata
- Download URL: pymbbo-0.1.12-py3-none-any.whl
- Upload date:
- Size: 81.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bd65a51215927daba456e393697d56c81a21dabb8e7fc755ccdfacc6c731506
|
|
| MD5 |
3f2d162d064ef2bd89113793928e00e3
|
|
| BLAKE2b-256 |
0b49d6947dfa2e43cfcb107031f63177d8dea2f62692cdd353d057b67c58ccbc
|
Provenance
The following attestation bundles were made for pymbbo-0.1.12-py3-none-any.whl:
Publisher:
publish.yml on bueormnew/pymbbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymbbo-0.1.12-py3-none-any.whl -
Subject digest:
4bd65a51215927daba456e393697d56c81a21dabb8e7fc755ccdfacc6c731506 - Sigstore transparency entry: 2249430826
- Sigstore integration time:
-
Permalink:
bueormnew/pymbbo@c060c394da0de24784c0a82c0cb4c70cbe95355c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bueormnew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c060c394da0de24784c0a82c0cb4c70cbe95355c -
Trigger Event:
push
-
Statement type: