PyMC3 assigns a default value to each Random Variable, for Normal distribution it is the mean. So in this case the underlying default value is sharednf, when it is super huge and the new set_value is too far away from it, the gradient is essentially 0.
There are a few way to fix it:
1, providing starting value to pm.sample:
pm.sample(..., start={"test"+str(1): float(1)})
2, non-center parameterization
with pm.Model() as model:
test = pm.Normal("test"+str(1), mu=0., sd=1**100)
sum = test + 1 + sharednf
pm.Deterministic("sum"+str(1), sum)