File tree Expand file tree Collapse file tree 2 files changed +1
-10
lines changed Expand file tree Collapse file tree 2 files changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def load_from_checkpoint(
101
101
import pkg_resources
102
102
comet_version = pkg_resources .get_distribution ("unbabel-comet" ).version
103
103
use_softmax = (pkg_resources .parse_version (comet_version ) >= pkg_resources .parse_version ("2.2.4" ) and
104
- hparams .get ("layer_transformation" ) == "sparsemax " )
104
+ hparams .get ("layer_transformation" ) == "sparsemax_patch " )
105
105
except :
106
106
use_softmax = False
107
107
Original file line number Diff line number Diff line change @@ -48,15 +48,6 @@ def __init__(
48
48
49
49
self .transform_fn = torch .softmax
50
50
if layer_transformation == "sparsemax" :
51
- # Import warnings module
52
- import warnings
53
- # Display warning message
54
- warnings .warn (
55
- "WARNING - sparsemax is DEPRECATED in favor of softmax. "
56
- "Please use softmax instead. " ,
57
- DeprecationWarning ,
58
- stacklevel = 2
59
- )
60
51
from entmax import sparsemax
61
52
self .transform_fn = sparsemax
62
53
You can’t perform that action at this time.
0 commit comments