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

sweep.py 594 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. import wandb
  2. import argparse
  3. import json
  4. import yaml
  5. parser = argparse.ArgumentParser()
  6. parser.add_argument("--yaml", required=True)
  7. parser.add_argument("--count", default=10, type=int)
  8. parser.add_argument("--project", default="FSL-SSL")
  9. parser.add_argument("--gpu", required=True)
  10. args = parser.parse_args()
  11. with open(args.yaml) as file:
  12. sweep_config = yaml.safe_load(file)
  13. sweep_config["parameters"]["device"] = {"values": [args.gpu]}
  14. # print(sweep_config)
  15. sweep_id = wandb.sweep(sweep_config, entity="meta-learners", project = args.project)
  16. wandb.agent(sweep_id, count=args.count)
Tip!

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

Comments

Loading...