question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature]: Allow for python client to work with run groups

See original GitHub issue

Description

In the web client a user is able to add a tag for an existing run group. It would be nice for the python client to be able to query such groups. For example if a group represents a pipeline of runs (load -> process -> train -> evaluate) a user might want to tag such pipeline with experiment tag when the pipeline is finished. And later query all groups (pipelines) with the experiment tag and do some analysis on the pipeline.

Suggested Solution

Implement apis wandb.apis.public.RunGroups and wandb.apis.public.RunGroup so a user can query group of runs and work with them using:

my_group =  api.run_group(path="my_entity/my_project/gropus/my_group")
my_group.tags.append("experiment")
my_group.update()
...
groups = api.run_groups(path="my_entity/my_project", filters={"tag": "experiment})
for group in groups:
    for run in group.runs(filters={"jobType": "train}):
        print(run.summary['accuarcy'])
        

Alternatives

Expose direct GQL queries and mutations so we can do:

import wandb
from wandb.apis.public import gql

api = wandb.Api()

query = gql(
"""
query runGroup {
    id
    name
    notes
    tags {
        name
        colorIndex
    }
  }
"""
)

res = api.client.execute(query)

Or something similar

Additional Context

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MBakirWBcommented, Jun 21, 2022

Hi @SvetoslavKuzmanov ,

Thank you for the follow-up, I will loop in @vanpelt to continue the conversation.

1reaction
ramit-wandbcommented, Jun 9, 2022

I see. I agree that that is useful, and I will go ahead and ticket this internally so that this can be implemented in a future update.

Thanks, Ramit

Read more comments on GitHub >

github_iconTop Results From Across the Web

multiprocessing — Process-based parallelism — Python 3.11 ...
multiprocessing is a package that supports spawning processes using an API similar to the threading module. The multiprocessing package offers both local and ......
Read more >
Coroutines and Tasks — Python 3.11.1 documentation
The asyncio.create_task() function to run coroutines concurrently as asyncio Tasks . Let's modify the above example and run two say_after coroutines ...
Read more >
argparse — Parser for command-line options, arguments and ...
Source code: Lib/argparse.py Tutorial: This page contains the API reference information. For a more gentle introduction to Python command-line parsing, ...
Read more >
subprocess — Subprocess management — Python 3.11.1 ...
Source code: Lib/subprocess.py The subprocess module allows you to spawn new processes, ... is to use the run() function for all use cases...
Read more >
threading — Thread-based parallelism — Python 3.11.1 ...
asyncio offers an alternative approach to achieving task level concurrency without requiring the use of multiple operating system threads. Note. In the Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found