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

Add BQ example to showcase cloud streaming of benchmark records #85

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

nicholasjng
Copy link
Collaborator

In this setup, we show how easy it is to stream records completely
without a reporter by simply ingesting the JSON representations resulting
from BenchmarkRecord.compact().

This might be the way forward for most of our examples in place of a
dedicated reporter.


Clean up mypy config to allow dupe filenames in examples/

< no message>

Make contextkeys() an API to handle separator properly

The BQ example revealed that we cannot just store the keys as a property
on our class, since they might not be digestible by a database if certain
illegal characters are used.

For BQ, this was the case with the default "." separator, which means we
have to pipe the separator through in the BenchmarkRecord.compact()
call. Hence, the context keys need to be fetched dynamically.

Closes #66.

@nicholasjng nicholasjng added the documentation Improvements or additions to documentation label Feb 22, 2024
@nicholasjng nicholasjng self-assigned this Feb 22, 2024
Copy link
Collaborator

@maxmynter maxmynter left a comment

Choose a reason for hiding this comment

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

Nice

src/nnbench/types.py Outdated Show resolved Hide resolved
The BQ example revealed that we cannot just store the keys as a property
on our class, since they might not be digestible by a database if certain
illegal characters are used.

For BQ, this was the case with the default "." separator, which means we
have to pipe the separator through in the `BenchmarkRecord.compact()`
call. Hence, the context keys need to be fetched dynamically.
In this setup, we show how easy it is to stream records completely
without a reporter by simply ingesting the JSON representations resulting
from `BenchmarkRecord.compact()`.

This might be the way forward for most of our examples in place of a
dedicated reporter.
@nicholasjng nicholasjng merged commit 638e35a into main Feb 22, 2024
5 checks passed
@nicholasjng nicholasjng deleted the add-bq-example branch February 22, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add example: Streaming results to a database
2 participants