Fix TypeError: '<' not supported between instances of 'NoneType' and 'int' in embeddings_wrappers.py
This pull request fixes the issue where a TypeError occurs due to a comparison between NoneType and int The error was happening in the _set_embeddings_metrics function when recording token counts. The fix ensures that None values are handled appropriately by logging an error and skipping the recording.
Issue Reference: Fixes #1044
Changes Made:
Added a check to handle None values in the usage dictionary.
Logged an error message when a None value is encountered.
@nirga yeah sure! on it.
Thanks @kowshik24! Great work :)
@kowshik24 can you look into the lint issues?
@nirga linting done! Can you please check?
@kowshik24 still seems to fail. Make sure to run locally nx run-many -t lint