Reproduce experiments ↗
noOriginal Documentation
Documentation Index#
Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt Use this file to discover all available pages before exploring further.
Reproduce an experiment that a team member creates to verify and validate their results.
Before you reproduce an experiment, you need to make note of the:
- Name of the project the run was logged to
- Name of the run you want to reproduce
To reproduce an experiment:
- Navigate to the project where the run is logged to.
- Select the Workspace tab from the project sidebar.
- Click the run that you want to reproduce. The run page opens with the Overview tab shown by default.
To continue, download the experiment’s code at a given hash or clone the experiment’s entire repository.
Download the experiment’s Python script or notebook:
- On the Overview tab (shown by default), in the Command field, make a note of the name of the script that created the experiment.
- Select the Code tab on the run page.
- Click Download next to the file that corresponds to the script or notebook.
Clone the GitHub repository your teammate used when creating the experiment. To do this:
- If necessary, gain access to the GitHub repository that your teammate used to create the experiment.
- Copy the Git repository field, which contains the GitHub repository URL.
- Clone the repository:
git clone https://github.com/your-repo.git && cd your-repo ``` - Copy and paste the Git state field into your terminal. The Git state is a set of Git commands that checks out the exact commit that your teammate used to create the experiment. Replace values specified in the following code snippet with your own:
git checkout -b "<run-name>" 0123456789012345678901234567890123456789 ```
On the run page, select the Files tab.
Download the
requirements.txtfile and store it in your working directory. This directory should contain either the cloned GitHub repository or the downloaded Python script or notebook.(Recommended) Create a Python virtual environment.
Install the requirements specified in the
requirements.txtfile.pip install -r requirements.txtNow that you have the code and dependencies, you can run the script or notebook to reproduce the experiment. If you cloned a repository, you might need to navigate to the directory where the script or notebook is located. Otherwise, you can run the script or notebook from your working directory.
If you downloaded a Python notebook, navigate to the directory where you downloaded the notebook and run the following command in your terminal:
jupyter notebook
```
<span class="tab-end"></span>
<span class="tab-start" data-tab-title="Python script"></span>
If you downloaded a Python script, navigate to the directory where you downloaded the script and run the following command in your terminal; Replace values enclosed in `<>` with your own:
```bash
python <your-script-name>.py
```
<span class="tab-end"></span>
<span class="tab-group-end"></span>