# \`wandb sync\` doesn't sync CustomCharts, only the related tables

**URL:** <https://community.wandb.ai/t/wandb-sync-doesnt-sync-customcharts-only-the-related-tables/9412>\
**Category:** W&B Help\
**Tags:** wandb\
**Created:** [April 22, 2025, 5:34pm UTC](https://community.wandb.ai/t/wandb-sync-doesnt-sync-customcharts-only-the-related-tables/9412 "2025-04-22T17:34:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![filippovarini](https://avatars.discourse-cdn.com/v4/letter/f/ea5d25/32.png) [@filippovarini](https://community.wandb.ai/u/filippovarini)\
**Post date:** [April 22, 2025, 5:34pm UTC](https://community.wandb.ai/t/wandb-sync-doesnt-sync-customcharts-only-the-related-tables/9412/1 "2025-04-22T17:34:28Z")

</div>

Hi all,

I am building custom charts (PR, ROC curve, Confusion Matrix and a Histogram). When I log them with wandb `online`, all goes well. When I run wandb in `offline` mode and then run `wandb sync <run-directory`, I only see the related tables, not the CustomCharts, like line plots and histograms.

Why is `wandb sync` not uploading the charts?

This is the code to reproduce my issue

```auto
import wandb
import os

wandb_mode = "online"
os.environ["WANDB_MODE"] = wandb_mode
project = "uncategorized"
run_id = "d57l24lc"

run = wandb.init(project=project)

def get_predictions():
    labels = ["cat", "dog", "bird"]
    ground_truth = [0, 1, 2, 0, 1, 2]
    # Predictions of size # samples x # classes
    predictions = [
        [0.1, 0.2, 0.7],
        [0.3, 0.4, 0.3],
        [0.1, 0.2, 0.7],
        [0.1, 0.2, 0.7],
        [0.1, 0.2, 0.7],
        [0.1, 0.2, 0.7],
    ]
    return labels, ground_truth, predictions

def plot_pr_curve():
    labels, ground_truth, predictions = get_predictions()

    wandb.log({"pr": wandb.plot.pr_curve(ground_truth, predictions, labels)})

def plot_confusion_matrix():
    labels, ground_truth, predictions = get_predictions()
    run.log({"confusion_matrix": wandb.plot.confusion_matrix(probs=predictions, y_true=ground_truth, class_names=labels)})

def plot_roc_curve():
    labels, ground_truth, predictions = get_predictions()
    run.log({"roc": wandb.plot.roc_curve(ground_truth, predictions, labels)})
    

def plot_histogram():
    import random
    annotation_tasks_scores = [random.random() for _ in range(100)]
    
    # Create data table with one column for the scores
    data = [[s] for s in annotation_tasks_scores]
    table = wandb.Table(data=data, columns=["scores"])
    
    # Create histogram with custom binning
    wandb.log({
        "Annotation Tasks Scores Distribution": wandb.plot.histogram(
            table,
            "scores",
            title="Annotation Tasks Scores Distribution",
        )
    })
    

plot_pr_curve()
plot_confusion_matrix()
plot_roc_curve()
plot_histogram()

wandb.finish()

```

You can simply make wandb\_mode offline/online to test both beahaviors.

These are the custom charts that should be displayed after `wandb sync`

 ![Screenshot 2025-04-22 at 19.34.55](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/2X/9/9b5935bdaedb86ca45c77988a60aaab17be6a068.png)

Thank you so much in advance!!
