core._cli_hydra#

Copyright (c) Facebook, Inc. and its affiliates.

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Attributes#

Classes#

Submitit

Derived callable classes are requeued after timeout with their current

Functions#

map_cli_args_to_dist_config(→ dict)

get_hydra_config_from_yaml(→ omegaconf.DictConfig)

runner_wrapper(config, cli_args)

main([args, override_args])

Module Contents#

core._cli_hydra.logger#
class core._cli_hydra.Submitit#

Bases: submitit.helpers.Checkpointable

Derived callable classes are requeued after timeout with their current state dumped at checkpoint.

__call__ method must be implemented to make your class a callable.

Note

The following implementation of the checkpoint method resubmits the full current state of the callable (self) with the initial argument. You may want to replace the method to curate the state (dump a neural network to a standard format and remove it from the state so that not to pickle it) and change/remove the initial parameters.

__call__(dict_config: omegaconf.DictConfig, cli_args: argparse.Namespace) None#
checkpoint(*args, **kwargs)#

Resubmits the same callable with the same arguments

core._cli_hydra.map_cli_args_to_dist_config(cli_args: argparse.Namespace) dict#
core._cli_hydra.get_hydra_config_from_yaml(config_yml: str, overrides_args: list[str]) omegaconf.DictConfig#
core._cli_hydra.runner_wrapper(config: omegaconf.DictConfig, cli_args: argparse.Namespace)#
core._cli_hydra.main(args: argparse.Namespace | None = None, override_args: list[str] | None = None)#