Sorry, just realized I was not using the latest versions of either pymc3 or theano, the problem got solved after updating them (additionally, I had a mess with some installations coming from conda and some from pip and non-official python wheels, perhaps that was causing some trouble).
However, if I try this trick of creating minibatches with a slicing random variable, I get an error:
AdvancedSubtensor1.0 has no test value
For the line that attempts the dot product.
Also, I realized that in the end the problem was in that I was trying to pass in a pandas series with integer type to the observed variable in the pymc3 model, and converting it to float solves the problem in the initial code snippet I posted, e.g. Xval = pm.Minibatch(X.val.astype('float32'))