Compare commits

..
Author SHA1 Message Date
Lysandre e20ac6611d Release: v4.0.1 2020-12-09 11:23:27 -05:00
Lysandre 0351c5acef Docs 2020-12-09 11:19:07 -05:00
Lysandre DebutandSylvain Gugger 28d3ccd04a Put Transformers on Conda (#8918)
* conda

* Guide

* correct tag

* Update README.md

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Update docs/source/installation.md

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Sylvain's comments

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2020-12-09 11:17:11 -05:00
Sylvain Gugger c328cb872d Remove use of deprected method in Trainer HP search (#8996) 2020-12-09 11:13:01 -05:00
Lysandre Debut e6399320c6 Better warning when loading a tokenizer with AutoTokenizer w/o SnetencePiece (#8881) 2020-12-09 11:13:01 -05:00
8 changed files with 14 additions and 11 deletions

No files matched your search

+1 -1
View File
@@ -53,4 +53,4 @@ deploy_doc "3ebb1b3" v3.2.0
deploy_doc "0613f05" v3.3.1
deploy_doc "eb0e0ce" v3.4.0
deploy_doc "818878d" v3.5.1
deploy_doc "c781171" # v4.0.0 Latest stable release
deploy_doc "28d3ccd" # v4.0.1 Latest stable release
-3
View File
@@ -4,9 +4,6 @@ on:
push:
tags:
- v*
branches:
- v4.0.0-release
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
+2 -2
View File
@@ -1,10 +1,10 @@
// These two things need to be updated at each release for the version selector.
// Last stable version
const stableVersion = "v4.0.0"
const stableVersion = "v4.0.1"
// Dictionary doc folder to label
const versionMapping = {
"master": "master",
"v4.0.0": "v4.0.0",
"": "v4.0.0/v4.0.1",
"v3.5.1": "v3.5.0/v3.5.1",
"v3.4.0": "v3.4.0",
"v3.3.1": "v3.3.0/v3.3.1",
+1 -1
View File
@@ -26,7 +26,7 @@ author = u'huggingface'
# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
release = u'4.0.0'
release = u'4.0.1'
# -- General configuration ---------------------------------------------------
+1 -1
View File
@@ -119,7 +119,7 @@ extras["dev"] = extras["all"] + extras["testing"] + extras["quality"] + extras["
setup(
name="transformers",
version="4.0.0",
version="4.0.1",
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",
+1 -1
View File
@@ -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"
__version__ = "4.0.1"
# Work around to update TensorFlow's absl.logging threshold which alters the
# default Python logging output behavior when present.
@@ -342,7 +342,13 @@ class AutoTokenizer:
if tokenizer_class_fast and (use_fast or tokenizer_class_py is None):
return tokenizer_class_fast.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
else:
return tokenizer_class_py.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
if tokenizer_class_py is not None:
return tokenizer_class_py.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
else:
raise ValueError(
"This tokenizer cannot be instantiated. Please make sure you have `sentencepiece` installed "
"in order to use this tokenizer."
)
raise ValueError(
"Unrecognized configuration class {} to build an AutoTokenizer.\n"
+1 -1
View File
@@ -538,7 +538,7 @@ class Trainer:
self.args.output_dir = checkpoint_dir
output_dir = os.path.join(self.args.output_dir, f"{PREFIX_CHECKPOINT_DIR}-{self.state.global_step}")
self.save_model(output_dir)
if self.is_world_master():
if self.is_world_process_zero():
self.state.save_to_json(os.path.join(output_dir, "trainer_state.json"))
torch.save(self.optimizer.state_dict(), os.path.join(output_dir, "optimizer.pt"))
torch.save(self.lr_scheduler.state_dict(), os.path.join(output_dir, "scheduler.pt"))