def _create_algorithm_and_env(root_dir):
"""Create algorithm and env from config file."""
alf.reset_configs()
conf_file = common.get_conf_file()
try:
common.parse_conf_file(conf_file)
When creating the algorithm2, we use runpy to run the conf file again. However, if the conf file imports another base conf file, then runpy won't reload the module. As we've already reset all alf configs, this will make the configs in the base conf file not properly configured.