Commit ae6daf03 authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Fixing broken tests

parent fcab0654
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -332,17 +332,6 @@ def write_dataset_single(val, data_dir, feature_types=None, tasks=None,
  else:
    ids, X, y, w = raw_data
    df_file = ""
    # Some shape sanity checks
    print("write_dataset_single")
    print("X.shape")
    print(X.shape)
    print("y.shape")
    print(y.shape)
    print("w.shape")
    print(w.shape)
    print("ids.shape")
    print(ids.shape)
    print("-------------")
    assert X.shape[0] == y.shape[0]
    assert y.shape == w.shape
    assert len(ids) == X.shape[0]
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ class TestFeaturizedSamples(unittest.TestCase):
    input_file = "../../models/test/example.csv"
    train_samples, test_samples = (
        self._featurize_train_valid_test_split(
            splittype, input_file, tasks), frac_train=.8,
            splittype, input_file, tasks, frac_train=.8,
            frac_valid=0, frac_test=.2))
    assert len(train_samples) == 8
    assert len(test_samples) == 2
+1 −8
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ class SingletaskToMultitask(Model):
        os.makedirs(task_model_dir)
      log("Initializing model for task %s" % task,
          self.verbosity, "high")
      self.models[task] = model_builder(task_types, model_params,
      self.models[task] = model_builder([tasks], task_types, model_params,
                                        task_model_dir,
                                        verbosity=verbosity)
      
@@ -62,13 +62,6 @@ class SingletaskToMultitask(Model):
      y_pred[:, ind] = self.models[task].predict_on_batch(X)
    return y_pred

#  def predict(self, dataset, transformers):
#    """
#    Generate predictions of models on dataset.
#    """
#    task_names = sorted(dataset.get_task_names())
#    pred_y_df = self._create_prediction_datafram(dataset) 
#
  def save(self):
    """Save all models"""
    for task in self.tasks:
+0 −3
Original line number Diff line number Diff line
@@ -97,9 +97,6 @@ class TestAPI(unittest.TestCase):
                                  user_specified_features=None,
                                  split_field=None,
                                  shard_size=100):
    print("_featurize_train_test_split")
    print("tasks")
    print(tasks)
    # Featurize input
    featurizers = compound_featurizers + complex_featurizers