OpenVoiceOS / ovos-padatious-pipeline-plugin

A neural network intent parser
http://padatious.readthedocs.io
Apache License 2.0
0 stars 0 forks source link

bug/the training process ended up in an infinite loop... #9

Open JarbasAl opened 6 months ago

JarbasAl commented 6 months ago
          > > One time I tried to create an intent with only the optional syntax and the training process ended up in an infinite loop...

please let us know if this happens, that would be some unknown bug we need to fix!

@JarbasAl I managed to reproduce it:

First intent:

(schalten|schaltet|schalte|schalter|schalt|machen|mache|macht|macher|mach|stellen|stelle|stell|stellt|steller|) (bitte|) (den|die|das|) {entity} (bitte|) (ein|an|einschalten|einschaltet|einschalte|einschalter|einmach|einschalt|einmachen|einmache|einmacht|einmacher|einstellen|einstelle|einstell|einstellt|einsteller|anschalten|anschaltet|anschalte|anschalter|anmach|anschalt|anmachen|anmache|anmacht|anmacher|anstellen|anstelle|anstell|anstellt|ansteller) (schalten|schaltet|schalte|schalter|schalt|machen|mache|macht|macher|mach|stellen|stelle|stell|stellt|steller|) (bitte|)

Second intent:

{entity} (bitte|) (ein|an|einschalten|einschaltet|einschalte|einschalter|einmach|einschalt|einmachen|einmache|einmacht|einmacher|einstellen|einstelle|einstell|einstellt|einsteller|anschalten|anschaltet|anschalte|anschalter|anmach|anschalt|anmachen|anmache|anmacht|anmacher|anstellen|anstelle|anstell|anstellt|ansteller) (bitte|)
{entity} (bitte|) (ein|an) (schalten|schaltet|schalte|schalter|schalt|machen|mache|macht|macher|mach|stellen|stelle|stell|stellt|steller|) (bitte|)
(schalten|schaltet|schalte|schalter|schalt|machen|mache|macht|macher|mach|stellen|stelle|stell|stellt|steller) (bitte|) (den|die|das|) {entity} (bitte|) (an|ein) (bitte|)

From https://github.com/PocketMiner82/skill-homeassistant/blob/20.08/vocab/de-de/turn.on.intent

The issue is that one CPU core is always on 100% when I use the first intent. And it takes ages for OVOS to respond. When I use the second intent, the CPU usage looks normal and it responds immediately. When I had this issue a few weeks ago, it wouldn't even respond at all.

Originally posted by @PocketMiner82 in https://github.com/OpenVoiceOS/skill-ovos-ip/issues/4#issuecomment-2117996157

JarbasAl commented 6 months ago

@PocketMiner82 do you have padatious installed? if you are using padacioso (fallback if padatious not available) it can get really slow indeed, but you should have warning logs in that case

PocketMiner82 commented 6 months ago

@JarbasAl I have padatious installed, yes:

(ovos) pi@mycroft:~ $ pip freeze | grep padatious
padatious==0.4.8

The Logs do not show warnings:

 19:45:34.370 - skills - ovos_workshop.skill_launcher:load:282 - INFO - ATTEMPTING TO LOAD SKILL: skill-homeassistant.mycroftai
 19:45:34.995 - skills - ovos_core.intent_services.padatious_service:train:145 - INFO - Training complete.
 19:45:35.181 - skills - ovos_workshop.skill_launcher:_create_skill_instance:450 - WARNING - Skill load raised exception: HomeAssistantSkill.__init__() got an unexpected keyword argument 'bus'
 19:45:35.185 - skills - ovos_workshop.skill_launcher:get_create_skill_function:136 - WARNING - Deprecation version=0.1.0. Caller=ovos_core.skill_manager:591. `create_skill` method is no longer supported
 19:45:35.190 - skills - ovos_workshop.skill_launcher:_create_skill_instance:482 - WARNING - Deprecation version=0.1.0. Caller=ovos_core.skill_manager:591. This initialization is deprecated. Update skill tohandle passed `skill_id` and `bus` kwargs
 19:45:41.638 - voice - ovos_dinkum_listener.service:on_alive:86 - INFO - DinkumVoiceService is alive.
 19:45:41.654 - voice - ovos_dinkum_listener.voice_loop.hotwords:load_hotword_engines:108 - INFO - creating hotword engines
 19:45:41.682 - voice - ovos_plugin_manager.wakewords:load_module:165 - INFO - Loading "hey_mycroft" wake word via ovos-ww-plugin-precise-lite with config: {'module': 'ovos-ww-plugin-precise-lite', 'model': 'https://github.com/OpenVoiceOS/precise-lite-models/raw/master/wakewords/en/hey_mycroft.tflite', 'expected_duration': 3, 'trigger_level': 3, 'sensitivity': 0.5, 'listen': True, 'fallback_ww': 'hey_mycroft_precise'}
 19:45:42.731 - voice - ovos_plugin_manager.wakewords:load_module:172 - INFO - Loaded the Wake Word hey_mycroft with module ovos-ww-plugin-precise-lite
 19:45:42.745 - voice - ovos_dinkum_listener.voice_loop.hotwords:load_hotword_engines:158 - INFO - Loading hotword: hey_mycroft with engine: <ovos_ww_plugin_precise_lite.PreciseLiteHotwordPlugin object at 0x7f2ddc3cd0>
 19:45:42.755 - voice - ovos_plugin_manager.wakewords:load_module:165 - INFO - Loading "wake_up" wake word via ovos-ww-plugin-pocketsphinx with config: {'module': 'ovos-ww-plugin-pocketsphinx', 'phonemes': 'W EY K . AH P', 'threshold': 1e-20, 'lang': 'en-us', 'wakeup': True, 'fallback_ww': 'wake_up_vosk'}
 19:45:42.877 - voice - ovos_plugin_manager.wakewords:load_module:172 - INFO - Loaded the Wake Word wake_up with module ovos-ww-plugin-pocketsphinx
 19:45:42.939 - voice - ovos_dinkum_listener.voice_loop.hotwords:load_hotword_engines:158 - INFO - Loading hotword: wake_up with engine: <ovos_ww_plugin_pocketsphinx.PocketsphinxHotWordPlugin object at 0x7f3e9fda50>
 19:45:42.942 - voice - ovos_dinkum_listener.voice_loop.hotwords:load_hotword_engines:191 - WARNING - No stop words loaded
 19:45:42.947 - voice - ovos_dinkum_listener.voice_loop.voice_loop:start:177 - INFO - Listening mode: ListeningMode.WAKEWORD
 19:45:42.951 - voice - ovos_dinkum_listener.service:on_started:90 - INFO - DinkumVoiceService started.
 19:45:42.954 - voice - ovos_dinkum_listener.service:on_started:90 - INFO - DinkumVoiceService started.
 19:45:42.958 - voice - ovos_dinkum_listener.service:on_ready:82 - INFO - DinkumVoiceService is ready.
 19:45:42.960 - voice - ovos_dinkum_listener.service:run:316 - INFO - Service ready
 19:45:42.963 - voice - ovos_dinkum_listener.voice_loop.voice_loop:run:203 - INFO - Starting loop in mode: ListeningMode.WAKEWORD
 19:45:59.972 - skills - ovos_workshop.skills.fallback:register_fallback:420 - INFO - registering fallback handler -> ovos.skills.fallback.skill-homeassistant.mycroftai
 19:46:01.599 - skills - ovos_workshop.skill_launcher:_communicate_load_status:503 - INFO - Skill skill-homeassistant.mycroftai loaded successfully
 19:46:08.519 - skills - ovos_workshop.skill_launcher:load:282 - INFO - ATTEMPTING TO LOAD SKILL: skill-ovos-ip
 19:46:20.304 - skills - ovos_core.intent_services.padatious_service:train:145 - INFO - Training complete.
 19:46:27.419 - skills - ovos_core.intent_services.padatious_service:train:145 - INFO - Training complete.
 19:46:38.888 - voice - ovos_dinkum_listener.voice_loop.voice_loop:run:231 - INFO - Wakeword detected
 19:46:40.766 - voice - ovos_dinkum_listener.voice_loop.voice_loop:run:266 - INFO - speech finished
 19:46:42.281 - voice - ovos_dinkum_listener.voice_loop.voice_loop:_after_cmd:678 - INFO - transcribed: Licht an
 19:46:42.876 - skills - ovos_core.transformers:transform:64 - WARNING - ovos-utterance-corrections transform exception: list index out of range
 19:46:46.672 - skill-homeassistant.mycroftai - INFO - Licht Technikzimmer
 19:46:47.104 - skill-homeassistant.mycroftai - INFO - Dialog
 19:46:54.336 - audio - ovos_audio.service:execute_tts:344 - INFO - Speak: Licht Technikzimmer angeschaltet.
 19:48:52.660 - skills - ovos_workshop.skill_launcher:_communicate_load_status:503 - INFO - Skill skill-ovos-ip loaded successfully

(pay attention to the timestamps, I didn't do anything after boot other than saying "Licht an" which means "light on")

Also, if I wait like 5 Minutes, the CPU usage goes down, the RAM is used completely and it takes a lot longer to respond (see screenshot) image