-
Notifications
You must be signed in to change notification settings - Fork 53
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
Context API #750
Merged
Context API #750
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
Shoeboxam
force-pushed
the
625-hlapi
branch
4 times, most recently
from
June 8, 2023 01:49
e0e69c8
to
691eed9
Compare
andrewvyrros
approved these changes
Aug 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such a cool way to leverage our core APIs! Will be interesting to see what users think of this approach.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #625
This is an initial implementation of the oft-discussed higher-level api.
Expect many API changes, and please provide feedback to help us evolve it!
See the tests for example usage.
Query
class to help in building measurementsmake_a(input_domain, input_metric, ...)
becomes.a(...)
scale
un-specified, and retrieve the discovered scale param later)__getattr__
magic to dispatch to constructors in thetransformations
andmeasurements
modulescombinators
have manual APIs, that do more than what can be done automaticallyAnalysis
class to manage interactive compositors/odometersAnalysis.sequential_composition(data, unit_of(contributions=1), loss_of(epsilon=1.), weights)
my_analysis.query().dp_sum(bounds, scale=None)
, where d_out is filled in frommy_analysis
d_in
andd_out
of the query were filled in from the current state ofmy_analysis
Example:
Each query requires an explicit
release()
. This is because:sink_csv
orsink_parquet
TODO: Consider renaming to
Session
.