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
089cc101
Unverified
Commit
089cc101
authored
Oct 30, 2020
by
Sylvain Gugger
Committed by
GitHub
Oct 30, 2020
Browse files
Doc fixes and filter warning in wandb (#8189)
parent
566b083e
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
14 additions
and
13 deletions
+14
-13
src/transformers/integrations.py
src/transformers/integrations.py
+2
-1
src/transformers/modeling_albert.py
src/transformers/modeling_albert.py
+1
-1
src/transformers/modeling_bert.py
src/transformers/modeling_bert.py
+1
-1
src/transformers/modeling_electra.py
src/transformers/modeling_electra.py
+1
-1
src/transformers/modeling_funnel.py
src/transformers/modeling_funnel.py
+1
-1
src/transformers/modeling_lxmert.py
src/transformers/modeling_lxmert.py
+1
-1
src/transformers/modeling_mobilebert.py
src/transformers/modeling_mobilebert.py
+1
-1
src/transformers/modeling_tf_albert.py
src/transformers/modeling_tf_albert.py
+1
-1
src/transformers/modeling_tf_bert.py
src/transformers/modeling_tf_bert.py
+1
-1
src/transformers/modeling_tf_electra.py
src/transformers/modeling_tf_electra.py
+1
-1
src/transformers/modeling_tf_funnel.py
src/transformers/modeling_tf_funnel.py
+1
-1
src/transformers/modeling_tf_lxmert.py
src/transformers/modeling_tf_lxmert.py
+1
-1
src/transformers/modeling_tf_mobilebert.py
src/transformers/modeling_tf_mobilebert.py
+1
-1
No files found.
src/transformers/integrations.py
View file @
089cc101
...
@@ -29,7 +29,8 @@ try:
...
@@ -29,7 +29,8 @@ try:
wandb
.
ensure_configured
()
wandb
.
ensure_configured
()
if
wandb
.
api
.
api_key
is
None
:
if
wandb
.
api
.
api_key
is
None
:
_has_wandb
=
False
_has_wandb
=
False
wandb
.
termwarn
(
"W&B installed but not logged in. Run `wandb login` or set the WANDB_API_KEY env variable."
)
if
os
.
getenv
(
"WANDB_DISABLED"
):
logger
.
warning
(
"W&B installed but not logged in. Run `wandb login` or set the WANDB_API_KEY env variable."
)
else
:
else
:
_has_wandb
=
False
if
os
.
getenv
(
"WANDB_DISABLED"
)
else
True
_has_wandb
=
False
if
os
.
getenv
(
"WANDB_DISABLED"
)
else
True
except
(
ImportError
,
AttributeError
):
except
(
ImportError
,
AttributeError
):
...
...
src/transformers/modeling_albert.py
View file @
089cc101
...
@@ -478,7 +478,7 @@ class AlbertPreTrainedModel(PreTrainedModel):
...
@@ -478,7 +478,7 @@ class AlbertPreTrainedModel(PreTrainedModel):
@
dataclass
@
dataclass
class
AlbertForPreTrainingOutput
(
ModelOutput
):
class
AlbertForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.AlbertForPreTraining
Model
`.
Output type of :class:`~transformers.AlbertForPreTraining`.
Args:
Args:
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
...
...
src/transformers/modeling_bert.py
View file @
089cc101
...
@@ -606,7 +606,7 @@ class BertPreTrainedModel(PreTrainedModel):
...
@@ -606,7 +606,7 @@ class BertPreTrainedModel(PreTrainedModel):
@
dataclass
@
dataclass
class
BertForPreTrainingOutput
(
ModelOutput
):
class
BertForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.BertForPreTraining
Model
`.
Output type of :class:`~transformers.BertForPreTraining`.
Args:
Args:
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
...
...
src/transformers/modeling_electra.py
View file @
089cc101
...
@@ -555,7 +555,7 @@ class ElectraPreTrainedModel(PreTrainedModel):
...
@@ -555,7 +555,7 @@ class ElectraPreTrainedModel(PreTrainedModel):
@
dataclass
@
dataclass
class
ElectraForPreTrainingOutput
(
ModelOutput
):
class
ElectraForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.ElectraForPreTraining
Model
`.
Output type of :class:`~transformers.ElectraForPreTraining`.
Args:
Args:
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
...
...
src/transformers/modeling_funnel.py
View file @
089cc101
...
@@ -798,7 +798,7 @@ class FunnelClassificationHead(nn.Module):
...
@@ -798,7 +798,7 @@ class FunnelClassificationHead(nn.Module):
@
dataclass
@
dataclass
class
FunnelForPreTrainingOutput
(
ModelOutput
):
class
FunnelForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.FunnelForPreTraining
Model
`.
Output type of :class:`~transformers.FunnelForPreTraining`.
Args:
Args:
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
...
...
src/transformers/modeling_lxmert.py
View file @
089cc101
...
@@ -144,7 +144,7 @@ class LxmertForQuestionAnsweringOutput(ModelOutput):
...
@@ -144,7 +144,7 @@ class LxmertForQuestionAnsweringOutput(ModelOutput):
@
dataclass
@
dataclass
class
LxmertForPreTrainingOutput
(
ModelOutput
):
class
LxmertForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.LxmertForPreTraining
Model
`.
Output type of :class:`~transformers.LxmertForPreTraining`.
Args:
Args:
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
...
...
src/transformers/modeling_mobilebert.py
View file @
089cc101
...
@@ -695,7 +695,7 @@ class MobileBertPreTrainedModel(PreTrainedModel):
...
@@ -695,7 +695,7 @@ class MobileBertPreTrainedModel(PreTrainedModel):
@
dataclass
@
dataclass
class
MobileBertForPreTrainingOutput
(
ModelOutput
):
class
MobileBertForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.MobileBertForPreTraining
Model
`.
Output type of :class:`~transformers.MobileBertForPreTraining`.
Args:
Args:
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
loss (`optional`, returned when ``labels`` is provided, ``torch.FloatTensor`` of shape :obj:`(1,)`):
...
...
src/transformers/modeling_tf_albert.py
View file @
089cc101
...
@@ -628,7 +628,7 @@ class TFAlbertMainLayer(tf.keras.layers.Layer):
...
@@ -628,7 +628,7 @@ class TFAlbertMainLayer(tf.keras.layers.Layer):
@
dataclass
@
dataclass
class
TFAlbertForPreTrainingOutput
(
ModelOutput
):
class
TFAlbertForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.TFAlbertForPreTraining
Model
`.
Output type of :class:`~transformers.TFAlbertForPreTraining`.
Args:
Args:
prediction_logits (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length, config.vocab_size)`):
prediction_logits (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length, config.vocab_size)`):
...
...
src/transformers/modeling_tf_bert.py
View file @
089cc101
...
@@ -666,7 +666,7 @@ class TFBertPreTrainedModel(TFPreTrainedModel):
...
@@ -666,7 +666,7 @@ class TFBertPreTrainedModel(TFPreTrainedModel):
@
dataclass
@
dataclass
class
TFBertForPreTrainingOutput
(
ModelOutput
):
class
TFBertForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.TFBertForPreTraining
Model
`.
Output type of :class:`~transformers.TFBertForPreTraining`.
Args:
Args:
prediction_logits (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length, config.vocab_size)`):
prediction_logits (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length, config.vocab_size)`):
...
...
src/transformers/modeling_tf_electra.py
View file @
089cc101
...
@@ -598,7 +598,7 @@ class TFElectraMainLayer(tf.keras.layers.Layer):
...
@@ -598,7 +598,7 @@ class TFElectraMainLayer(tf.keras.layers.Layer):
@
dataclass
@
dataclass
class
TFElectraForPreTrainingOutput
(
ModelOutput
):
class
TFElectraForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.TFElectraForPreTraining
Model
`.
Output type of :class:`~transformers.TFElectraForPreTraining`.
Args:
Args:
loss (`optional`, returned when ``labels`` is provided, ``tf.Tensor`` of shape :obj:`(1,)`):
loss (`optional`, returned when ``labels`` is provided, ``tf.Tensor`` of shape :obj:`(1,)`):
...
...
src/transformers/modeling_tf_funnel.py
View file @
089cc101
...
@@ -1031,7 +1031,7 @@ class TFFunnelPreTrainedModel(TFPreTrainedModel):
...
@@ -1031,7 +1031,7 @@ class TFFunnelPreTrainedModel(TFPreTrainedModel):
@
dataclass
@
dataclass
class
TFFunnelForPreTrainingOutput
(
ModelOutput
):
class
TFFunnelForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.FunnelForPreTraining
Model
`.
Output type of :class:`~transformers.FunnelForPreTraining`.
Args:
Args:
logits (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length)`):
logits (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length)`):
...
...
src/transformers/modeling_tf_lxmert.py
View file @
089cc101
...
@@ -96,7 +96,7 @@ class TFLxmertModelOutput(ModelOutput):
...
@@ -96,7 +96,7 @@ class TFLxmertModelOutput(ModelOutput):
@
dataclass
@
dataclass
class
TFLxmertForPreTrainingOutput
(
ModelOutput
):
class
TFLxmertForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.LxmertForPreTraining
Model
`.
Output type of :class:`~transformers.LxmertForPreTraining`.
Args:
Args:
loss (`optional`, returned when ``labels`` is provided, ``tf.Tensor`` of shape :obj:`(1,)`):
loss (`optional`, returned when ``labels`` is provided, ``tf.Tensor`` of shape :obj:`(1,)`):
...
...
src/transformers/modeling_tf_mobilebert.py
View file @
089cc101
...
@@ -833,7 +833,7 @@ class TFMobileBertPreTrainedModel(TFPreTrainedModel):
...
@@ -833,7 +833,7 @@ class TFMobileBertPreTrainedModel(TFPreTrainedModel):
@
dataclass
@
dataclass
class
TFMobileBertForPreTrainingOutput
(
ModelOutput
):
class
TFMobileBertForPreTrainingOutput
(
ModelOutput
):
"""
"""
Output type of :class:`~transformers.TFMobileBertForPreTraining
Model
`.
Output type of :class:`~transformers.TFMobileBertForPreTraining`.
Args:
Args:
prediction_logits (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length, config.vocab_size)`):
prediction_logits (:obj:`tf.Tensor` of shape :obj:`(batch_size, sequence_length, config.vocab_size)`):
...
...
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