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

trainer_lib: add problem hparams after parsing the overrides #1053

Merged
merged 1 commit into from
Oct 31, 2018

Conversation

gcampax
Copy link
Contributor

@gcampax gcampax commented Sep 9, 2018

t2t-trainer passes problem_name=None to create_hparams(), and
adds the problem hparams afterwards when creating the experiment.
t2t-decoder instead relies fully on create_hparams()
This inconsistency causes t2t-trainer and t2t-decoder to pass
different sets of model_hparams to Problem.hparams() (before and
after overrides respectively), which is problematic.

Always letting the problem see the final version of the model
hparams is more useful (in case the problem hparams depend on
the model), so make sure the problem is added after the overrides.

t2t-trainer passes problem_name=None to create_hparams(), and
adds the problem hparams afterwards when creating the experiment.
t2t-decoder instead relies fully on create_hparams()
This inconsistency causes t2t-trainer and t2t-decoder to pass
different sets of model_hparams to Problem.hparams() (before and
after overrides respectively), which is problematic.

Always letting the problem see the final version of the model
hparams is more useful (in case the problem hparams depend on
the model), so make sure the problem is added after the overrides.
@googlebot googlebot added the cla: yes PR author has signed CLA label Sep 9, 2018
Copy link
Contributor

@lukaszkaiser lukaszkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for correcting this!

@lukaszkaiser lukaszkaiser merged commit 36596aa into tensorflow:master Oct 31, 2018
@lukaszkaiser
Copy link
Contributor

Thanks for the PR and sorry for the delay in getting it in!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants