I accomplished the following task(s) this week:
- I successfully compiled Scikit-Learn along with SciPy in a single layer. I had to make some slight modifications to resolve the conflicts but things seemed to work out in the end.
- Completed the dependencies of NLU Intent Engine and also successfully compiled it on target.
- Faced some runtime errors (Undefined Symbols) related to SciPy. Upon further investigation found out that these errors were caused due to failed linking of openblas libraries with SciPy.
- To test my hypothesis I used LD_PRELOAD flag to manually specify the openblas library located at "/usr/lib/libopenblas.so.0" on target. This trick allowed me to successfully run the intent engine on the target machine.
Running NLU Intent Engine: (for anyone who is interested to do so)
- The first step is to clone the updated meta-offline-voice-agent layer into meta-agl-devel.
- You will need to update the templates/feature/agl-offline-voice-agent/50_local.conf.inc with following lines:
# enabling fortran
FORTRAN:forcevariable = ",fortran"RUNTIMETARGET:append:pn-gcc-runtime = " libquadmath"# bad practice but required to build scikit-learnHOSTTOOLS += "gfortran"# all the dependencies which get included in final imageIMAGE_INSTALL:append = " \python3-deprecation \python3-packaging \python3-num2words \python3-pyaml \python3-requests \python3-future \python3-scipy \python3-scikit-learn \python3-threadpoolctl \python3-python-crfsuite \python3-tabulate \python3-six \python3-tqdm \python3-sklearn-crfsuite \python3-snips-nlu-utils \python3-snips-nlu-parsers \python3-nlu-inference-agl \python3-vosk-api \vosk-kaldi \vosk vosk-server \python3-vosk-websocket-server \python3-sounddevice \flutter-vosk-demo \"
- After making the desired changes build the final image, preferably agl-demo-platform.
- Now as soon as you boot into the target image, execute the following command:
export LD_PRELOAD=/usr/lib/libopenblas.so.0
- Now you need to clone the pre-trained model hosted on GitHub. You can use the following commands:
wget https://github.com/malik727/nlu-model-agl/archive/refs/heads/main.zip
unzip main.zipcd nlu-model-agl-main
- Finally, you can load and test the NLU Intent Engine using the following command pattern:
nlu-inference-agl parse /path/to/model-directory -q "your command here"
e.g.
nlu-inference-agl parse model -q "roll down driver side window"
- In order to know more about the NLU Intent Engine model and the currently supported intents, you can visit this repository.
In the coming week, I'll be working on the following task(s):
- Resolve the SciPy and OpenBlas linking issues.
- Complete building of RASA.
You can find a more detailed version of this report on my blog.
Regards,
Malik Talha
_._,_._,_
Links:
You receive all messages sent to this group.
View/Reply Online (#10674) |
Reply To Group
| Reply To Sender
|
Mute This Topic
| New Topic
Your Subscription |
Contact Group Owner |
Unsubscribe
[list-automotive-discussions82@xxxxxxxxxxx]
_._,_._,_