Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
ad3e560b
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "bcd607542cddc1240f380db07e681fac9ff27918"
Unverified
Commit
ad3e560b
authored
Nov 02, 2021
by
Sylvain Gugger
Committed by
GitHub
Nov 02, 2021
Browse files
Add PushToHubCallback in main init (#14246)
parent
ce01122a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
src/transformers/__init__.py
src/transformers/__init__.py
+2
-1
src/transformers/utils/dummy_tf_objects.py
src/transformers/utils/dummy_tf_objects.py
+5
-0
No files found.
src/transformers/__init__.py
View file @
ad3e560b
...
...
@@ -1364,7 +1364,7 @@ if is_tf_available():
_import_structure
[
"benchmark.benchmark_args_tf"
]
=
[
"TensorFlowBenchmarkArguments"
]
_import_structure
[
"benchmark.benchmark_tf"
]
=
[
"TensorFlowBenchmark"
]
_import_structure
[
"generation_tf_utils"
]
=
[
"tf_top_k_top_p_filtering"
]
_import_structure
[
"keras_callbacks"
]
=
[]
_import_structure
[
"keras_callbacks"
]
=
[
"PushToHubCallback"
]
_import_structure
[
"modeling_tf_outputs"
]
=
[]
_import_structure
[
"modeling_tf_utils"
]
=
[
"TFPreTrainedModel"
,
...
...
@@ -3093,6 +3093,7 @@ if TYPE_CHECKING:
# Benchmarks
from
.benchmark.benchmark_tf
import
TensorFlowBenchmark
from
.generation_tf_utils
import
tf_top_k_top_p_filtering
from
.keras_callbacks
import
PushToHubCallback
from
.modeling_tf_layoutlm
import
(
TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST
,
TFLayoutLMForMaskedLM
,
...
...
src/transformers/utils/dummy_tf_objects.py
View file @
ad3e560b
...
...
@@ -16,6 +16,11 @@ def tf_top_k_top_p_filtering(*args, **kwargs):
requires_backends
(
tf_top_k_top_p_filtering
,
[
"tf"
])
class
PushToHubCallback
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment