Commit 3197649d authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Deprecation warnings

parent 0a709a96
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
TODO(LESWING) Remove h5py dependency
TODO(LESWING) Remove keras dependency and replace with functional keras API
"""

import warnings
from deepchem.models import Model
from deepchem.models.autoencoder_models.model import MoleculeVAE
from deepchem.feat.one_hot import zinc_charset
@@ -38,6 +38,8 @@ class TensorflowMoleculeEncoder(Model):
    latent_rep_size: int
      How large a 1D Vector for latent representation
    """
    warnings.warn("Deprecated. Will be removed in DeepChem 1.4.",
                  DeprecationWarning)
    super(TensorflowMoleculeEncoder, self).__init__(
        model_dir=model_dir, verbose=verbose)
    weights_file = os.path.join(model_dir, weights_file)
+5 −0
Original line number Diff line number Diff line
import warnings
from keras import backend as K
from keras import objectives
from keras.layers import Input, Lambda
@@ -12,6 +13,10 @@ class MoleculeVAE():

  autoencoder = None

  def __init__(self):
    warnings.warn("Deprecated. Will be removed in DeepChem 1.4.",
                  DeprecationWarning)

  def create(self,
             charset_length,
             max_length=120,
+3 −1
Original line number Diff line number Diff line
@@ -58,7 +58,9 @@ class TensorflowMultiTaskIRVClassifier(TensorflowLogisticRegression):
      If not none, is used as random seed for tensorflow.        

    """

    warnings.warn("The TensorflowMultiTaskIRVClassifier is "
                  "deprecated. Will be removed in DeepChem 1.4.",
                  DeprecationWarning)
    self.n_tasks = n_tasks
    self.K = K
    self.n_features = 2 * self.K * self.n_tasks
+8 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals

import warnings
import collections
import pickle
import os
@@ -50,6 +51,9 @@ class TensorflowGraph(object):

  def __init__(self, graph, session, name_scopes, output, labels, weights,
               loss):
    warnings.warn("TensorflowGraph is deprecated. "
                  "Will be removed in DeepChem 1.4.",
                  DeprecationWarning)
    self.graph = graph
    self.session = session
    self.name_scopes = name_scopes
@@ -175,6 +179,10 @@ class TensorflowGraphModel(Model):
    seed: int
      If not none, is used as random seed for tensorflow.
    """
    warnings.warn("TensorflowGraphModel is deprecated. "
                  "Will be removed in DeepChem 1.4.",
                  DeprecationWarning)

    # Save hyperparameters
    self.n_tasks = n_tasks
    self.n_features = n_features
+11 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals

import warnings
import time
import numpy as np
import tensorflow as tf
@@ -350,6 +351,9 @@ class TensorflowMultiTaskClassifier(TensorflowClassifier):
      mol_features: Molecule descriptor (e.g. fingerprint) tensor with shape
        batch_size x n_features.
    """
    warnings.warn("TensorflowMultiTaskClassifier is deprecated. "
                  "Will be removed in DeepChem 1.4.",
                  DeprecationWarning)
    placeholder_scope = TensorflowGraph.get_placeholder_scope(graph,
                                                              name_scopes)
    n_features = self.n_features
@@ -447,6 +451,9 @@ class TensorflowMultiTaskRegressor(TensorflowRegressor):
      mol_features: Molecule descriptor (e.g. fingerprint) tensor with shape
        batch_size x n_features.
    """
    warnings.warn("TensorflowMultiTaskRegressor is deprecated. "
                  "Will be removed in DeepChem 1.4.",
                  DeprecationWarning)
    n_features = self.n_features
    placeholder_scope = TensorflowGraph.get_placeholder_scope(graph,
                                                              name_scopes)
@@ -624,6 +631,10 @@ class TensorflowMultiTaskFitTransformRegressor(TensorflowMultiTaskRegressor):
      If not none, is used as random seed for tensorflow.

    """
    warnings.warn("TensorflowMultiTaskFitTransformRegressor " 
                  "is deprecated. "
                  "Will be removed in DeepChem 1.4.",
                  DeprecationWarning)

    self.fit_transformers = fit_transformers
    self.n_evals = n_evals
Loading