Skip to content

Commit

Permalink
Update hub_utils.py (#2910)
Browse files Browse the repository at this point in the history
Summary:
# Before submitting

- [ ] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
- [x] Did you read the [contributor guideline](https://github.com/pytorch/fairseq/blob/master/CONTRIBUTING.md)?
- [x] Did you make sure to update the docs?
- [ ] Did you write any new necessary tests?

## What does this PR do?

 has no attribute 'arg'

Pull Request resolved: #2910

Reviewed By: alexeib

Differential Revision: D25146481

Pulled By: myleott

fbshipit-source-id: 11912bb2bcacd1d2f91da47bb0d868da90b38f17
  • Loading branch information
xu-song authored and facebook-github-bot committed Nov 22, 2020
1 parent 158bd03 commit b889b52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fairseq/hub_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def generate(
if verbose:

def getarg(name, default):
return getattr(gen_args, name, getattr(self.args, name, default))
return getattr(gen_args, name, getattr(self.cfg, name, default))

for source_tokens, target_hypotheses in zip(tokenized_sentences, outputs):
src_str_with_unk = self.string(source_tokens)
Expand Down

0 comments on commit b889b52

Please sign in to comment.