Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 11, 2023
1 parent 8f34567 commit fbd561e
Show file tree
Hide file tree
Showing 19 changed files with 27 additions and 18 deletions.
1 change: 0 additions & 1 deletion moderl/mode_rl.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def mode_rl_loop(
):
converged = False
while not converged:

opt_result = explorative_controller.optimise()

X, Y = [], []
Expand Down
1 change: 1 addition & 0 deletions subtrees/mosvgpe/mosvgpe/mixture_of_experts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

logger = logging.getLogger(__name__)


# class MixtureOfExpertsBase(gpf.models.BayesianModel, abc.ABC):
# class MixtureOfExpertsBase(tf.keras.Model, abc.ABC):
class MixtureOfExpertsBase(tf.keras.Model, BayesianModel, abc.ABC):
Expand Down
5 changes: 4 additions & 1 deletion subtrees/simenvs/simenvs/point_mass/generate_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def generate_point_mass_dataset(
toml_env_config_file, gating_bitmap_filename=gating_bitmap_file
)

(state_action_inputs, delta_state_outputs,) = generate_transitions_dataset(
(
state_action_inputs,
delta_state_outputs,
) = generate_transitions_dataset(
num_states=num_states,
num_actions=num_actions,
env=env,
Expand Down
1 change: 0 additions & 1 deletion subtrees/simenvs/simenvs/quadcopter/quadcopter_2D_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ def policy(i):


if __name__ == "__main__":

record_env()
# test_Quadcopter3DEnv()
# test_VelocityControlledQuadcopter2DEnv()
Expand Down
1 change: 0 additions & 1 deletion subtrees/simenvs/simenvs/quadcopter/quadcopter_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,6 @@ def policy(i):


if __name__ == "__main__":

record_env()
# test_Quadcopter3DEnv()
# test_VelocityControlledQuadcopter2DEnv()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gating_bitmap = "./bitmaps/gating_mask.bmp" # filename for gating bitmap
# gating_bitmap = "../scenario-1/gating_mask.bmp" # filename for gating bitmap

# lists are converted to 1D np.arrays and floats/ints are broadcast
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# state constraints
min_state = [-3.0, -2.0]
max_state = [3.0, 3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
# configure environment from toml config file
env = parse_toml_config_to_VelocityControlledQuadcopter2DEnv(toml_env_config_file)

(state_action_inputs, delta_state_outputs,) = generate_transitions_dataset_const_action(
(
state_action_inputs,
delta_state_outputs,
) = generate_transitions_dataset_const_action(
action, num_states=num_states, env=env, omit_data_mask=omit_data_mask
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
# configure environment from toml config file
env = parse_toml_config_to_VelocityControlledQuadcopter2DEnv(toml_env_config_file)

(state_action_inputs, delta_state_outputs,) = generate_transitions_dataset(
(
state_action_inputs,
delta_state_outputs,
) = generate_transitions_dataset(
num_states=num_states,
num_actions=num_actions,
env=env,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ def generate_point_mass_dataset(
toml_env_config_file, gating_bitmap_filename=gating_bitmap_file
)

(state_action_inputs, delta_state_outputs,) = generate_transitions_dataset(
(
state_action_inputs,
delta_state_outputs,
) = generate_transitions_dataset(
num_states=num_states,
num_actions=num_actions,
env=env,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ def test_tf_env(env):


if __name__ == "__main__":

# test_Quadcopter3DEnv()
# test_VelocityControlledQuadcopter2DEnv()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gating_bitmap = "./bitmaps/gating_mask.bmp" # filename for gating bitmap
# gating_bitmap = "../scenario-1/gating_mask.bmp" # filename for gating bitmap

# lists are converted to 1D np.arrays and floats/ints are broadcast
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# state constraints
min_state = [-3.0, -3.0]
# min_state = [-3.0, -3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gating_bitmap = "./bitmaps/gating_mask.bmp" # filename for gating bitmap
# gating_bitmap = "../scenario-1/gating_mask.bmp" # filename for gating bitmap

# lists are converted to 1D np.arrays and floats/ints are broadcast
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# state constraints
min_state = [-3.0, -2.0]
max_state = [3.0, 3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gating_bitmap = "./bitmaps/gating_mask.bmp" # filename for gating bitmap
# gating_bitmap = "../scenario-1/gating_mask.bmp" # filename for gating bitmap

# lists are converted to 1D np.arrays and floats/ints are broadcast
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# state constraints
min_state = [-3.0, -2.0]
max_state = [3.0, 3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gating_bitmap = "./bitmaps/gating_mask.bmp" # filename for gating bitmap
# gating_bitmap = "../scenario-1/gating_mask.bmp" # filename for gating bitmap

# lists are converted to 1D np.arrays and floats/ints are broadcast
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# state constraints
min_state = [-3.0, -2.0]
max_state = [3.0, 3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gating_bitmap = "./bitmaps/gating_mask.bmp" # filename for gating bitmap
# gating_bitmap = "../scenario-1/gating_mask.bmp" # filename for gating bitmap

# lists are converted to 1D np.arrays and floats/ints are broadcast
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# state constraints
min_state = [-3.1, -3.0]
# min_state = [-3.0, -3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gating_bitmap = "./bitmaps/gating_mask.bmp" # filename for gating bitmap
# gating_bitmap = "../scenario-1/gating_mask.bmp" # filename for gating bitmap

# lists are converted to 1D np.arrays and floats/ints are broadcast
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# state constraints
min_state = [-3.0, -2.0]
max_state = [3.0, 3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gating_bitmap = "./bitmaps/gating_mask.bmp" # filename for gating bitmap
# gating_bitmap = "../scenario-1/gating_mask.bmp" # filename for gating bitmap

# lists are converted to 1D np.arrays and floats/ints are broadcast
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# state constraints
min_state = [-3.0, -3.0]
max_state = [3.0, 3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gating_bitmap = "./bitmaps/gating_mask.bmp" # filename for gating bitmap
# gating_bitmap = "../scenario-1/gating_mask.bmp" # filename for gating bitmap

# lists are converted to 1D np.arrays and floats/ints are broadcast
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# state constraints
min_state = [-3.0, -3.0]
max_state = [3.0, 3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gating_bitmap = "./bitmaps/gating_mask.bmp" # filename for gating bitmap
# gating_bitmap = "../scenario-1/gating_mask.bmp" # filename for gating bitmap

# lists are converted to 1D np.arrays and floats/ints are broadcast
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# e.g min_state = [-3.0, -2.0] is converted with np.array(min_state)
# state constraints
min_state = [-3.0, -3.0]
max_state = [3.0, 3.0]
Expand Down

0 comments on commit fbd561e

Please sign in to comment.