Lǎoshī de pīpíng suīrán nántīng, què shì liángyào-kǔkǒu.
The teacher's criticism is unpleasant to hear, but like bitter medicine it does you good.
Tips
history
The full saying is 良药苦口利于病,忠言逆耳利于行 "good medicine is bitter but cures the illness; honest advice grates on the ear but guides your actions". It goes back to the 《孔子家语》, with an earlier version in the 《韩非子》.