wandb_setup Subroutine

private subroutine wandb_setup(this, project, name)

Initialise a Weights & Biases run for this network.

Call this once before train. It is a thin wrapper around wandb_init that also stores the project and run name on the type so they are available for diagnostics.

Type Bound

wandb_network_type

Arguments

Type IntentOptional Attributes Name
class(wandb_network_type), intent(inout) :: this

Network instance

character(len=*), intent(in) :: project

W&B project name

character(len=*), intent(in), optional :: name

W&B run display name (optional)


Source Code

  subroutine wandb_setup(this, project, name)
    !! Initialise a Weights & Biases run for this network.
    !!
    !! Call this once before `train`.  It is a thin wrapper around
    !! `wandb_init` that also stores the project and run name on the type so
    !! they are available for diagnostics.
    implicit none

    ! Arguments
    class(wandb_network_type), intent(inout) :: this
    !! Network instance
    character(*), intent(in) :: project
    !! W&B project name
    character(*), intent(in), optional :: name
    !! W&B run display name (optional)

    this%wandb_project = trim(project)
    if(present(name))then
       this%wandb_run_name = trim(name)
       call wandb_init(project=project, name=name)
    else
       this%wandb_run_name = ""
       call wandb_init(project=project)
    end if

  end subroutine wandb_setup