wandb-cpp icon indicating copy to clipboard operation
wandb-cpp copied to clipboard

Step index?

Open tsoc23 opened this issue 1 year ago • 0 comments

Quick question:

How can I specify the step/index during a wandbcpp log event?

it would be cool if we could make multiple wandbcpp::log(dict) log calls from two different locations but which correspond to the same step.

eg:

    torch::Tensor sum = infos.sum(0);
    sum /= env.n_envs;
    float* totals = sum.to(torch::kCPU).data_ptr<float>();
    wandbcpp::internal::object::PyDict dict;
    for (int i = 0; i < env.cfg.n_infos; ++i)
    {
        dict[env.cfg.info_names[i]] = totals[i];
    }
    wandbcpp::log(dict); // how specify step here?

tsoc23 avatar Jul 06 '24 11:07 tsoc23