This could be provided as either part of #925 or as a follow-up PR.
The idea is to define a global variable DEFAULT_LOGGER and to make the default value of the logger keyword option in evaluate! equal to DEFAULT_LOGGER, rather than nothing. (And later, do the same for TunedModel and IteratedModel; see JuliaAI/MLJ.jl#1029.)
In __init__ the DEFAULT_LOGGER would be set to nothing but MLJBase will provide a public method default_logger to set and inspect the value. For example:
# inspecting:
julia> default_logger()
nothing
# changing:
using MLFlow
julia> default_logger(MLFlowLogger())
MLFlowLogger(MLFlow(
baseuri = "http://127.0.0.1:5000",
apiversion = 2.0
), "MLJ experiment", nothing)
The required code can be modelled exactly on the DEFAULT_RESOURCE global variable (see src/init.jl) and the default_resource setter/getter (see src/MLJBase.jl).
To do after this integration:
@pebeto
This could be provided as either part of #925 or as a follow-up PR.
The idea is to define a global variable
DEFAULT_LOGGERand to make the default value of theloggerkeyword option inevaluate!equal toDEFAULT_LOGGER, rather thannothing. (And later, do the same forTunedModelandIteratedModel; see JuliaAI/MLJ.jl#1029.)In
__init__theDEFAULT_LOGGERwould be set tonothingbut MLJBase will provide a public methoddefault_loggerto set and inspect the value. For example:The required code can be modelled exactly on the
DEFAULT_RESOURCEglobal variable (see src/init.jl) and thedefault_resourcesetter/getter (see src/MLJBase.jl).To do after this integration:
default_logger@pebeto