How to get child calls of a call in Weave

Hey there, I am trying to get the child LLM calls associated with a weave call (or even generally child calls would do) but I can’t get it to work and I am so confused. If I try

import weave

client = weave.init("my_project_name")

parent_call_id = '0191f5cc-f0f2-7a51-b463-68ff17f806c5'

all_child_calls = client.calls(filter={"parent_id": parent_call_id})
all_child_calls = list(all_child_calls)

for call in all_child_calls: 
    print(f"Call ID: {call.id}")
    print(f"Operation Name: {call.op_name}")
    print(f"Attributes: {call.attributes}")
    print("-" * 40)

with parent call id being the “id” of an Evaluation.predict_and_score ID, it takes minutes and I get literally thousands of calls, many from several days ago. The response doesn’t seem to indicate any sort of parent-child relationship. What am I getting wrong?

Thanks in advance!

Note to anyone else facing this: might be happening because Weave doesn’t recommend using this API (yet). The calls_query_stream API seems to work.

Hi @mirekro! Thank you for writing in.

Could you share a link to the workspace where you’re seeing this behavior? It would be really helpful if I could take a quick look and see what’s going on firsthand. That way, I can give you more specific guidance and hopefully get this sorted out for you quickly.
Let me know if you have any questions in the meantime.

Hi there, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

I ended up using the other API and didn’t pursue it further so I would say it’s resolved (for me at least). Thank you!