Skip to main content

Organize your research project like a pro with Deepboard

Project description

Deepboard

This package include two modules that are work together: deepboard gui and resultTable. The resultTable module keeps track of all of your experiment and helps you organize your code to make results reproducible. The deepboard gui module implement a webUI to visualize the training details and training curves of any runs. In addition, it lets you commpare training curves between runs. You can even download the charts that you have generated:)

🔥 Screenshots 🔥

🌟 Project Philosophy

Before diving in, it’s important to understand the philosophy behind this project. In deep learning, it’s easy to get swept up in the excitement — experimenting with countless configurations in search of the perfect setup. 🔬✨ Eventually, we stumble upon something that works well... only to keep tweaking and lose track of what actually worked best. This package is built to help you stay focused, organized, and efficient — so you never lose track of that perfect combination again. 🧠✅

The idea is simple: always make your code reproducible! Sure, easier said than done... 😅 My recommended approach is to use a multi-level configuration system. Let me explain how it works! 👇

Before jumping into experiments, we usually know the minimal set of parameters required for a project to run. For instance, if you're training a Transformer model, you already know you'll need to specify things like the number of layers, number of attention heads, learning rate, and so on. All these known parameters can (and should) be stored in a configuration file — I personally prefer using YAML for its readability. 📄 When running the experiment, we simply load this config file and use it to parameterize each part of the code. Usually, the parameters stored in the config gives us the baseline.

Once we’ve established a baseline, it’s natural to want to improve it — whether it's by testing out a new technique from a paper or an idea that came to us in a dream. 🚀 But here's the challenge: how do we add new functionality to our code without breaking compatibility with earlier runs? In other words, if we use the same config file and script parameters, we should still get the exact same results as before. My solution? Add new parameters to functions with sensible default values — specifically, defaults that reflect the original behavior. You can then include these parameters in your configuration file and toggle them on or off to test their effect. For example, say you’re building an image classifier and want to try MixUp. Your training function might look like this:

def train_model(..., use_mixup: bool = False):
    ...

By setting the default to False, your baseline run remains intact. Only when use_mixup is explicitly set to True will the new logic kick in. This approach ensures clean, reproducible experimentation with minimal disruption. ✅

Sometimes, we don’t want to modify the configuration file directly — for example, when we've decided that a particular config represents a fixed setup for a specific model or training strategy. In these cases, it's often more convenient to override a few parameters via the command line. 🧪 To do this, I use Python’s built-in argparse module. It adds an extra layer of configuration that’s ideal for quick experiments — without changing the original YAML file. And just like before, the same principle applies: always use default values that reproduce the results of previous runs. This ensures your experiments stay flexible and reproducible. 🔁

This project promotes a simple but powerful principle: make your deep learning experiments reproducible — without slowing down iteration or innovation. To achieve that, it recommends a multi-level configuration system:

  1. YAML Configuration Files – Store all known parameters for a clean, reproducible baseline. 📄
  2. Function Defaults – Add new features with default values that preserve past behavior. This ensures that re-running with the same config and cli parameters always gives the same result. ✅
  3. CLI Overrides – For quick tweaks, use cli parameters to add new functionalities or to override config's parameters without editing the base config. Perfect for fast experimentation. 🧪

This layered setup keeps your workflow organized, traceable, and easy to extend, so you can explore new ideas without losing sight of what actually works. 🔁

If you're feeling a bit overwhelmed or would like a project example, the torchbuilder app can generate various project templates. The default template implements this philosophy, including the resultTable, making it a great starting point! 🚀

🛠️ Installation

To install only the resultTable module, which allows you to log your results inside a single file, you can run:

pip install deepboard

To also install the GUI module, which allows you to visualize your results in a web UI, you can run:

pip install deepboard[full]

🚀 How to Use

For your project, you will only need the resultTable module, as the deepboard module is primarily for the UI.

ResultTable

First, import the ResultTable class from deepboard.resultTable, then create a new run. You can also create a debug run. A debug run will be logged in the result table like any other run, but all results will be overwritten by the next debug run. This helps keep the result table clean by containing only the runs you intend to test, rather than those meant solely for verifying if the code executed correctly.

Note: Debug runs always have a runID of -1. 🔧

from deepboard.resultTable import ResultTable
    
rtable = ResultTable("results/resultTable.db")
if DEBUG:
    resultSocket = rtable.new_debug_run("Experiment1", "path/to/config", cli=vars(args).copy())
else:
    resultSocket = rtable.new_run("Experiment1", "path/to/config", cli=vars(args).copy())

Next, you can specify hyperparameters that will appear in the table

resultSocket.add_hparams(
        lr=config["training"]["learning_rate"],
        wd=...,
        min_lr=...,
        dropout2d=...,
        dropout=...
    )

During training, we can log scalars associated to the run with:

resultSocket.add_scalar(f'Train/Accuracy', 0.99, step)

Finally, you can log the final evaluation results that will be included into the table with:

resultSocket.write_result(accuracy=final_accuracy, crossEntropy=final_loss)

Note: If you want to do multiple training iterations of the same run (to test variance for example), you can call the resultSocket.new_repetition method after each repetition.

for rep in range(number_of_repetitions):
    for epoch in range(n_epochs):
        ... # Train here
    resultSocket.new_repetition()

# Finally, write the final results once:
resultSocket.write_result(accuracy=accuracies.mean(), crossEntropy=losses.mean())

Deepboard UI

To launch deepboard Web UI, simply run the command deepboard in your terminal with the path to your resultTable db:

deepboard /path/to/resultTable.db

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

deepboard-0.2.0.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

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

deepboard-0.2.0-py3-none-any.whl (68.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deepboard-0.2.0.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for deepboard-0.2.0.tar.gz
Algorithm Hash digest
SHA256 87cd00e981becefaea290daffa35fc28ad3293af9adead55d70637659bffd1f4
MD5 a34923ff03705f46299ba6878534bcd8
BLAKE2b-256 b346d4b074c35cd19f25ac924762c676f60e025fceab4e0c5ea938b451e382b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deepboard-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 68.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for deepboard-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a58730d969a18a96e41ec6e3c7b30e44bc7be450af02c90b2a4ab86c71b3a48e
MD5 dec40d83cd3c8cadb5ca123167c9cbad
BLAKE2b-256 4627da15d0389f18214facd7e352da94e6aa9df6dbf0f13374746589599f96ae

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