updates to new neptune

This commit is contained in:
Mayank Mittal 2023-12-11 12:02:31 +01:00
parent cde1e87a19
commit 0dc9544952
1 changed files with 2 additions and 2 deletions

View File

@ -8,14 +8,14 @@ from dataclasses import asdict
from torch.utils.tensorboard import SummaryWriter
try:
import neptune.new as neptune
import neptune
except ModuleNotFoundError:
raise ModuleNotFoundError("neptune-client is required to log to Neptune.")
class NeptuneLogger:
def __init__(self, project, token):
self.run = neptune.init(project=project, api_token=token)
self.run = neptune.init_run(project=project, api_token=token)
def store_config(self, env_cfg, runner_cfg, alg_cfg, policy_cfg):
self.run["runner_cfg"] = runner_cfg