From 4702cb2a20ae10e843c70ff493be37e44445f9a5 Mon Sep 17 00:00:00 2001 From: tvmarino Date: Tue, 17 Dec 2024 16:36:38 -0500 Subject: [PATCH] Create an imitation_learning directory, called imitation_learning_dir (#397) and move generate_bc_trajectories* there. --- .../generate_bc_trajectories.py | 2 +- .../generate_bc_trajectories_lib.py | 0 .../generate_bc_trajectories_test.py | 10 +++++----- 3 files changed, 6 insertions(+), 6 deletions(-) rename compiler_opt/rl/{ => imitation_learning}/generate_bc_trajectories.py (94%) rename compiler_opt/rl/{ => imitation_learning}/generate_bc_trajectories_lib.py (100%) rename compiler_opt/rl/{ => imitation_learning}/generate_bc_trajectories_test.py (98%) diff --git a/compiler_opt/rl/generate_bc_trajectories.py b/compiler_opt/rl/imitation_learning/generate_bc_trajectories.py similarity index 94% rename from compiler_opt/rl/generate_bc_trajectories.py rename to compiler_opt/rl/imitation_learning/generate_bc_trajectories.py index 027e5639..76b069ed 100644 --- a/compiler_opt/rl/generate_bc_trajectories.py +++ b/compiler_opt/rl/imitation_learning/generate_bc_trajectories.py @@ -20,7 +20,7 @@ from absl import logging import gin -from compiler_opt.rl import generate_bc_trajectories_lib +from compiler_opt.rl.imitation_learning import generate_bc_trajectories_lib from compiler_opt.tools import generate_test_model # pylint:disable=unused-import from tf_agents.system import system_multiprocessing as multiprocessing diff --git a/compiler_opt/rl/generate_bc_trajectories_lib.py b/compiler_opt/rl/imitation_learning/generate_bc_trajectories_lib.py similarity index 100% rename from compiler_opt/rl/generate_bc_trajectories_lib.py rename to compiler_opt/rl/imitation_learning/generate_bc_trajectories_lib.py diff --git a/compiler_opt/rl/generate_bc_trajectories_test.py b/compiler_opt/rl/imitation_learning/generate_bc_trajectories_test.py similarity index 98% rename from compiler_opt/rl/generate_bc_trajectories_test.py rename to compiler_opt/rl/imitation_learning/generate_bc_trajectories_test.py index 43d476f6..c3037833 100644 --- a/compiler_opt/rl/generate_bc_trajectories_test.py +++ b/compiler_opt/rl/imitation_learning/generate_bc_trajectories_test.py @@ -32,7 +32,7 @@ from google.protobuf import text_format # pytype: disable=pyi-error -from compiler_opt.rl import generate_bc_trajectories_lib +from compiler_opt.rl.imitation_learning import generate_bc_trajectories_lib from compiler_opt.rl import env from compiler_opt.rl import env_test @@ -652,12 +652,12 @@ def setUp(self): gin.parse_config_files_and_bindings( config_files=['compiler_opt/rl/inlining/gin_configs/common.gin'], bindings=[ - ('compiler_opt.rl.generate_bc_trajectories_test.' + ('generate_bc_trajectories_test.' 'MockModuleWorker.clang_path="/test/clang/path"'), - ('compiler_opt.rl.generate_bc_trajectories_test.' + ('generate_bc_trajectories_test.' 'MockModuleWorker.exploration_frac=1.0'), - ('compiler_opt.rl.generate_bc_trajectories_test' - '.MockModuleWorker.reward_key="default"'), + ('generate_bc_trajectories_test.' + 'MockModuleWorker.reward_key="default"'), ]) return super().setUp()