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.1.9.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.1.9-py3-none-any.whl (54.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xpm_torch-0.1.9.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.1.9.tar.gz
Algorithm Hash digest
SHA256 2f2d09e6b4ff25eef05f8fb890494681f82dcf98933903fdade6d500f3b744b3
MD5 c1007f9c959da4f0458b47501a2edec4
BLAKE2b-256 960f6f20395de93be1c29e66bd6d561385d87bf61f7ebcabc21882bb3a24a20d

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpm_torch-0.1.9.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.1.9-py3-none-any.whl.

File metadata

  • Download URL: xpm_torch-0.1.9-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.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 04f951ab5eb9ad4714b80a11085f3fefb0f08eb4fdb4b5900a0ed90d9c76309c
MD5 32771a0939e21204761e92efa1e216a3
BLAKE2b-256 65079f71913a66016b2759477b7a97522d54f41c72459e0d69cd0bd44f1c44f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpm_torch-0.1.9-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