CAREamics / careamics

A deep-learning library for N2V and friends
https://careamics.github.io/
BSD 3-Clause "New" or "Revised" License
30 stars 6 forks source link

[BUG] WandB logger experiment name is always default with n2v configuration #190

Closed nunopimpaomartins closed 3 months ago

nunopimpaomartins commented 3 months ago

Describe the bug While using N2V configuration and the WandB as logger, the experiment name is always shown as "CAREmics" in WandB runs even when the name is set in the configuration.

To Reproduce Code snippet allowing reproducing the behaviour:

config = create_n2v_configuration(
    experiment_name="n2v_zs_npm_ex003_re03_40x_pfaga_dapi",
    data_type="tiff",
    axes="ZYX",
    patch_size=(32, 64, 64),
    batch_size=16,
    num_epochs=100,
    logger="wandb",
)

print(config)

# instantiate a CAREamist
careamist = CAREamist(source=config)

# train
careamist.train(
    train_source=root_path,
    val_percentage=0.1,
    val_minimum_split=1,
)

Expected behavior The experiment name in WandB logger should match the defined name in the configuration of the model.

Screenshots Screenshot of WandB logging wandb

Desktop (please complete the following information):

Environment: careamics_env_20240725.txt

melisande-c commented 3 months ago

Thank you for bringing this to our attention! It seems the experiment_name argument that is used to initialise the CAREamist class (default is "CAREamics"), is what is being passed on to the logger instead of the experiment name in the config. We can get this fixed quickly!