(self, step)
return _parse_gin_config(config_path)
Returns the latest operative config for the global step as dictionary.
Returns the latest operative config for the global step as dictionary.
Returns the latest operative config for the global step as dictionary .
def _get_config_for_step(self, step):
    """Returns the latest operative config for the global step as dictionary."""
    saved_configs = tf.gfile.Glob(
        os.path.join(self.model_dir, "operative_config-*.gin"))
    get_step = lambda fn: int(re.findall(r"operative_config-(\d+).gin", fn)[0])
    config_steps = [get_step(fn) for fn in saved_configs]
    assert config_steps
    last_config_step = sorted([s for s in config_steps if s <= step])[-1]
    config_path = os.path.join(
        self.model_dir, "operative_config-{}.gin".format(last_config_step))
    return _parse_gin_config(config_path)
def _get_config_for_step ( self , step ) : saved_configs = tf . gfile . Glob ( os . path . join ( self . model_dir , "operative_config-*.gin" ) ) get_step = lambda fn : int ( re . findall ( r"operative_config-(\d+).gin" , fn ) [ 0 ] ) config_steps = [ get_step ( fn ) for fn in saved_configs ] assert config_steps last_config_step = sorted ( [ s for s in config_steps if s <= step ] ) [ - 1 ] config_path = os . path . join ( self . model_dir , "operative_config-{}.gin" . format ( last_config_step ) ) return _parse_gin_config ( config_path )