We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f58b668 commit d90592aCopy full SHA for d90592a
1 file changed
sdks/python/apache_beam/examples/inference/pytorch_sentiment.py
@@ -102,6 +102,16 @@ def _ensure_transformers_config_compat(config: DistilBertConfig) -> DistilBertCo
102
config.torchscript = False
103
if not hasattr(config, 'return_dict'):
104
config.return_dict = True
105
+ if not hasattr(config, 'output_attentions'):
106
+ config.output_attentions = False
107
+ if not hasattr(config, 'output_hidden_states'):
108
+ config.output_hidden_states = False
109
+ if not hasattr(config, 'use_cache'):
110
+ config.use_cache = False
111
+ if not hasattr(config, 'is_decoder'):
112
+ config.is_decoder = False
113
+ if not hasattr(config, 'add_cross_attention'):
114
+ config.add_cross_attention = False
115
return config
116
117
0 commit comments