Skip to content

Removes redunant variables from code blocks in add-w-and-b-to-your-code.md #1187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
8 changes: 4 additions & 4 deletions content/guides/models/sweeps/add-w-and-b-to-your-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def evaluate_one_epoch(epoch):


def main():
run = wandb.init()
wandb.init()

# note that we define values from `wandb.config`
# instead of defining hard values
Expand Down Expand Up @@ -200,7 +200,7 @@ def main():
with open("./config.yaml") as file:
config = yaml.load(file, Loader=yaml.FullLoader)

run = wandb.init(config=config)
wandb.init(config=config)

# Note that we define values from `wandb.config`
# instead of defining hard values
Expand Down Expand Up @@ -315,7 +315,7 @@ def train():
def main():
wandb.init(entity="<entity>", project="my-first-sweep")
val_metrics = train()
wandb.log({"val_loss", val_metrics["val_loss"]})
wandb.log({"val_loss": val_metrics["val_loss"]})


sweep_configuration = {
Expand All @@ -330,4 +330,4 @@ sweep_configuration = {
sweep_id = wandb.sweep(sweep=sweep_configuration, project="my-first-sweep")

wandb.agent(sweep_id, function=main, count=10)
```
```