Skip to content
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

[Parallel(n_jobs=1)]: Done 12 out of 12 | elapsed: 0.2s finished #6

Open
zhangsirf opened this issue Apr 15, 2020 · 3 comments
Open

Comments

@zhangsirf
Copy link

[Parallel(n_jobs=1)]: Done 12 out of 12 | elapsed: 0.2s finished
➜ WeatherBot_NLU-master ./train_NLU.bash
Building prefix dict from the default dictionary ...
Loading model from cache /var/folders/cb/h27w8g6512q81xpr5wwxzhxr0000gn/T/jieba.cache
Loading model cost 0.669 seconds.
Prefix dict has been built succesfully.
2020-04-15 11:01:24 WARNING rasa_nlu.extractors.mitie_entity_extractor - Example skipped: Invalid entity {'start': 0, 'end': 5, 'value': '下个星期五', 'entity': 'date-time'} in example '下个星期五在南京': entities must span whole tokens. Wrong entity end.
2020-04-15 11:01:24 WARNING rasa_nlu.extractors.mitie_entity_extractor - Example skipped: Invalid entity {'start': 0, 'end': 2, 'value': '今天', 'entity': 'date-time'} in example '今天天气': entities must span whole tokens. Wrong entity end.
2020-04-15 11:01:24 WARNING rasa_nlu.extractors.mitie_entity_extractor - Example skipped: Invalid entity {'start': 0, 'end': 2, 'value': '今天', 'entity': 'date-time'} in example '今天天气很热耶': entities must span whole tokens. Wrong entity end.
2020-04-15 11:01:24 WARNING rasa_nlu.extractors.mitie_entity_extractor - Example skipped: Invalid entity {'start': 5, 'end': 7, 'value': '今天', 'entity': 'date-time'} in example '就让你问他今天天气几度': entities must span whole tokens. Wrong entity end.
Training to recognize 2 labels: 'address', 'date-time'
Part I: train segmenter
words in dictionary: 200000
num features: 271
now do training
C: 20
epsilon: 0.01
num threads: 1
cache size: 5
max iterations: 2000
loss per missed segment: 3
C: 20 loss: 3 0.941176
C: 35 loss: 3 0.941176
C: 20 loss: 4.5 0.941176
C: 5 loss: 3 0.941176
C: 20 loss: 1.5 0.92437
C: 20 loss: 3.75 0.932773
C: 21.5 loss: 3 0.941176
C: 20 loss: 2.8125 0.941176
C: 18.5 loss: 3 0.941176
C: 20 loss: 2.90625 0.941176
best C: 20
best loss: 3
num feats in chunker model: 4095
train: precision, recall, f1-score: 1 1 1
Part I: elapsed time: 8 seconds.

Part II: train segment classifier
now do training
num training samples: 119
C: 200 f-score: 0.983051
C: 400 f-score: 0.983051
C: 300 f-score: 0.983051
C: 100 f-score: 0.983051
C: 0.01 f-score: 0.983051
C: 50.005 f-score: 0.983051
C: 25.0075 f-score: 0.983051
C: 12.5088 f-score: 0.983051
C: 6.25938 f-score: 0.983051
C: 3.13469 f-score: 0.983051
C: 1.57234 f-score: 0.983051
C: 0.791172 f-score: 0.983051
C: 0.400586 f-score: 0.974576
best C: 0.791172
test on train:
55 0
0 64

overall accuracy: 1
Part II: elapsed time: 32 seconds.
df.number_of_classes(): 2
Fitting 2 folds for each of 6 candidates, totalling 12 fits
[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers.
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
/Users/zhangfeng/anaconda3/envs/rasaweb/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
[Parallel(n_jobs=1)]: Done 12 out of 12 | elapsed: 0.2s finished
这个为题为啥啊

@howl-anderson
Copy link
Owner

问题是什么?

@Yefeiyang-luis
Copy link

F-score is ill-defined and being set to 0.0 in labels with no predicted samples.'precision', 'predicted', average, warn_for)这句和WARNING rasa_nlu.extractors.mitie_entity_extractor - Example skipped: Invalid entity {'start': 0, 'end': 5, 'value': '下个星期五', 'entity': 'date-time'} in example '下个星期五在南京': entities must span whole tokens. Wrong entity end.这句是什么错误,好像是没训练成功。我跟着步骤一步步做,到后面运行serve的时候,虽然能跑,但是浏览器localhost:5000 输句子,浏览器界面会报错。

@Yefeiyang-luis
Copy link

浏览器localhost:5000/parse?q=明天天气如何 ,会报这样的错,不知道是什么问题
{
"error": "Unable to initialize persistor"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants