Skip to content

Commit

Permalink
- Bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
jalammar committed Jan 9, 2022
1 parent 5a5140d commit 1bc326d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def read(*names, **kwargs):

setup(
name='ecco',
version='0.1.1',
version='0.1.2',
license='BSD-3-Clause',
description='Visualization tools for NLP machine learning models.',
long_description='%s\n%s' % (
Expand Down
2 changes: 1 addition & 1 deletion src/ecco/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"""


__version__ = '0.1.1'
__version__ = '0.1.2'
from ecco.lm import LM
from transformers import AutoTokenizer, AutoModelForCausalLM, AutoModel, AutoModelForSeq2SeqLM
from typing import Any, Dict, Optional, List
Expand Down
2 changes: 1 addition & 1 deletion src/ecco/lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def generate(self, input_str: str,
# Get decoder input ids
if self.model_type == 'enc-dec': # FIXME: only done because causal LMs like GPT-2 have the _prepare_decoder_input_ids_for_generation method but do not use it
assert len(input_ids.size()) == 2 # will break otherwise
if version.parse(transformers.__version__) >= version.parse('4.13'): # ALSO FIXME: awful hack. But seems to work?
if version.parse(transformers.__version__) >= version.parse('4.13'):
decoder_input_ids = self.model._prepare_decoder_input_ids_for_generation(input_ids.shape[0], None, None)
else:
decoder_input_ids = self.model._prepare_decoder_input_ids_for_generation(input_ids, None, None)
Expand Down

0 comments on commit 1bc326d

Please sign in to comment.