MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / __init__

Method __init__

callbacks/wandb_callback.py:7–14  ·  view source on GitHub ↗
(self, experiment_name, config_path, entity)

Source from the content-addressed store, hash-verified

5class WandBCallback(Callback):
6
7 def __init__(self, experiment_name, config_path, entity):
8 self.experiment_name=experiment_name
9 # loading the config file like this and giving it to wandb stores them on the website
10 with open(config_path, 'r') as j:
11 cfg = hjson.loads(j.read())
12 # Before this init can be run, you have to use wandb login in the console you are starting the script from (https://docs.wandb.ai/ref/cli/wandb-login, https://docs.wandb.ai/ref/python/init)
13 # entity= your username
14 wandb.init(project=experiment_name, entity=entity,config = cfg)
15
16
17 def after_forward_pass(self, phase, loss, loss_kl, **kwargs):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected