Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #72 from rshin/master
Browse files Browse the repository at this point in the history
Improve error message for missing problems
  • Loading branch information
lukaszkaiser authored Jun 30, 2017
2 parents 7087807 + 1c775fa commit f95b7c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensor2tensor/data_generators/problem_hparams.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def parse_problem_name(problem_name):

def _lookup_problem_hparams_fn(name):
if name not in PROBLEM_HPARAMS_MAP:
map_str = "\n* ".join(PROBLEM_HPARAMS_MAP.keys())
map_str = "* " + "\n* ".join(sorted(PROBLEM_HPARAMS_MAP.keys()))
error_msg = "%s not in the supported set of problems:\n%s" % (name, map_str)
raise ValueError(error_msg)
return PROBLEM_HPARAMS_MAP.get(name)
Expand Down

0 comments on commit f95b7c9

Please sign in to comment.