Skip to main content

Experimaestro module for Pytorch-based experiments

Project description

xpm-torch

PyTorch training framework built on experimaestro and Lightning Fabric.

Features

  • Module system: Module base class combining experimaestro Config with torch.nn.Module, with safetensors serialization
  • Training: Learner task 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


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.2.0.tar.gz (215.0 kB view details)

Uploaded Source

Built Distribution

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

xpm_torch-0.2.0-py3-none-any.whl (54.6 kB view details)

Uploaded Python 3

File details

Details for the file xpm_torch-0.2.0.tar.gz.

File metadata

  • Download URL: xpm_torch-0.2.0.tar.gz
  • Upload date:
  • Size: 215.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xpm_torch-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1090fbd6c5f36cfd1e9e97acb0323791060cfd63a5498ab0511f29c296934a05
MD5 78b5d8e7282ed2ead8be29b0979be48b
BLAKE2b-256 283232840d41ac77371673770cee729c3dfbf8266c090998653cd80449e84355

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpm_torch-0.2.0.tar.gz:

Publisher: python-publish.yml on experimaestro/xpm-torch

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

File details

Details for the file xpm_torch-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: xpm_torch-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 54.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xpm_torch-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74e6191d84dcb908c4d45be9f0bddd84658067e9a765716949f6d234acfcc2a6
MD5 ae4d065e2eb4d10bb42cb5dabd6f9c9c
BLAKE2b-256 6b6b9e79b8d2bdd3a961029e5f9d4c26b1a7e32c7276e3a33abc544a3be61870

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpm_torch-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on experimaestro/xpm-torch

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