Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

logging_granuarity_test.py 545 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  1. #!/usr/bin/env python
  2. import os
  3. import time
  4. import random
  5. import wandb
  6. wandb.init()
  7. with open(f'{wandb.run.dir}/0.txt', 'w') as f:
  8. print('asdf', file=f)
  9. for i in range(3):
  10. # test support for file renaming. should be a unit test
  11. os.rename(f'{wandb.run.dir}/{i}.txt', f'{wandb.run.dir}/{i+1}.txt')
  12. for j in range(10):
  13. loss = random.random()
  14. wandb.run.history.add({'mb-loss': loss, 'loss': loss, 'mb': j, 'ep': i})
  15. time.sleep(1)
  16. loss = random.random()
  17. wandb.run.history.add({'ep-loss': loss, 'loss': loss, 'ep': i})
  18. time.sleep(1)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...