Skip to content

Commit

Permalink
Fix the deep scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
vanpelt committed Nov 1, 2019
1 parent 6161ff2 commit 44b682d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ludwig/contribs/wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import logging
import os
from datetime import datetime


logger = logging.getLogger(__name__)
Expand All @@ -42,29 +41,33 @@ def import_call(argv, *args, **kwargs):
"Ignored --wandb: Please install wandb; see https://docs.wandb.com")
return None

def train_model(self, model, *args, **kwargs):
@staticmethod
def train_model(model, *args, **kwargs):
import wandb
logger.info("wandb.train_model() called...")
config = model.hyperparameters.copy()
del config["input_features"]
del config["output_features"]
wandb.config.update(config)

def train_init(self, experiment_directory, experiment_name, model_name,
@staticmethod
def train_init(experiment_directory, experiment_name, model_name,
resume, output_directory):
import wandb
logger.info("wandb.train_init() called...")
wandb.init(project=os.getenv("WANDB_PROJECT", experiment_name),
sync_tensorboard=True, dir=output_directory)
wandb.save(os.path.join(experiment_directory, "*"))

def visualize_figure(self, fig):
@staticmethod
def visualize_figure(fig):
import wandb
logger.info("wandb.visualize_figure() called...")
if wandb.run:
wandb.log({"figure": fig})

def predict_end(self, stats, *args, **kwargs):
@staticmethod
def predict_end(stats, *args, **kwargs):
import wandb
logger.info("wanbb.predict() called... %s" % stats)
if wandb.run:
Expand Down

0 comments on commit 44b682d

Please sign in to comment.