Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorboard logging fixes #544

Merged
merged 6 commits into from
Apr 7, 2022
Merged

Tensorboard logging fixes #544

merged 6 commits into from
Apr 7, 2022

Conversation

uri-granta
Copy link
Collaborator

No description provided.

@uri-granta uri-granta requested a review from hstojic April 6, 2022 13:19
for i, lengthscale in enumerate(lengthscales):
logging.scalar(f"kernel.lengthscale[{i}]", lengthscale)
kernel = self.get_kernel()
if isinstance(kernel, gpflow.kernels.Stationary):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard to say if this would be a good enough check, I don't know GPflow well enough - perhaps add a test for this?

it might be good enough to support only the basic case, but I think we probably can do something more generic, like fetching all trainable variables? I think they also come with names so we can still make it descriptive enough, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check should be sufficient: gpflow.kernels.Stationary is where the lengthscales and variance parameters are set.

Makes sense to add a test. I'll see how much we can extract generically, but it might be tricky inferring types, shapes, etc. If it's too much work this may have to do for now (though I can add it to a WIBNI issue).

Copy link
Collaborator

@hstojic hstojic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would be a bug fix for the kernel parameters, but i suspect we can come up with generic readout of kernel parameters and log all of them - that might work for complex kernels as well

other changes look good

for i, lengthscale in enumerate(lengthscales):
logging.scalar(f"kernel.lengthscale[{i}]", lengthscale)
kernel = self.get_kernel()
components = _merge_leaf_components(leaf_components(kernel))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasnt aware of this, great that you have worked it out!

Copy link
Collaborator

@hstojic hstojic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much better now, great work :)

@uri-granta uri-granta merged commit b4f1ce8 into develop Apr 7, 2022
@uri-granta uri-granta deleted the uri/tensorboard_fix branch April 7, 2022 09:56
@uri-granta uri-granta linked an issue Apr 11, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GPflowPredictor log method cannot handle complex kernels
2 participants