Skip to content

Commit

Permalink
Automated rollback of change 143912820
Browse files Browse the repository at this point in the history
Change: 143917962
  • Loading branch information
caisq authored and tensorflower-gardener committed Jan 9, 2017
1 parent 294a17e commit bbdf881
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tensorflow/contrib/learn/python/learn/learn_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,20 @@ def _create_my_experiment(output_dir):
# Execute the schedule
if not hasattr(experiment, schedule):
logging.error('Schedule references non-existent task %s', schedule)
valid_tasks = [x for x in dir(experiment)
if callable(getattr(experiment, x))
and not x.startswith('_')]
valid_tasks = [x for x in experiment.__dict__
if callable(getattr(experiment, x))]
logging.error('Allowed values for this experiment are: %s', valid_tasks)
raise ValueError('Schedule references non-existent task %s' % schedule)
raise ValueError('Schedule references non-existent task %s', schedule)

task = getattr(experiment, schedule)
if not callable(task):
logging.error('Schedule references non-callable member %s', schedule)
valid_tasks = [x for x in dir(experiment)
if callable(getattr(experiment, x))
and not x.startswith('_')]
valid_tasks = [
x for x in experiment.__dict__
if callable(getattr(experiment, x)) and not x.startswith('_')
]
logging.error('Allowed values for this experiment are: %s', valid_tasks)
raise TypeError('Schedule references non-callable member %s' % schedule)
raise TypeError('Schedule references non-callable member %s', schedule)

return task()

Expand Down

0 comments on commit bbdf881

Please sign in to comment.