wandb / wandb

🔥 A tool for visualizing and tracking your machine learning experiments. This repo contains the CLI and Python API.
https://wandb.ai
MIT License
8.59k stars 634 forks source link

[Feature]: Allow to set the seed to initialize sweeps #5582

Open fantauzzi opened 1 year ago

fantauzzi commented 1 year ago

Description

Would like to be able to set the seed for the random number generator that will be used by a sweep, to generate the sequence of parameter values, useful with random search and Bayes search.

Suggested Solution

In the sweep configuration, allow an optional configuration key seed.

Alternatives

A workaround to make do without that feature could be to to start all the sweeps from the same existing run, using the given run to seed the sweeps. See https://docs.wandb.ai/guides/sweeps/existing-project

The workaround could work if, given the seeding run, the ensuing sweeps are deterministic (are always the same). I don't know if that is the case, as I haven't tried.

In my case, that is not a practical workaround anyway because I am starting the sweeps from a Python program, not from the UI and the CLI.

Additional Context

Easily reproducible sweeps help debugging, and also allow to easily compare the performance of running the sweep on different h/w configurations, such as different CPUs, GPUs and clusters of GPUs.

umakrishnaswamy commented 1 year ago

Hey @fantauzzi,

I made a note of this and our engineering team will be looking into this soon. I'll let you know when there's an update.

Best,

Uma

ffelten commented 1 year ago

👍 on this

umakrishnaswamy commented 1 year ago

@ffelten Will make a note that you're interested in this feature too!

exalate-issue-sync[bot] commented 1 month ago

WandB Internal User commented: umakrishnaswamy commented: Hey @fantauzzi,

I made a note of this and our engineering team will be looking into this soon. I'll let you know when there's an update.

Best,

Uma