UserWarning: constrain_similarities is set to `False`. However it is True

hey

I am getting this warning:

UserWarning: constrain_similarities is set to `False`. It is recommended to set it to `True` when using cross-entropy loss. It will be set to `True` by default, Rasa Open Source 3.0.0 onwards.

However the constrain_similarities in config.yml is true. What should I do to stop this or make sure it is OK?

Rasa version 2.8.15

Can you post your config.yml file?

It’s just the User Warning and it will not impact the bot/user conversations, so nothing to worries.

 - name: DIETClassifier
    epochs: 100
    ranking_length: 5
    constrain_similarities: true
    model_confidence: linear_norm

thanks, I tried putting all constrain_similarities: true like suggested but I still get the Warning. I would like to remove the Warning to make sure if I change Rasa version nothing will happen you know

There are other components that use constrain_similarities.

1 Like

config.yml (1.4 KB)

Hi @ChrisRahme , I get the same warning. Here’s my config file. Can you help out?

same here

“UserWarning: constrain_similarities is set to False. It is recommended to set it to True when using cross-entropy loss.”

Same. I’ve set contrain_similarities to true in all cases. I’m using cross-entropy on DIET and that’s definitely set to true. I really don’t like warning messages. I’ve already got these two that aren’t even in my code and they drive me nuts:

C:\Python\Python310\lib\site-packages\rasa\core\tracker_store.py:1048: MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to “sqlalchemy<2.0”. Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: Error Messages — SQLAlchemy 2.0 Documentation) Base: DeclarativeMeta = declarative_base()

C:\Python\Python310\lib\site-packages\tensorflow\python\framework\dtypes.py:246: DeprecationWarning: np.bool8 is a deprecated alias for np.bool_. (Deprecated NumPy 1.24) np.bool8: (False, True),