Skip to content

Commit

Permalink
Fixing flags issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
tvmarino committed Nov 1, 2024
1 parent 1018e41 commit 4b36668
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions compiler_opt/rl/generate_bc_trajectories.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,10 @@
from compiler_opt.distributed import buffered_scheduler
from compiler_opt.distributed.local import local_worker_manager

_GIN_FILES = flags.DEFINE_multi_string(
'gin_files', [], 'List of paths to gin configuration files.')
_GIN_BINDINGS = flags.DEFINE_multi_string(
'gin_bindings',
[],
'Gin bindings to override the values set in the config files.',
)
flags.FLAGS['gin_files'].allow_override = True
flags.FLAGS['gin_bindings'].allow_override = True

FLAGS = flags.FLAGS


@dataclasses.dataclass
Expand Down Expand Up @@ -979,7 +976,9 @@ def gen_trajectories(

def main(_):
gin.parse_config_files_and_bindings(
_GIN_FILES.value, bindings=_GIN_BINDINGS.value, skip_unknown=True)
FLAGS.gin_files, bindings=FLAGS.gin_bindings, skip_unknown=True)
logging.info(gin.config_str())

gen_trajectories()


Expand Down

0 comments on commit 4b36668

Please sign in to comment.