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

chore(weave): backend to allow call renaming #1699

Merged
merged 53 commits into from
Jun 11, 2024
Merged

Conversation

gtarpenning
Copy link
Member

@gtarpenning gtarpenning commented May 30, 2024

@circle-job-mirror
Copy link

circle-job-mirror bot commented May 30, 2024

@circle-job-mirror
Copy link

project_id: str
call_id: str
# wb_user_id gets generated from auth params
wb_user_id: typing.Optional[str] = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

When is this None? If it is only expected to be None over the wire, then you should consider a specific Req class inside the server definition itself.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah okay, this is the same as Delete so I can do both that way...

Copy link
Member Author

Choose a reason for hiding this comment

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

I realize this is a bit lame but im not 100% sure what you mean, or where the best place for this type to live...

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok let's chat... basically:

We should have class CallRenameReq(BaseModel): here require the wb_user_id and the trace server itself should have a class with such field omitted

Copy link
Collaborator

Choose a reason for hiding this comment

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

honestly, it is a small nit, so maybe not worth it. In Jamie's https://github.com/wandb/weave/pull/1718/files#diff-2628396670e408d29134ac19cc8f01d7d12e9e60821a514e02b0139a03e05d8c, the id is required actually

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, but doesn't call_rename have to be identical in:

  • remote_http_trace_server.py
  • clickhouse_trace_server_batched.py
  • TraceServerInterface in trace_server_interface.py?

Over the wire we don't need wb_run_id, but in the other places we do. @tssweeney

@@ -561,6 +572,16 @@ def delete_call(self, call: Call) -> None:
)
)

@trace_sentry.global_trace_sentry.watch()
def rename_call(self, call: Call, display_name: str) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seeing this pattern makes me wonder, "should all operations follow this pattern?:"

  • LOWEST LEVEL: trace_server_interface has capability directly or indirectly via other capabilities
  • remote_http_trace_server -> exposes http interface in language specific binding (could be generated someday)
  • weave_client: contains some [action]_[class](self, obj: Class, params) to do the action operating on objects
  • HIGHEST LEVEL [Class].action(params) - OO style of action

Maybe so? I like that clarity in design.

@gtarpenning gtarpenning merged commit ca3e477 into master Jun 11, 2024
24 checks passed
@gtarpenning gtarpenning deleted the griffin/rename-traces branch June 11, 2024 17:25
@github-actions github-actions bot locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants