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

[Feature]: ability to specify panel configurations in python API #6993

Open
verbose-void opened this issue Feb 13, 2024 · 6 comments
Open

[Feature]: ability to specify panel configurations in python API #6993

verbose-void opened this issue Feb 13, 2024 · 6 comments
Labels
a:cli Area: Client c:custom-charts Component: Custom Charts c:define-metric c:panel ty:feature_request type of the issue is a feature request

Comments

@verbose-void
Copy link

verbose-void commented Feb 13, 2024

Description

for example, every time i want to create a composite panel (let's say i am tracking 3 metrics, mean, max, and min of some value), i have to go in by hand every time i create a new project to define these panels.

same thing with stuff like specifying the x-axis reference values (like if im tracking evaluation and training steps seaparately, i have to go manually select the x-axis to use for every single panel).

EDIT: bonus points if you can also do this same thing but for the "all runs" view (ie. specify figures for how to compare k experiments within a project)

Suggested Solution

probably something like this:

# create an aggregate panel
wandb.panels.configure(
    "train/aggregates",
    type=wandb.line_plot,  # or a str or something
    y_sources=["train/loss_mean", "train/loss_max", "train/loss_min"],
    name="Loss Statistics",
)

# now maybe we want all "train/*" logs to use the "train/steps" numbers as the x-axis?
wandb.panels.configure("train/*", x_source="train/step")  # excludes "train/step" from x-axis modifications

# logging the metrics remains the same:
wandb.log({
    "train/loss_mean": loss.mean().item(),
    "train/loss_max": loss.mean().item(),
    "train/loss_min": loss.mean().item(),
    "train/step": epoch_idx, 
})

ideally a wandb.panels interface would have more than just these features, as it would be nice to be able to do everything from python that we can do from the UI.

i'm just tired of having to go through and click 100 times in the UI for every new wandb project.

Alternatives

alternatively, maybe you could make it so that you can "copy-panels" from a different project name. creating multiple experiments under the same project works that way.

Additional Context

the goal would be to allow people to specify everything they can in the UI-interactions through the python interface.

@verbose-void verbose-void added the ty:feature_request type of the issue is a feature request label Feb 13, 2024
@sergiynesterenko90
Copy link

Yes please! I've wanted to do exactly the same thing. I was manually rearranging panels every single time I ran a new run in order to track what I really cared about. Would have been much better to have it be part of my config script somehow.

@MBakirWB
Copy link

Hi @verbocado, have you considered utilizing custom charts to create a preset panel you can repeatedly use with new runs? This would be the most direct approach here. If custom charts are not ideal use case here, could you speak to the importance of the feature request to your workflow and how custom charts aren't best approach and we'll include your feedback to the feature request. Thanks

@JoanaMarieL
Copy link

Hello @verbocado , following up here if you've manage to try utilizing custom charts? :) Thank you~

@verbose-void
Copy link
Author

@JoanaMarieL i haven't tried it yet, but it looks promising!

@morganmcg1
Copy link
Member

Hey @verbocado , I think the Reports API might help you here too potentially. See the "SDK" tabs in the different sections of the Reports docs

https://docs.wandb.ai/guides/reports/create-a-report

@JoanaMarieL
Copy link

Hi @verbocado , since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

@kptkin kptkin added the a:cli Area: Client label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:cli Area: Client c:custom-charts Component: Custom Charts c:define-metric c:panel ty:feature_request type of the issue is a feature request
Projects
None yet
Development

No branches or pull requests

6 participants