Commit ccd2f0fc authored by Michelle Gill's avatar Michelle Gill
Browse files

Deprecation for TextCNNTensorGraph

parent 4cac0b6d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -28,4 +28,5 @@ from deepchem.models.tensorgraph.models.sequence_dnn import SequenceDNN

#################### Compatibility imports for renamed TensorGraph models. Remove below with DeepChem 3.0. ####################

from deepchem.models.tensorgraph.models.text_cnn import TextCNNTensorGraph
from deepchem.models.tensorgraph.models.graph_models import WeaveTensorGraph, DTNNTensorGraph, GraphConvTensorGraph, MPNNTensorGraphModel
+18 −0
Original line number Diff line number Diff line
@@ -280,3 +280,21 @@ class TextCNNModel(TensorGraph):

    out = undo_transforms(out, transformers)
    return out


#################### Deprecation warnings for renamed TensorGraph models ####################

import warnings

TENSORGRAPH_DEPRECATION = "{} is deprecated and has been renamed to {} and will be removed in DeepChem 3.0."


class TextCNNTensorGraph(TextCNNModel):

  warnings.warn(
      TENSORGRAPH_DEPRECATION.format("TextCNNTensorGraph", "TextCNNModel"),
      FutureWarning)

  def __init__(self, *args, **kwargs):

    super(TextCNNTensorGraph, self).__init__(*args, **kwargs)