> ## 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 experiments

> Reproduce a teammate's W&B experiment by downloading the associated code, dependencies, and configuration from a run.

Reproduce an experiment that a team member creates to verify and validate their results. You can reproduce the experiment by either cloning the GitHub repository that your teammate used to create the experiment or by downloading the Python script or notebook that created the experiment. Choose the option that works best for you.

Obtain the code that created the experiment and the dependencies required to run the code. You can do this by following the steps below.

<Tabs>
  <Tab title="Replicate code state with GitHub repository">
    The following steps show you how to replicate the code state of the GitHub repository:

    1. Navigate to the project where the run is logged to.
    2. Select the **Workspace** tab from the project sidebar.
    3. Click the run that you want to reproduce. The run page opens with the **Overview** tab shown by default.
    4. Hover your mouse over the **Reproduce this run** button next to the **Command** field. A modal appears with steps to reproduce the experiment. It describes how to set up the code state and the command to run the experiment.

           <img src="https://mintcdn.com/wb-21fd5541/NTXQs1uMiOLpXhX0/images/experiments/reproduce_run_button.png?fit=max&auto=format&n=NTXQs1uMiOLpXhX0&q=85&s=b8d0b0aea732b4a852b2ba38d2500bd1" alt="Reproduce run button" width="500" data-path="images/experiments/reproduce_run_button.png" />

    Alternatively, you can manually reproduce an experiment with the following steps:

    1. Copy and paste the **Git repository** field into your terminal to clone the repository. The following code snippet shows an example. Replace `your-repo` with the name of your repository:
       ```bash theme={null}
       git clone https://github.com/your-repo.git && cd your-repo
       ```
    2. Copy and paste the **Git state** field into your terminal to checkout the exact commit that your teammate used to create the experiment. The following code snippet shows an example of how to do this. Replace values specified in the following code snippet with your own:
       ```bash theme={null}
       git checkout -b "<run-name>" 0123456789012345678901234567890123456789
       ```
  </Tab>

  <Tab title="Download source code">
    The following steps show you how to download the Python script or notebook that created the experiment:

    1. Navigate to the project where the run is logged to.
    2. Select the **Workspace** tab from the project sidebar.
    3. Click the run that you want to reproduce. The run page opens with the **Overview** tab shown by default.
    4. On the **Overview** tab (shown by default), in the **Command** field, make a note of the name of the script that created the experiment.
    5. Select the **Code** tab on the run page.
    6. Click **Download** next to the file that corresponds to the script or notebook.
    7. On the run page, select the **Files** tab.
    8. Download the `requirements.txt` file and store it in your working directory. This directory should contain either the cloned GitHub repository or the downloaded Python script or notebook.
    9. Install the requirements specified in the `requirements.txt` file.
       ```bash theme={null}
       pip install -r requirements.txt
       ```
  </Tab>
</Tabs>
