Skip to content

Commit

Permalink
fix tf tapas
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed May 2, 2024
1 parent ca253a0 commit bcd2deb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/examples-torch.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ ENV VIRTUAL_ENV=/usr/local
RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools
RUN pip install --no-cache-dir 'torch' 'torchvision' 'torchaudio' --index-url https://download.pytorch.org/whl/cpu
RUN uv pip install --no-deps timm accelerate --extra-index-url https://download.pytorch.org/whl/cpu
RUN uv pip install --no-cache-dir librosa "transformers[sklearn,sentencepiece,vision,testing]" seqeval
RUN uv pip install --no-cache-dir librosa "transformers[sklearn,sentencepiece,vision,testing]" seqeval albumentations
RUN pip uninstall -y transformers
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
3 changes: 1 addition & 2 deletions src/transformers/models/tapas/modeling_tf_tapas.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
try:
import tensorflow_probability as tfp

# On the first call, check whether a compatible version of TensorFlow is installed
# On the first call, check whether a compatible version of TensorFlow is instalTFTapasMainLayerled
# TensorFlow Probability depends on a recent stable release of TensorFlow
n = tfp.distributions.Normal(loc=0.0, scale=1.0)
except ImportError:
Expand Down Expand Up @@ -839,7 +839,6 @@ class TFTapasMainLayer(keras.layers.Layer):
config_class = TapasConfig

def __init__(self, config: TapasConfig, add_pooling_layer: bool = True, **kwargs):
requires_backends(self, "tensorflow_probability")
super().__init__(**kwargs)

self.config = config
Expand Down

0 comments on commit bcd2deb

Please sign in to comment.