Skip to content

Commit

Permalink
update models
Browse files Browse the repository at this point in the history
  • Loading branch information
amn41 committed Nov 21, 2018
1 parent 66f3954 commit 49999ca
Show file tree
Hide file tree
Showing 22 changed files with 366 additions and 323 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ train-core:
python -m rasa_core.train -d domain.yml -s data/stories.md -o models/current/dialogue -c core_config.yml

interactive:
python -m rasa_core.train interactive --core models/current/dialogue -d domain.yml -c core_config.yml
python -m rasa_core.train interactive --core models/current/dialogue -d domain.yml -c core_config.yml -u models/current/nlu --endpoints endpoints.yml

cmdline:
python -m rasa_core.run -d models/current/dialogue -u models/current/nlu --endpoints endpoints.yml
Expand Down
Empty file added data/nlu.md
Empty file.
35 changes: 20 additions & 15 deletions data/nlu_data.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## intent:bye <!--- The label of the intent -->
- Bye <!--- Training examples for intent 'bye'-->
## intent:affirm
- yes
- yes sure
- absolutely
- for sure
- yes yes yes
- definitely

## intent:bye
- Bye
- Goodbye
- See you later
- Bye bot
Expand Down Expand Up @@ -31,6 +39,16 @@
- hello everybody
- hello is anybody there
- hello robot
- hi

## intent:inform
- [10119](number)

## intent:search_hospital
- find me a nearby hospital
- show me hospitals
- i am looking for a clinic
- hospital

## intent:thank
- Thanks
Expand All @@ -48,16 +66,3 @@
- amazing, thanks
- cool, thanks
- cool thank you

## intent:affirm
- yes
- yes sure
- absolutely
- for sure
- yes yes yes
- definitely

## intent:search_hospital
- find me a nearby hospital
- show me hospitals
- i am looking for a clinic
5 changes: 5 additions & 0 deletions data/nlu_interactive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## intent:greet
- hi

## intent:search_hospital
- hospital
16 changes: 14 additions & 2 deletions data/stories.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- utter_greet

## happy path
* request_hospital
* search_hospital
- hospital_form
- form{"name": "hospital_form"}
- form{"name": null}
Expand All @@ -21,9 +21,21 @@
## happy path 2
* greet
- utter_greet
* request_hospital
* search_hospital
- hospital_form
- form{"name": "hospital_form"}
- form{"name": null}
* thankyou
- utter_noworries
## Generated Story -6770035372518111269
* greet
- utter_greet
* search_hospital
- hospital_form
- form{"name": "hospital_form"}
- slot{"requested_slot": "zip"}
* form: inform{"number": "10119"}
- form: hospital_form
- slot{"zip": "10119"}
- slot{"requested_slot": "specialty"}

5 changes: 4 additions & 1 deletion domain.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
intents:
- greet
- goodbye
- thanks
- thankyou
- deny
- search_hospital
- inform

entities:
- specialty
- number

slots:
zip:
Expand Down
3 changes: 2 additions & 1 deletion models/current/dialogue/domain.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"intent_deny",
"intent_goodbye",
"intent_greet",
"intent_thanks",
"intent_search_hospital",
"intent_thankyou",
"entity_specialty",
"prev_action_listen",
"prev_action_restart",
Expand Down
8 changes: 5 additions & 3 deletions models/current/dialogue/domain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ entities:
forms:
- hospital_form
intents:
- deny:
use_entities: true
- greet:
use_entities: true
- thanks:
- search_hospital:
use_entities: true
- thankyou:
use_entities: true
- deny:
use_entities: true
- goodbye:
use_entities: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"py/object": "rasa_core.featurizers.MaxHistoryTrackerFeaturizer", "use_intent_probabilities": false, "state_featurizer": {"py/object": "rasa_core.featurizers.SingleStateFeaturizer", "slot_feature_len": null, "user_feature_len": null}, "remove_duplicates": true, "max_history": 5}
{"state_featurizer": {"user_feature_len": null, "slot_feature_len": null, "py/object": "rasa_core.featurizers.SingleStateFeaturizer"}, "use_intent_probabilities": false, "max_history": 5, "py/object": "rasa_core.featurizers.MaxHistoryTrackerFeaturizer", "remove_duplicates": true}
262 changes: 131 additions & 131 deletions models/current/dialogue/policy_0_MemoizationPolicy/memorized_turns.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"py/object": "rasa_core.featurizers.MaxHistoryTrackerFeaturizer", "use_intent_probabilities": false, "state_featurizer": {"py/object": "rasa_core.featurizers.SingleStateFeaturizer", "slot_feature_len": null, "user_feature_len": null}, "remove_duplicates": true, "max_history": 2}
{"state_featurizer": {"user_feature_len": null, "slot_feature_len": null, "py/object": "rasa_core.featurizers.SingleStateFeaturizer"}, "use_intent_probabilities": false, "max_history": 2, "py/object": "rasa_core.featurizers.MaxHistoryTrackerFeaturizer", "remove_duplicates": true}
24 changes: 12 additions & 12 deletions models/current/dialogue/policy_metadata.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"trained_at": "20181121-155224",
"rasa_core": "0.13.0a1",
"python": "3.5.4",
"policy_names": [
"rasa_core.policies.memoization.MemoizationPolicy",
"rasa_core.policies.form_policy.FormPolicy"
],
"ensemble_name": "rasa_core.policies.ensemble.SimplePolicyEnsemble",
"action_fingerprints": {
"utter_greet": {
"hospital_form": {
"slots": []
},
"action_listen": {
"utter_greet": {
"slots": []
},
"utter_noworries": {
"slots": []
},
"utter_goodbye": {
"action_listen": {
"slots": []
},
"hospital_form": {
"utter_goodbye": {
"slots": []
}
},
"policy_names": [
"rasa_core.policies.memoization.MemoizationPolicy",
"rasa_core.policies.form_policy.FormPolicy"
],
"rasa_core": "0.13.0a1",
"trained_at": "20181121-161139",
"max_histories": [
5,
2
],
"python": "3.5.4"
]
}
2 changes: 2 additions & 0 deletions models/current/nlu/checkpoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
model_checkpoint_path: "/Users/alan/Developer/dialog/HCA/hospital_search/models/current/nlu/intent_classifier_tensorflow_embedding.ckpt"
all_model_checkpoint_paths: "/Users/alan/Developer/dialog/HCA/hospital_search/models/current/nlu/intent_classifier_tensorflow_embedding.ckpt"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
99 changes: 56 additions & 43 deletions models/current/nlu/metadata.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
{
"trained_at": "20181121-154957",
"language": "en",
"training_data": "training_data.json",
"language": "en",
"rasa_nlu_version": "0.13.5",
"trained_at": "20181121-160804",
"pipeline": [
{
"name": "nlp_spacy",
"model": "en",
"case_sensitive": false,
"class": "rasa_nlu.utils.spacy_utils.SpacyNLP"
},
{
"name": "tokenizer_spacy",
"class": "rasa_nlu.tokenizers.spacy_tokenizer.SpacyTokenizer"
},
{
"name": "intent_featurizer_spacy",
"class": "rasa_nlu.featurizers.spacy_featurizer.SpacyFeaturizer"
},
{
"regex_file": "regex_featurizer.json",
"name": "intent_entity_featurizer_regex",
"class": "rasa_nlu.featurizers.regex_featurizer.RegexFeaturizer"
"class": "rasa_nlu.tokenizers.whitespace_tokenizer.WhitespaceTokenizer",
"name": "tokenizer_whitespace"
},
{
"max_iterations": 50,
"BILOU_flag": true,
"L2_c": 0.1,
"classifier_file": "crf_model.pkl",
"L1_c": 0.1,
"features": [
[
"low",
Expand All @@ -50,35 +38,60 @@
"upper"
]
],
"L1_c": 0.1,
"name": "ner_crf",
"classifier_file": "crf_model.pkl",
"max_iterations": 50,
"class": "rasa_nlu.extractors.crf_entity_extractor.CRFEntityExtractor"
"class": "rasa_nlu.extractors.crf_entity_extractor.CRFEntityExtractor",
"L2_c": 0.1,
"name": "ner_crf"
},
{
"name": "ner_synonyms",
"class": "rasa_nlu.extractors.entity_synonyms.EntitySynonymMapper",
"synonyms_file": "entity_synonyms.json"
"synonyms_file": "entity_synonyms.json",
"name": "ner_synonyms"
},
{
"OOV_words": [],
"max_ngram": 1,
"stop_words": null,
"lowercase": true,
"min_ngram": 1,
"max_df": 1.0,
"min_df": 1,
"featurizer_file": "intent_featurizer_count_vectors.pkl",
"token_pattern": "(?u)\\b\\w\\w+\\b",
"strip_accents": null,
"max_features": null,
"class": "rasa_nlu.featurizers.count_vectors_featurizer.CountVectorsFeaturizer",
"OOV_token": null,
"name": "intent_featurizer_count_vectors"
},
{
"scoring_function": "f1_weighted",
"C": [
1,
2,
5,
10,
20,
100
"batch_size": [
64,
256
],
"class": "rasa_nlu.classifiers.sklearn_intent_classifier.SklearnIntentClassifier",
"name": "intent_classifier_sklearn",
"classifier_file": "intent_classifier_sklearn.pkl",
"kernels": [
"linear"
"epochs": 300,
"intent_tokenization_flag": false,
"C2": 0.002,
"embed_dim": 20,
"num_neg": 20,
"classifier_file": "intent_classifier_tensorflow_embedding.ckpt",
"use_max_sim_neg": true,
"evaluate_on_num_examples": 1000,
"evaluate_every_num_epochs": 10,
"class": "rasa_nlu.classifiers.embedding_intent_classifier.EmbeddingIntentClassifier",
"hidden_layer_size_a": [
256,
128
],
"max_cross_validation_folds": 5
"num_hidden_layers_b": 0,
"droprate": 0.2,
"mu_pos": 0.8,
"intent_split_symbol": "_",
"hidden_layer_size_b": [],
"C_emb": 0.8,
"similarity_type": "cosine",
"num_hidden_layers_a": 2,
"mu_neg": -0.4,
"name": "intent_classifier_tensorflow_embedding"
}
],
"rasa_nlu_version": "0.13.5"
]
}
Loading

0 comments on commit 49999ca

Please sign in to comment.