Adapt to new sgd library
Remove memory leak in dataset encoding function
Remove redundant print