-
Notifications
You must be signed in to change notification settings - Fork 71
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
chore(weave): Add generic iterator for trace server API objects #3177
Conversation
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=866809f160cbd70d99376ec19a324f2039b9312a |
TransformFunc = Callable[[T], R] | ||
|
||
|
||
class PaginatedIterator(Generic[T, R]): |
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 basically a parameterized version of CallsIter
) | ||
return response.calls | ||
|
||
# TODO: Should be Call, not WeaveObject |
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 may need to be done later. Today, we wrap the "Call" in WeaveObject
to give it nice "getting" properties, but the ideal state is to just have all of the functionality on Call
itself. That change is outside the scope of this PR.
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.
Lovely refactor
Purely a refactor to make the
CallsIter
object more generic. This will be used in a subsequent PR to implement something like "ObjectsIter"