From 22b0ff757adf815558a783708c4e22fe1821f221 Mon Sep 17 00:00:00 2001 From: LysandreJik Date: Mon, 30 Nov 2020 12:07:43 -0500 Subject: [PATCH] Release: v4.0.0 --- docs/source/conf.py | 2 +- setup.py | 2 +- src/transformers/__init__.py | 2 +- src/transformers/models/longformer/modeling_longformer.py | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index f5de445db1..2ba7cafa32 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -26,7 +26,7 @@ author = u'huggingface' # The short X.Y version version = u'' # The full version, including alpha/beta/rc tags -release = u'3.5.0' +release = u'4.0.0' # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index a1fcdf401b..254b911930 100644 --- a/setup.py +++ b/setup.py @@ -230,7 +230,7 @@ install_requires = [ setup( name="transformers", - version="4.0.0-rc-1", + version="4.1.0dev0", author="Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Sam Shleifer, Patrick von Platen, Sylvain Gugger, Google AI Language Team Authors, Open AI team Authors, Facebook AI Authors, Carnegie Mellon University Authors", author_email="thomas@huggingface.co", description="State-of-the-art Natural Language Processing for TensorFlow 2.0 and PyTorch", diff --git a/src/transformers/__init__.py b/src/transformers/__init__.py index 7b0b034e73..6e2c505bc7 100755 --- a/src/transformers/__init__.py +++ b/src/transformers/__init__.py @@ -2,7 +2,7 @@ # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. -__version__ = "4.0.0-rc-1" +__version__ = "4.1.0dev0" # Work around to update TensorFlow's absl.logging threshold which alters the # default Python logging output behavior when present. diff --git a/src/transformers/models/longformer/modeling_longformer.py b/src/transformers/models/longformer/modeling_longformer.py index 79dc6b0d11..056a258a9e 100755 --- a/src/transformers/models/longformer/modeling_longformer.py +++ b/src/transformers/models/longformer/modeling_longformer.py @@ -459,6 +459,7 @@ class LongformerEmbeddings(nn.Module): # position_ids (1, len position emb) is contiguous in memory and exported when serialized self.register_buffer("position_ids", torch.arange(config.max_position_embeddings).expand((1, -1))) + self.position_embedding_type = getattr(config, "position_embedding_type", "absolute") self.padding_idx = config.pad_token_id self.position_embeddings = nn.Embedding(