def __init__(self, learn, log='gradients', save_model=True, monitor=None, mode='auto', input_type=None, validation_data=None, predictions=36, seed=12345):
    if (wandb.run is None):
        raise ValueError('You must call wandb.init() before WandbCallback()')
    if (monitor is None):
        super().__init__(learn, mode=mode)
    else:
        super().__init__(learn, monitor=monitor, mode=mode)
    self.save_model = save_model
    self.model_path = (Path(wandb.run.dir) / 'bestmodel.pth')
    self.log = log
    self.input_type = input_type
    self.best = None
    self.validation_data = validation_data
    if (input_type and (not self.validation_data)):
        wandbRandom = random.Random(seed)
        predictions = min(predictions, len(learn.data.valid_ds))
        indices = wandbRandom.sample(range(len(learn.data.valid_ds)), predictions)
        self.validation_data = [learn.data.valid_ds[i] for i in indices]
def __init__(self, learn, log='gradients', save_model=True, monitor=None, mode='auto', input_type=None, validation_data=None, predictions=36, seed=12345):
    if (wandb.run is None):
        raise ValueError('You must call wandb.init() before WandbCallback()')
    if (monitor is None):
        super().__init__(learn, mode=mode)
    else:
        super().__init__(learn, monitor=monitor, mode=mode)
    self.save_model = save_model
    self.model_path = (Path(wandb.run.dir) / 'bestmodel.pth')
    self.log = log
    self.input_type = input_type
    self.best = None
    self.validation_data = validation_data
    if (input_type and (not self.validation_data)):
        wandbRandom = random.Random(seed)
        predictions = min(predictions, len(learn.data.valid_ds))
        indices = wandbRandom.sample(range(len(learn.data.valid_ds)), predictions)
        self.validation_data = [learn.data.valid_ds[i] for i in indices]