Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Update torch requirement from <=1.4.0,>1.3.1 to >1.3.1,<1.6.0 (#4118)
Browse files Browse the repository at this point in the history
* Update torch requirement from <=1.4.0,>1.3.1 to >1.3.1,<1.6.0

Updates the requirements on [torch](/~https://github.com/pytorch/pytorch) to permit the latest version.
- [Release notes](/~https://github.com/pytorch/pytorch/releases)
- [Commits](pytorch/pytorch@v1.4.0a0...v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* try adding pip flag

* catch IndexError

* tighten torch pin

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Evan Pete Walsh <epwalsh10@gmail.com>
  • Loading branch information
dependabot-preview[bot] and epwalsh authored Apr 24, 2020
1 parent 2a063d0 commit 5e8b2ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion allennlp/modules/elmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def forward(
type_representation, mask = add_sentence_boundary_token_ids(
embedded_inputs, mask_without_bos_eos, self._bos_embedding, self._eos_embedding
)
except RuntimeError:
except (RuntimeError, IndexError):
# Back off to running the character convolutions,
# as we might not have the words in the cache.
token_embedding = self._token_embedder(inputs)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
license="Apache",
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=[
"torch>1.3.1,<=1.4.0",
"torch>1.3.1,<=1.5.0",
"jsonnet>=0.10.0 ; sys.platform != 'win32'",
"overrides==2.8.0",
"nltk",
Expand Down

0 comments on commit 5e8b2ba

Please sign in to comment.