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

Fixing string issues for py2

parent 310565f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -691,7 +691,7 @@ class TestOverfit(test_util.TensorFlowTestCase):
                                exclude_support=False)

      # Measure performance on 0-th task.
      assert scores[0] > .9
      assert scores[0] > .85

  def test_residual_lstm_singletask_classification_overfit(self):
    """Test resi-lstm multitask overfits tiny data."""
+2 −5
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals

import six
import tensorflow as tf
from deepchem.nn import model_ops
from deepchem.nn.model_ops import get_ndim
@@ -37,11 +38,7 @@ def get_from_module(identifier, module_params, module_name,
  ------
  ValueError: if the identifier cannot be found.
 """
  try:
    basestring
  except NameError:
    basestring = str
  if isinstance(identifier, basestring):
  if isinstance(identifier, six.string_types):
    res = module_params.get(identifier)
    if not res:
        raise ValueError('Invalid ' + str(module_name) + ': ' +