document RASA_DUCKLING_HTTP_URL env variable usage
See original GitHub issueRasa version: 1.10.7
Python version: 3.7
Operating system (windows, osx, …): Windows 10 1909
Issue: It seems like the Duckling-URL becomes a hard-coded part of the NLU-Model. Changing the Duckling-URL after training seems to have no effect.
Repro:
- Train a model using f. e. http://localhost:8000 as Duckling-URL
- Change the URL to f. e. http://localhost:55555 (but DONT retrain the model)
- Start the Duckling-server on http://localhost:55555
- Run
rasa run
- See failure after parsing any message
See also: https://forum.rasa.com/t/does-the-duckling-url-become-a-hard-coded-part-of-the-trained-model/31001
Error (including full traceback):
Failed to connect to duckling http server. Make sure the duckling server is running/healthy/not stale and the proper host and port are set in the configuration. More information on how to run the server can be found on github: https://github.com/facebook/duckling#quickstart Error: HTTPConnectionPool(host=‘localhost’, port=8000): Max retries exceeded with url: /parse (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x000002BE546C5D48>: Failed to establish a new connection: <span class="error">[WinError 10061]</span> Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte’))
Note: Port 8000 is still used.
Content of configuration file (config.yml) (if relevant): Before
language: de pipeline: * name: WhitespaceTokenizer * name: RegexFeaturizer * name: LexicalSyntacticFeaturizer * name: CountVectorsFeaturizer * name: CountVectorsFeaturizer analyzer: "char_wb" min_ngram: 1 max_ngram: 4 * name: DIETClassifier epochs: 100 * name: EntitySynonymMapper * name: ResponseSelector epochs: 100 * name: "DucklingHTTPExtractor" url: "http://localhost:8000" dimensions: <span class="error">["time"]</span> locale: "de_DE" timezone: "UTC" timeout : 3
After
language: de pipeline: * name: WhitespaceTokenizer * name: RegexFeaturizer * name: LexicalSyntacticFeaturizer * name: CountVectorsFeaturizer * name: CountVectorsFeaturizer analyzer: "char_wb" min_ngram: 1 max_ngram: 4 * name: DIETClassifier epochs: 100 * name: EntitySynonymMapper * name: ResponseSelector epochs: 100 * name: "DucklingHTTPExtractor" url: "http://localhost:55555" #This is the only change dimensions: <span class="error">["time"]</span> locale: "de_DE" timezone: "UTC" timeout : 3
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Exalate commented:
wochinge commented:
You could use an environment variable instead of a hardcoded URL in your configuration, e.g.
I see that this isn’t ideal in terms of usability, but otherwise we’d need some way to pass in the duckling url during loading the model. I think using an env variable still seems the best way to do this. Wdyt?
Exalate commented:
N-Olbert commented:
According to the forum, this is defined functionality (see https://forum.rasa.com/t/does-the-duckling-url-become-a-hard-coded-part-of-the-trained-model/31001), so please consider this as an enhancement request rather than a bug.
Not being able to change the port/uri after training is bad because if a customer has already used the Duckling-port which was provided during training there is no way to change this port except to train a new model (which takes some time).