Skip to main content

Mode Rage python client

Project description

# Mode Rage client

[![PyPI version](https://badge.fury.io/py/moderage-python.svg)](https://badge.fury.io/py/moderage-python)

## What is ModeRage

ModeRage is a light-weight tool for storing experimental results and models. Experiments are referenced by their
*metacategory* and *id*.

### Meta Categories

Experiments in ModeRage have a meta-category, which basically defines the *type* of experiment.
Think of meta-categories as an identifier for a project that may contain many experiments or datasets of the same type.

For example, when running many experiments with several sets of hyperparameters, those experiments will be saved into
the same meta-category.

### Ids

Once an experiment is saved it has an *id*. This can be used to load the experiment.

## Configuration

ModeRage can be started in `local` or `server` mode.

### Local

In local mode, ModeRage will save files locally to a `~/.moderage` folder

### Server

The ModeRage Server hosts experiments, data and metadata so it can be access from anywhere.

You can view it here (CURRENTLY UNDER DEVELOPMENT):
[Server](https://gitlab.com/chrisbam4d/modage-backend)

#### UI

The ModeRage UI communicates with the ModeRage server and allows browsing of experiments and data

You can view it here (CURRENTLY UNDER DEVELOPMENT):
[UI](https://gitlab.com/chrisbam4d/moderage-ui)

## Configuration file

Configuration in ModeRage is defined in a `.mrconfig` file. If no config file is created,
ModeRage will automatically start in `local` Mode

## Saving results

To save any number of files with some meta data you do the following:

### 1. Define a Meta object

```python
mymeta = {
'hyperparameter1': 100,
'hyperparameter2': 200,
'hyperparameter3': 0.7,
}
```

### 2. (Optional) Define any files you want to upload

```python
myfiles = [
{
'filename': './path/to/myfile.csv',
'caption': 'This is my file that contains my results'
},
{
'filename': './path/to/mygraph.png',
'caption': 'This is my file that contains my graph'
},
...
]
```

### 4. (Optional) Reference any other experiments that this experiment is dependent on.

In many situations your experiment may rely on generated datasets or pre-trained models that also have many hyper-parameters.
You can reference those `parent` experiments by adding them to the parent object

```python
myparents = [
{
'id': [THE ID OF THE PARENT EXPERIEMENT],
'metaCategory': 'generated_dataset'
},
{
'id': [THE ID OF THE PARENT EXPERIEMENT],
'metaCategory': 'pretrained_model'
}
]
```

### 5. Call `save`

```python
experiment = mr.save('category_name', mymeta, files=myfiles)
```

## Loading results

Loading a saved experiment is simple, you just need to know the *meta-category* and the *id* of the experiment.

```python
experiment = mr.load(id, meta_category)
```

Once the experiment is loaded, the meta information and files from the experiment can be accessed.

For example:
```python
meta = experiment.meta
parents = experiment.parents
files = experiment.files

file = experiment.get_file('mygraph.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

moderage-python-0.1.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

moderage_python-0.1.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file moderage-python-0.1.1.tar.gz.

File metadata

  • Download URL: moderage-python-0.1.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2

File hashes

Hashes for moderage-python-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a5dc139a593600f2051cb3727bafcf01ee4e69522e2d1e568a7a4b9f94d13d79
MD5 8c1f90fecc0d26bb591b7530678320be
BLAKE2b-256 609af4478cad790dc70431dbc4ee9f08bc6de6f16278169b95395334e3559c54

See more details on using hashes here.

File details

Details for the file moderage_python-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: moderage_python-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2

File hashes

Hashes for moderage_python-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d2e5cd49277de842f69e225a64ef31b9ad28035faf63d2250ebb5566114a697
MD5 3f49a7cc455e9c84eb267b3ea49efe59
BLAKE2b-256 8d0d0712029d0df361fa30ff320cff89d3920cb17bbe434267b4dc64556974be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page