Unverified Commit ad3e560b authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Add PushToHubCallback in main init (#14246)

parent ce01122a
...@@ -1364,7 +1364,7 @@ if is_tf_available(): ...@@ -1364,7 +1364,7 @@ if is_tf_available():
_import_structure["benchmark.benchmark_args_tf"] = ["TensorFlowBenchmarkArguments"] _import_structure["benchmark.benchmark_args_tf"] = ["TensorFlowBenchmarkArguments"]
_import_structure["benchmark.benchmark_tf"] = ["TensorFlowBenchmark"] _import_structure["benchmark.benchmark_tf"] = ["TensorFlowBenchmark"]
_import_structure["generation_tf_utils"] = ["tf_top_k_top_p_filtering"] _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_outputs"] = []
_import_structure["modeling_tf_utils"] = [ _import_structure["modeling_tf_utils"] = [
"TFPreTrainedModel", "TFPreTrainedModel",
...@@ -3093,6 +3093,7 @@ if TYPE_CHECKING: ...@@ -3093,6 +3093,7 @@ if TYPE_CHECKING:
# Benchmarks # Benchmarks
from .benchmark.benchmark_tf import TensorFlowBenchmark from .benchmark.benchmark_tf import TensorFlowBenchmark
from .generation_tf_utils import tf_top_k_top_p_filtering from .generation_tf_utils import tf_top_k_top_p_filtering
from .keras_callbacks import PushToHubCallback
from .modeling_tf_layoutlm import ( from .modeling_tf_layoutlm import (
TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST, TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST,
TFLayoutLMForMaskedLM, TFLayoutLMForMaskedLM,
......
...@@ -16,6 +16,11 @@ def tf_top_k_top_p_filtering(*args, **kwargs): ...@@ -16,6 +16,11 @@ def tf_top_k_top_p_filtering(*args, **kwargs):
requires_backends(tf_top_k_top_p_filtering, ["tf"]) 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 TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST = None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment