Fix Serialization issues and add trident integration test for text classification