Skip to content

Commit

Permalink
update front-face
Browse files Browse the repository at this point in the history
  • Loading branch information
HamidrezaKmK committed Jun 18, 2023
1 parent 2f040cc commit e9a2f3e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 7 deletions.
34 changes: 30 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
# DySweep: Use W&B Sweep for Everything!
# Dysweep

![PyPI](https://img.shields.io/badge/PyPI-Compatible-green?style=for-the-badge&logo=PyPI)

Dysweep is an innovative Python library designed to extend and enhance the functionalities of the [Weights and Biases (WandB) sweep library](https://docs.wandb.ai/guides/sweeps). Dysweep is built with the belief that an entire experiment should be executable through a configuration dictionary, whether it's formatted as a YAML or JSON file.

## Features

Dysweep introduces two major enhancements:

### Checkpointing for the Sweep Server

Dysweep introduces checkpointing for the sweep server, which becomes extremely beneficial when dealing with preemptions or specific bugs that can interrupt the sweep process. This feature ensures that even if a sweep is running on a machine that may preempt the tasks or if certain configurations encounter specific bugs, the sweep process can resume from a checkpoint directory. Unlike the original WandB sweep, where a lost configuration is ignored by the WandB agent function, Dysweep overlays an API on top of this agent function, thereby enabling certain runs to resume. This is especially useful when only a small fraction of runs fail, thus eliminating the need to re-run the entire sweep.

### Running Sweeps Over Hierarchies

Perhaps the most significant capability of Dysweep is its ability to run sweeps over hierarchically structured parameters. The original WandB sweep configuration is limited to flat parameter sets. However, deep learning experiments often demand more complex, nested sets of configurations. Dysweep enables this, effectively eliminating the need for hard-coding the selection between different classes with primitive methods. Instead, you can define a new YAML that automatically selects between class types and initialization arguments, streamlining the setup process and making it more robust.

Dysweep is inspired by [DyPy](https://github.com/vahidzee/dypy), a library used for deep learning experimentation, and mirrors its vision of facilitating fully generic configuration YAML files that encapsulate code snippets. Hence, Dysweep offers a versatile configuration set that empowers you to define experiments at any layer of abstraction.

## Applications

Dysweep is envisioned to particularly facilitate the following applications:

1. **Large Scale Hyper Parameter Tuning**: Dysweep is geared towards conducting large scale hyper parameter tuning not just within the confines of a specific model, but across various models and methods. This functionality paves the way for a more comprehensive and detailed study of the effects of hyperparameters.

2. **Running Models Over Different Configurations and Datasets**: Once a model is ready, Dysweep enables it to run over a multitude of configurations and datasets. It provides a systematic way to define a sweep in WandB, allowing every experiment to run in parallel across different machines. This significantly eases the process of large-scale computing and data gathering for a particular model.

## Installation

```bash
You can install the Dysweep library through [PyPi](https://pypi.org/project/dysweep/) using the following command:

```shell
pip install dysweep
```

## Usage
2 changes: 1 addition & 1 deletion dysweep/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .parallel import dysweep_run_resume, ResumableSweepConfig
from .wandbX import hierarchical_config

__version__ = "0.0.8"
__version__ = "0.0.9"
16 changes: 16 additions & 0 deletions readme_pypi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Dysweep

Dysweep is a Python library enhancing the functionalities of the [Weights and Biases sweep library](https://docs.wandb.ai/guides/sweeps). It allows entire experiments to be executed using a configuration dictionary (YAML/JSON).

## Features

- **Checkpointing for the Sweep Server**: Dysweep introduces checkpointing that allows resuming certain runs, useful when only a small fraction of runs fail, eliminating the need to re-run the entire sweep.

- **Running Sweeps Over Hierarchies**: Dysweep supports hierarchically structured parameters, thereby eliminating the need for hard-coding the selection between different classes.

Dysweep is inspired by [DyPy](https://github.com/vahidzee/dypy), offering a versatile configuration set that empowers defining experiments at any layer of abstraction.

## Applications

Dysweep aids in large-scale hyperparameter tuning across various models/methods and running models over different configurations and datasets. It provides a systematic way to define a sweep in WandB, allowing parallel execution of experiments.

5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
from setuptools import setup, find_packages
from dysweep import __version__

with open("README.md", encoding="utf-8") as f:
with open("readme_pypi.md", encoding="utf-8") as f:
long_description = f.read()

setup(
name="dysweep",
packages=find_packages(include=["dysweep", "dysweep.*"]),
version=__version__,
license="Apache License 2.0",
description="A toolset for dynamic python code manipulations",
description="Use Weights and Biases Sweeps for Dynamic Configuration generation.",
long_description=long_description,
long_description_content_type="text/markdown",
author="Hamid Kamkari",
author_email="[email protected]",
url="https://github.com/HamidrezaKmK/dysweep",
keywords=[
"dynamic configurations",
"large scale experiments",
"deep learning",
"sweeps",
"hyperparameter tuning",
Expand Down

0 comments on commit e9a2f3e

Please sign in to comment.