model.eval().do_something().train() will only work if do_something() return a reference to the model object.
And even if it works, I personally wouldn’t recommend it!
I find it much more readible and clear to do it this way:
model.eval()
model.do_something()
model.train()