GithubHelp home page GithubHelp logo

Comments (5)

fmamberti-wandb avatar fmamberti-wandb commented on July 4, 2024

Hi @ColdFrenzy - thanks for reaching out!

Are you trying to plot something like this:

Screenshot 2024-01-31 at 18 05 08

If that is the case, you can pass a list containing the distribution over time to wandb.Histogram():

# Generating random data
steps = np.arange(0, 10, 1)
distribution_samples = [np.random.normal(loc=i, scale=1, size=100) for i in steps]

# Log the distribution samples over time using wandb.Histogram
for t, samples in zip(steps, distribution_samples):
    wandb.log({"step": t, "distribution_samples": wandb.Histogram(samples)})

Let me know if you have any questions about this.

from wandb.

ColdFrenzy avatar ColdFrenzy commented on July 4, 2024

Hi @fmamberti-wandb thank you for your answer. Actually, if I try to use this method, it actually logs nothing, I'm not sure why.

train_metrics["train_metrics/strategy_duration"] =  wandb.Histogram(np.array([value/sum(strategy_duration.values()) for _, value in strategy_duration.items()]))

That's part of the metric that I log, but doing so, there is no chart called "strategy_duration" on wandb

from wandb.

fmamberti-wandb avatar fmamberti-wandb commented on July 4, 2024

Hi @ColdFrenzy, how are you logging train_metrics["train_metrics/strategy_duration"] ?

for the Histogram to be plotted as shown above, every time a step is logged (so every time you run wandb.log()) you should pass the array with the distribution for one step to wandb.Histogram(), rather than a list of arrays with all the distributions.

from wandb.

fmamberti-wandb avatar fmamberti-wandb commented on July 4, 2024

Hi @ColdFrenzy , 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.

from wandb.

fmamberti-wandb avatar fmamberti-wandb commented on July 4, 2024

Hi @ColdFrenzy, 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!

from wandb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.