Skip to content

Commit 38d2499

Browse files
committed
Set up logging to wandb, must add WANDB_API through secrets
1 parent a6b436c commit 38d2499

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Results/
55
Experiments/
66
_build/
77
bin/
8+
wandb/
9+
wandb_api.py
810

911
# Byte-compiled / optimized / DLL files
1012
__pycache__/

main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def main():
116116
print("Dry run completed successfully.")
117117
exit(0)
118118

119-
wandb.init(project="", tags=[])
119+
wandb.login(key=WANDB_API)
120+
wandb.init(entity="ColabCode",project="Jan", tags=[args.modelname, args.dataset])
120121
wandb.watch(model)
121122

122123
for epoch in range(args.epoch):
@@ -147,7 +148,7 @@ def main():
147148
for x, y in tqdm(valiloader, desc="Validation"):
148149
x, y = x.to(device), y.to(device)
149150
logits = model.forward(x)
150-
loss = criterion(y, logits)
151+
loss = criterion(logits, y)
151152
evalloss.append(loss.item())
152153

153154
preds = th.argmax(logits, dim=1)

0 commit comments

Comments
 (0)