Skip to main content

Track and visualize your experiments

Project description

https://img.shields.io/badge/python-%3E%3D%203.5-blue

Introduction

XPipe is a library that I started developping in December 2020 for my personal use. As it might be useful for other people, I decided to publish the code as an open source project.

XPipe focuses on two principal components to make Data Science easier:

  • Configuration files are a big concern in data science field and there is no standard today. XPipe facilitates your work by automatically loading python objects from a yaml configuration. You can also easily include other yaml files into another.

  • Experiment tracking: The web interface enables you to easily organize your experiments into folders, to filter them and to plot different kind of graphs. You will particularly appreciate the library if you deal with a lot of experiments.

The philosophy behind the project is to be simple and customizable.

As a team, you can run a single XPipe server for everyone. It will promote exchange as everyone can easily share their work with others.

Getting started

pip install xpipe

Documentation (work in progress): https://x-pipe.readthedocs.io/en/latest/#

Configuration files

Here is a simple example of how to use yaml configuration files to seamlessly load needed objects to run your experiments.

training:
  gpu: !env CUDA_VISIBLE_DEVICES # Get the value of env variable CUDA_VISIBLE_DEVICES
  epochs: 18
  batch_size: 100

  optimizer:
    !obj torch.optimSGD : {lr : 0.001}

  scheduler:
    !obj torch.optim.lr_scheduler.MultiStepLR : {milestones: [2, 6, 10, 14]}

  loss:
    !obj torch.nn.BCELoss : {}

model: !include "./models/my_model.yaml"

transforms:
  - !obj transforms.Normalize : {}
  - !obj transforms.Noise : {}
  - !obj transforms.RandomFlip : {probability: 0.5}

Then you can load the configuration file:

from xpipe.config import load_config

conf = load_config("my_config.yaml")
epochs = conf.training.epochs() # 18

# Instantiate your model defined in models/my_model.yaml
my_model = conf.model()

# Directly instantiate your optimizer and scheduler from configuration
# Note that you can add argument that are not in the configuration file
optimizer = conf.training.optimizer(params=my_model.parameters())
scheduler = conf.training.scheduler(optimizer=optimizer)

Experiment tracking

This feature is still experimental.

You have two options to start the server:

  1. Run the server from the commandline. You must host a MongoDB server instance.

xpipe --db_host <db_ip_address> --db_port <db_port> --port <server_port> --artifacts-dir <artifacts_dir>
  1. Run directly the docker image (no other dependancies needed)

docker pull drosos/xpipe:0.1.5
docker run -v <data_dir>:/data -p <server_port>:80 drosos/xpipe:0.1.5

The <data_dir> directory will contain the mongodb database and artifacts.

Then you can connect to http://127.0.0.1:<server_port> to access the web interface.

https://raw.githubusercontent.com/Scotchy/XPipe/main/docs/images/gui1.png

If you open an experiment, you can get some details and results:

https://raw.githubusercontent.com/Scotchy/XPipe/main/docs/images/gui2.png

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

Traxer-0.2.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

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

Traxer-0.2.0-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Traxer-0.2.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.50.2 importlib-metadata/4.11.2 keyring/21.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

File hashes

Hashes for Traxer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 44e2b629cc3f870d1f45d6e7dbb9a6c055e4804b5f800a5d2115497ecec1a7cb
MD5 a0149e9716350052d8dec63bf84af2ca
BLAKE2b-256 a98b6e5f8f0c5a4f223791808c81ad9dfcd779eaf179ba478901213b42fa9fac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Traxer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.50.2 importlib-metadata/4.11.2 keyring/21.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

File hashes

Hashes for Traxer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9079878819f9a1483f46893249d5a2b9709df11baf8e4d755c691e2a3bf7ad8c
MD5 3fff4054cd328fa5ab48757d492fd04b
BLAKE2b-256 7d2dada8984f9f95f8bc7fc34b519a63c7b945ee04695b625fee1e5b57ba01ad

See more details on using hashes here.

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