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

[App]: Data not available for various plots #7169

Open
Aveturi13 opened this issue Mar 18, 2024 · 2 comments
Open

[App]: Data not available for various plots #7169

Aveturi13 opened this issue Mar 18, 2024 · 2 comments
Labels
a:app Area: Frontend/Backend

Comments

@Aveturi13
Copy link

Current Behavior

Hi,
I am running a classifier model training script which generates a couple of custom plots: a barplot depicting class frequencies of the train/val set, the ROC and PRC curves of the val-set performance and a confusion matrix. For generating all these plots, I've used the basic functionality provided in the wandb documentation (Code snippets shared below).

I use both cloud and private versions of wandb. In the cloud version, when I run the attached code (shared below), the plots are successfully generated but when running in the local version, I get a "No data available" for all these plots. I'm not sure why exactly this is happening. I would greatly appreciate some help on this!

Expected Behavior

I'm supposed to get the following output (seen in cloud version):

Screenshot 2024-03-17 at 7 07 44 PM

But I get this (local wandb server):

Screenshot 2024-03-17 at 7 17 18 PM

Steps To Reproduce

Following is the code I wrote for generating these charts/plots:

Code for bar plot

# log the class frequencies in each fold
train_classes, train_outputs = np.unique(train.outputs, return_counts=True)
val_classes, val_outputs = np.unique(val.outputs, return_counts=True)
train_outputs = train_outputs / np.sum(train_outputs)
val_outputs = val_outputs / np.sum(val_outputs)

# create wandb tables
train_data = [[label, val] for (label, val) in zip(train_classes, train_outputs)]
train_table = wandb.Table(data=train_data, columns=["class", "frequency"])
val_data = [[label, val] for (label, val) in zip(val_classes, val_outputs)]
val_table = wandb.Table(data=val_data, columns=["class", "frequency"])

# log tables as barplot
wandb.log(
    {
        f"train_distribution_fold": wandb.plot.bar(
    train_table, "class", "frequency", title=f'Class Distribution for Train set'
    ),
    f"val_distribution_fold": wandb.plot.bar(
    val_table, "class", "frequency", title=f'Class Distribution for Val set'
        ),
    }
)

Code for model evaluation charts

# log model evaluation charts
wandb.log(
    {
        "pr": wandb.plot.pr_curve(ground_truths.numpy(), predictions.numpy(), labels=val_ds.class_mapping),
        "roc": wandb.plot.roc_curve(ground_truths.numpy(), predictions.numpy(), labels=val_ds.class_mapping),
        "conf_mat": wandb.plot.confusion_matrix(y_true=ground_truths.numpy(), probs=predictions.numpy(),
class_names=val_ds.class_mapping)
    }
)

Screenshots

No response

Environment

I'm running my code on a remote linux machine and visualizing the results on my desktop browser.

OS: Linux

Browsers: Chrome

Version: Chrome Version 122.0.6261.112 (Official Build) (arm64), W&B Local 0.50.3, W&B package version 0.16.3.

Additional Context

Similar to the suggestions in issue #4368, I ran a wandb verify and got the following:

Default host selected: http://localhost:8081
Find detailed logs for this test at: /tmp/tmpmj4fcxqt/wandb
Checking if logged in...................................................✅
Checking signed URL upload..............................................✅
Checking ability to send large payloads through proxy...................✅
Checking requests to base url...........................................❌
Connections are not made over https. SSL required for secure communications.
Checking requests made over signed URLs.................................❌
Signed URL requests not made over https. SSL is required for secure communications.
Checking CORs configuration of the bucket...............................❌
Your object store does not have a valid CORs configuration, you must allow GET and PUT to Origin: http://localhost:8081
Checking wandb package version is up to date............................✅
Checking logged metrics, saving and downloading a file..................✅
Checking artifact save and download workflows...........................✅

Not sure if the CORs configuration is the issue, but I didn't find any resolution for this issue in #4368

Additionally, here is the commands used to start up the local server on the remote machine:

wandb server start --port 8081
wandb login --host=http://localhost:8081
@kptkin kptkin added the a:app Area: Frontend/Backend label Mar 19, 2024
@umakrishnaswamy
Copy link
Contributor

hey @Aveturi13 - this seems like a CORS issue, but to confirm, would it be possible to send over the console/network logs associated with the workspace where you're not seeing the charts populate? if you're on chrome, you can obtain this by right clicking > Inspect > console/network

@umakrishnaswamy
Copy link
Contributor

hey @Aveturi13 - I wanted to follow up on this. please let me know if you're able to provide the above info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:app Area: Frontend/Backend
Projects
None yet
Development

No branches or pull requests

3 participants