"git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "2ba66200a965740be4c2936d20265ddce8522eb4"
Unverified Commit 089cc101 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Doc fixes and filter warning in wandb (#8189)

parent 566b083e
...@@ -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):
......
...@@ -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.AlbertForPreTrainingModel`. 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,)`):
......
...@@ -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.BertForPreTrainingModel`. 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,)`):
......
...@@ -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.ElectraForPreTrainingModel`. 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,)`):
......
...@@ -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.FunnelForPreTrainingModel`. 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,)`):
......
...@@ -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.LxmertForPreTrainingModel`. 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,)`):
......
...@@ -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.MobileBertForPreTrainingModel`. 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,)`):
......
...@@ -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.TFAlbertForPreTrainingModel`. 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)`):
......
...@@ -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.TFBertForPreTrainingModel`. 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)`):
......
...@@ -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.TFElectraForPreTrainingModel`. 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,)`):
......
...@@ -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.FunnelForPreTrainingModel`. 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)`):
......
...@@ -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.LxmertForPreTrainingModel`. 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,)`):
......
...@@ -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.TFMobileBertForPreTrainingModel`. 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)`):
......
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