KEMBAR78
wandb: Expose training parameters by VelocityRa · Pull Request #1231 · kohya-ss/sd-scripts · GitHub
Skip to content

Conversation

@VelocityRa
Copy link

@VelocityRa VelocityRa commented Apr 1, 2024

This change sends all the training parameters to wandb.ai when that is used instead of TensorBoard (by default ie. if log_tracker_config is not specified).

Now they show up in the Runs table, so it helps to get a better understanding of what the difference is between runs.
It also uses the model's name as run name to give more context.

263689196-57506e88-1eda-477e-8b16-54adcb80f7e4

This is a re-implementation of #792.

@VelocityRa VelocityRa changed the title Expose training parameters to wandb.ai wandb: Expose training parameters Apr 1, 2024
@kohya-ss
Copy link
Owner

kohya-ss commented Apr 2, 2024

Thank you for this PR. This seems to be very simple.

However, I wonder how this works if I don't use wandb? Also some arguments (wandb and hagging face id, absolute path, etc.) would be undesirable to expose for security reasons. A filter for them would be necessary.

I also think we need an option to enable this feature as it would be a breaking change.

@ccharest93
Copy link
Contributor

This wouldn't affect normal workflow if not using wandb, that is because the extra configs are passed within the ['wandb'] key of the configs. This also is not a breaking change for wandb users since the extra arguments can just be ignored on the wandb side.
However i agree that some filtering is necessary, can i revise this PR to be in line with #1123 ?

@rafstahelin
Copy link

This change sends all the training parameters to wandb.ai when that is used instead of TensorBoard (by default ie. if log_tracker_config is not specified).

Now they show up in the Runs table, so it helps to get a better understanding of what the difference is between runs. It also uses the model's name as run name to give more context.

263689196-57506e88-1eda-477e-8b16-54adcb80f7e4 This is a re-implementation of #792.

HI
Seems like SDXL_Train.py has changed. Could you please advise how to change this code so it works again?

This is what I am seeing in Kohya_ss >> sdxl_train.py
image

if accelerator.is_main_process:
        init_kwargs = {}
        if args.wandb_run_name:
            init_kwargs["wandb"] = {"name": args.wandb_run_name, "config": args}
        if args.log_tracker_config is not None:
            init_kwargs = toml.load(args.log_tracker_config)
        accelerator.init_trackers("finetuning" if args.log_tracker_name is None else args.log_tracker_name, init_kwargs=init_kwargs)

Unfortunately, that code "config": args isn't sending args to wandb

thank you

@ccharest93
Copy link
Contributor

@rafstahelin check out #1285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants