fix race conditions in ML engines causing data corruption
Add sync.RWMutex protection to prevent concurrent map access:
- tfidf_engine.go: protect vocabulary and idf maps
- bm25_engine.go: protect vocabulary and idf maps
- markov_generator.go: protect chains and starters maps
- ensemble_system.go: prevent concurrent Train() calls
This fixes the bug where dates appeared in command_frequency
instead of actual commands, and eliminates 'concurrent map
read and map write' panics.
- tfidf_engine.go: protect vocabulary and idf maps
- bm25_engine.go: protect vocabulary and idf maps
- markov_generator.go: protect chains and starters maps
- ensemble_system.go: prevent concurrent Train() calls
This fixes the bug where dates appeared in command_frequency
instead of actual commands, and eliminates 'concurrent map
read and map write' panics.
Authored by
mfwolffe <wolffemf@dukes.jmu.edu>
- SHA
3c407d83a24359d0715da2f19ae0328ea0b1cdc5- Parents
-
08b88f7 - Tree
38c0833