src/orion/core/utils/backward.py
def populate_priors(metadata):
    """Compute parser state and priors based on user_args and populate metadata."""
    if "user_args" not in metadata:
        return

    update_user_args(metadata)

    parser = OrionCmdlineParser(
        orion.core.config.worker.user_script_config, allow_non_existing_files=True
    )
    if "parser" in metadata:
        # To keep configs like config user_script_config
        parser.config_prefix = metadata["parser"]["config_prefix"]
    parser.parse(metadata["user_args"])

    log.debug("Updating parser for backward compatibility")
    metadata["parser"] = parser.get_state_dict()
    log.debug(pprint.pformat(metadata["parser"]))

    log.debug("Updating priors for backward compatibility")
    metadata["priors"] = dict(parser.priors)
    log.debug(pprint.pformat(metadata["priors"]))
Compute parser state and priors based on user_args and populate metadata.
Compute parser state and priors based on user_args and populate metadata.
Compute parser state and priors based on user_args and populate metadata .
def populate_priors(metadata):
    if "user_args" not in metadata:
        return
    update_user_args(metadata)
    parser = OrionCmdlineParser(
        orion.core.config.worker.user_script_config, allow_non_existing_files=True
    )
    if "parser" in metadata:
        parser.config_prefix = metadata["parser"]["config_prefix"]
    parser.parse(metadata["user_args"])
    log.debug("Updating parser for backward compatibility")
    metadata["parser"] = parser.get_state_dict()
    log.debug(pprint.pformat(metadata["parser"]))
    log.debug("Updating priors for backward compatibility")
    metadata["priors"] = dict(parser.priors)
    log.debug(pprint.pformat(metadata["priors"]))
def populate_priors ( metadata ) : if "user_args" not in metadata : return update_user_args ( metadata ) parser = OrionCmdlineParser ( orion . core . config . worker . user_script_config , allow_non_existing_files = True ) if "parser" in metadata : parser . config_prefix = metadata [ "parser" ] [ "config_prefix" ] parser . parse ( metadata [ "user_args" ] ) log . debug ( "Updating parser for backward compatibility" ) metadata [ "parser" ] = parser . get_state_dict ( ) log . debug ( pprint . pformat ( metadata [ "parser" ] ) ) log . debug ( "Updating priors for backward compatibility" ) metadata [ "priors" ] = dict ( parser . priors ) log . debug ( pprint . pformat ( metadata [ "priors" ] ) )
Compute parser state and priors based on user_args and populate metadata.
Compute parser state and priors based on user_args and populate metadata .
"""Compute parser state and priors based on user_args and populate metadata.""" # To keep configs like config user_script_config
metadata