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(docs): Document low-level Python API for creating calls #2345

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

adrnswanberg
Copy link
Contributor

@adrnswanberg adrnswanberg commented Sep 11, 2024

Adds an example to docs of how to use weave.create_call and weave.finish_call to trace function calls.

Relevant new section:

image

weave.finish_call(call, output="Hello, World!")

# Call your function
print(my_function.call("World"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this just be my_function("World")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch -- copied too much of the existing code 🤦

while we're at it -- any reason to present the other examples on this page this way?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, not sure what you mean

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

^ here's the example we have for using @weave.op. Not sure why we want to highlight that you can do .call here. Should we just simplify?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh I see - yes I agree, no reason to use .call here

@circle-job-mirror
Copy link

circle-job-mirror bot commented Sep 11, 2024

@adrnswanberg adrnswanberg merged commit 0074a4c into master Sep 11, 2024
26 checks passed
@adrnswanberg adrnswanberg deleted the adrian/docs/call_api branch September 11, 2024 05:51
@github-actions github-actions bot locked and limited conversation to collaborators Sep 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.

3 participants