Experimaestro module for Pytorch-based experiments
Project description
xpm-torch
PyTorch training framework built on experimaestro and Lightning Fabric.
Features
- Module system:
Modulebase class combining experimaestroConfigwithtorch.nn.Module, with safetensors serialization - Training:
Learnertask with checkpointing, validation listeners, and TensorBoard logging - HuggingFace Hub: Upload/download models via
ExperimaestroHFHub(from experimaestro) - Distributed training: Lightning Fabric integration for multi-GPU/node training
Installation
pip install xpm-torch
Quick Start
from xpm_torch.module import Module
from experimaestro import Param
import torch
import torch.nn as nn
class MyModel(Module):
input_dim: Param[int]
hidden_dim: Param[int]
def __initialize__(self):
self.fc1 = nn.Linear(self.input_dim, self.hidden_dim)
def forward(self, x):
return self.fc1(x)
# Create config, then instance
cfg = MyModel.C(input_dim=50, hidden_dim=100)
model = cfg.instance()
model.initialize()
# Save/load with safetensors
from pathlib import Path
model.save_model(Path("checkpoint/model"))
model.load_model(Path("checkpoint/model"))
License
GPL-3.0
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
xpm_torch-0.1.0.tar.gz
(211.2 kB
view details)
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
xpm_torch-0.1.0-py3-none-any.whl
(51.9 kB
view details)
File details
Details for the file xpm_torch-0.1.0.tar.gz.
File metadata
- Download URL: xpm_torch-0.1.0.tar.gz
- Upload date:
- Size: 211.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7f847750a8c6a3d7d8ee777b66f85470ba5de47429bac84612a7d1e84fcbc29
|
|
| MD5 |
be3f9353843eb8ffed1bcdbe721f48cf
|
|
| BLAKE2b-256 |
a9070c3ea2d20bebee7397bc01e8bdcb47cc6dd1ce940c474f0b9171696c9f08
|
File details
Details for the file xpm_torch-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xpm_torch-0.1.0-py3-none-any.whl
- Upload date:
- Size: 51.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d71dcacb79e4dd1e134b6ee721c2b4d34f5bc5d5b4f6075854d81b96c6661b40
|
|
| MD5 |
6c5837aaf3fb50a65acafeb89c702b36
|
|
| BLAKE2b-256 |
6c74a37a6d96706146ba7c60aab26c0137d906d69dfcd0c0104f97a31eaa890a
|