Skip to content

Commit

Permalink
add warning
Browse files Browse the repository at this point in the history
  • Loading branch information
cuent committed Jan 9, 2022
1 parent 3a7f051 commit a3e0026
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions torchmetrics/functional/classification/f_beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Optional
from warnings import warn

import torch
from torch import Tensor
Expand Down Expand Up @@ -458,4 +459,5 @@ def f1(
>>> f1(preds, target, num_classes=3)
tensor(0.3333)
"""
warn("`f1` was renamed to `f1_score` in v0.7 and it will be removed in v0.8", DeprecationWarning)
return f1_score(preds, target, 1.0, average, mdmc_average, ignore_index, num_classes, threshold, top_k, multiclass)

0 comments on commit a3e0026

Please sign in to comment.