Skip to main content

Marcelle - Python Package

A python package for interacting with a Marcelle backend from python.

See: http://marcelle.dev

Status ⚠️

Marcelle is still experimental and is currently under active development. Breaking changes are expected.

Installing

pip install .

Basic Usage

Keras Callback

from marcelle import MarcelleCallback

mrc_callback = KerasCallback(
    backend_root="http://localhost:3030",
    disk_save_formats=["h5", "tfjs"],
    remote_save_format="tfjs",
    model_checkpoint_freq=None,
    base_log_dir="marcelle-logs",
    run_params={},
)

model.fit(
  # ...
  callbacks = [
    mrc_callback,
    # other callbacks
  ]
)

Writer (for custom training loops)

from marcelle import Writer

writer = Writer(
    backend_root="http://localhost:3030",
    disk_save_formats=["h5", "tfjs"],
    remote_save_format="tfjs",
    base_log_dir="marcelle-logs",
    source="keras",
)

writer.create_run(model, params, loss.name)
writer.train_begin(epochs)

for epoch in range(epochs):
  # ...
  logs = {
    "loss": 1.3,
    "accuracy": 0.7,
    "val_loss": 2.3,
    "val_accuracy": 0.52,
  }
  assets = ["path/to/asset1.wav", "path/to/asset2.wav"]
  self.writer.save_epoch(epoch, logs=logs, save_checkpoint=True, assets=assets)

writer.train_end(save_checkpoint=True)

Batch upload

Useful when training was done offline or connection to server failed during the training.

from glob import glob
import os
from marcelle import MarcelleRemote, MarcelleUploader


if __name__ == "__main__":
    LOG_DIR = "marcelle-logs"
    uploader = MarcelleUploader(
        MarcelleRemote(
            backend_root="http://localhost:3030",
            save_format="tfjs",
            source="keras",
        )
    )
    runs = [d for d in glob(os.path.join(LOG_DIR, "*")) if os.path.isdir(d)]
    for run in runs:
        uploader.upload(run)

✍️ Authors

Metadata

Release files for marcelle 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marcelle 0.0.5
File Size Uploaded Provenance Actions
marcelle-0.0.5.tar.gz 12.3 kB Without provenance Details for marcelle-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for marcelle 0.0.5
File Interpreter ABI Platform Actions
marcelle-0.0.5-py3-none-any.whl Python 3 none any Details for marcelle-0.0.5-py3-none-any.whl

Total release size: 26.4 kB

Release files / marcelle-0.0.5.tar.gz

Download URL marcelle-0.0.5.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
169f702513dc92d5ff6acde67bae2fb289ebb0439c99f952ac198dc3273f44f3
BLAKE2b-256 checksum
How to use checksums
1c211d16feb28d914cf7ee17306406ccc19f7a5333f323a1866a92a7740549ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.8.6 Darwin/20.6.0

Release files / marcelle-0.0.5-py3-none-any.whl

Download URL marcelle-0.0.5-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e56b21975fd519198b3bd5f434b1ac2a3c3de4aa2dd128784e0cccd244f9f4ba
BLAKE2b-256 checksum
How to use checksums
900e06d4575b5ffe0bcc141e12488576b1c05618572d54b86c3f7b51c85bbb41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.8.6 Darwin/20.6.0

Security for marcelle 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page