Open mdscheuerell opened 6 years ago
Right, it's actually due to this line, you now need to pass in a string for the tensorflow function (for annoying reasons to do with parallel processing and pointers to python modules). So you can just change it to "tf$cumsum"
.
Though actually you don't need to define that operation anymore, since the dev version now has an apply()
function for greta arrays, and you can use "cumsum"
as the function to apply. It'll be something like: t(apply(x, 2, "cumsum"))
@goldingn: Ah, OK. That line was originally the char string "tf$cumsum"
, but then I had to change it to get things to work with an intermediate ver of greta.
Anyway, I'll just simplify things to use apply()
.
Yeah that's right, I converted it back to passing the function for a while before I realised that precluded using future for parallelism!
@goldingn: OK, making the above change to apply()
works for this line
mod_fit <- model(xx_est, ZZ_est, RR_est, sigma_est)
but the next call to mcmc()
still fails with the same
Error in py_get_attr_impl(x, name, silent)
...
mentioned above.
Looks like a TensorFlow API change 🙄
What's the output of:
tensorflow::tf_version()
and
pkg <- reticulate::import("pkg_resources")
pkg$get_distribution("tensorflow_probability")$version
?
@goldingn
> tensorflow::tf_version()
[1] ‘1.8’
and
> pkg <- reticulate::import("pkg_resources")
> pkg$get_distribution("tensorflow_probability")$version
[1] "0.0.1"
So perhaps I need to update tensorflow? If so, I may have to wait until I can do this from my laptop.
Yeah, it's worth updating tensorflow, but you definitely need to update tensorflow probability. I think that's where the problem lies.
I'll try to add explicit checking of the TFP version
Hey @goldingn, I finally found some time to return to the DFA model in greta, and I ran into a bunch of errors associated with the code changes in the new ver. I think I've got most of them ironed out now, but I can't seem to figure out the following problem with
model()
Specifically, this line causes the following error (with traceback):
Simplifying the call to
mod_fit <- model(sigma_est)
seems to work (i.e., it doesn't return an error), but then the following call to
mcmc()
causes the following error (with traceback):Ideas?