-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document RASA_DUCKLING_HTTP_URL env variable usage #6240
Comments
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). |
Exalate commented: wochinge commented: You could use an environment variable instead of a hardcoded URL in your configuration, e.g. 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: $ {DUCKLING_URL}
#This is the only change
dimensions: ["time"]
locale: "de_DE"
timezone: "UTC"
timeout : 3
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: @wochinge Thanks for that suggestion. This is a clever trick, but doesn't seem to work: The metadata.json within the nlu -folder of the resulting model contains already the resolved value of the environment variable. Anyways I found a solution: There is a hard coded env var within the DucklingHTTPExtractor which always wins: rasa/rasa/nlu/extractors/duckling_http_extractor.py Lines 99 to 104 in b70e9f4
(This issue can be closed form my side) |
Exalate commented: wochinge commented: Ah, good catch. Completely forgot about
I'll convert this to a documentation issue as |
➤ Maxime Verger commented: 💡 Heads up! We're moving issues to Jira: https://rasa-open-source.atlassian.net/browse/OSS. From now on, this Jira board is the place where you can browse (without an account) and create issues (you'll need a free Jira account for that). This GitHub issue has already been migrated to Jira and will be closed on January 9th, 2023. Do not forget to subscribe to the corresponding Jira issue! ➡️ More information in the forum: https://forum.rasa.com/t/migration-of-rasa-oss-issues-to-jira/56569. |
This still hasn't been documented. |
Rasa 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:
rasa run
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: [WinError 10061] 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: ["time"] 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: ["time"] locale: "de_DE" timezone: "UTC" timeout : 3
The text was updated successfully, but these errors were encountered: