diff --git a/pearl/__init__.py b/pearl/__init__.py new file mode 100644 index 00000000..ef8fe889 --- /dev/null +++ b/pearl/__init__.py @@ -0,0 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .pearl_agent import PearlAgent + +__all__ = ["PearlAgent"] diff --git a/pearl/action_representation_modules/__init__.py b/pearl/action_representation_modules/__init__.py new file mode 100644 index 00000000..49c8e646 --- /dev/null +++ b/pearl/action_representation_modules/__init__.py @@ -0,0 +1,17 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .action_representation_module import ActionRepresentationModule +from .binary_action_representation_module import BinaryActionTensorRepresentationModule +from .identity_action_representation_module import IdentityActionRepresentationModule +from .one_hot_action_representation_module import OneHotActionTensorRepresentationModule + +__all__ = [ + "ActionRepresentationModule", + "BinaryActionTensorRepresentationModule", + "IdentityActionRepresentationModule", + "OneHotActionTensorRepresentationModule", +] diff --git a/pearl/api/__init__.py b/pearl/api/__init__.py new file mode 100644 index 00000000..7e3d5793 --- /dev/null +++ b/pearl/api/__init__.py @@ -0,0 +1,30 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .action import Action +from .action_result import ActionResult +from .action_space import ActionSpace +from .agent import Agent +from .environment import Environment +from .history import History +from .observation import Observation +from .reward import Reward +from .space import Space +from .state import SubjectiveState + + +__all__ = [ + "Action", + "ActionResult", + "ActionSpace", + "Agent", + "Environment", + "History", + "Observation", + "Reward", + "Space", + "SubjectiveState", +] diff --git a/pearl/history_summarization_modules/__init__.py b/pearl/history_summarization_modules/__init__.py new file mode 100644 index 00000000..3815ba14 --- /dev/null +++ b/pearl/history_summarization_modules/__init__.py @@ -0,0 +1,17 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .history_summarization_module import HistorySummarizationModule +from .identity_history_summarization_module import IdentityHistorySummarizationModule +from .lstm_history_summarization_module import LSTMHistorySummarizationModule +from .stacking_history_summarization_module import StackingHistorySummarizationModule + +__all__ = [ + "HistorySummarizationModule", + "IdentityHistorySummarizationModule", + "LSTMHistorySummarizationModule", + "StackingHistorySummarizationModule", +] diff --git a/pearl/neural_networks/__init__.py b/pearl/neural_networks/__init__.py new file mode 100644 index 00000000..4bdc5883 --- /dev/null +++ b/pearl/neural_networks/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. diff --git a/pearl/neural_networks/common/__init__.py b/pearl/neural_networks/common/__init__.py new file mode 100644 index 00000000..fbd97a01 --- /dev/null +++ b/pearl/neural_networks/common/__init__.py @@ -0,0 +1,19 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .epistemic_neural_networks import Ensemble, EpistemicNeuralNetwork, MLPWithPrior +from .residual_wrapper import ResidualWrapper +from .value_networks import ValueNetwork, VanillaCNN, VanillaValueNetwork + +__all__ = [ + "Ensemble", + "EpistemicNeuralNetwork", + "MLPWithPrior", + "ResidualWrapper", + "ValueNetwork", + "VanillaCNN", + "VanillaValueNetwork", +] diff --git a/pearl/neural_networks/contextual_bandit/__init__.py b/pearl/neural_networks/contextual_bandit/__init__.py new file mode 100644 index 00000000..a71a9562 --- /dev/null +++ b/pearl/neural_networks/contextual_bandit/__init__.py @@ -0,0 +1,16 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .base_cb_model import MuSigmaCBModel +from .linear_regression import LinearRegression +from .neural_linear_regression import NeuralLinearRegression + + +__all__ = [ + "MuSigmaCBModel", + "LinearRegression", + "NeuralLinearRegression", +] diff --git a/pearl/neural_networks/sequential_decision_making/__init__.py b/pearl/neural_networks/sequential_decision_making/__init__.py new file mode 100644 index 00000000..ea40513b --- /dev/null +++ b/pearl/neural_networks/sequential_decision_making/__init__.py @@ -0,0 +1,26 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .actor_networks import ( + ActorNetwork, + DynamicActionActorNetwork, + GaussianActorNetwork, + VanillaActorNetwork, + VanillaContinuousActorNetwork, +) +from .q_value_networks import DistributionalQValueNetwork, QValueNetwork +from .twin_critic import TwinCritic + +__all__ = [ + "ActorNetwork", + "VanillaActorNetwork", + "DynamicActionActorNetwork", + "VanillaContinuousActorNetwork", + "GaussianActorNetwork", + "QValueNetwork", + "DistributionalQValueNetwork", + "TwinCritic", +] diff --git a/pearl/policy_learners/__init__.py b/pearl/policy_learners/__init__.py new file mode 100644 index 00000000..f60e8501 --- /dev/null +++ b/pearl/policy_learners/__init__.py @@ -0,0 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .policy_learner import PolicyLearner + +__all__ = ["PolicyLearner"] diff --git a/pearl/policy_learners/contextual_bandits/__init__.py b/pearl/policy_learners/contextual_bandits/__init__.py new file mode 100644 index 00000000..ceb40402 --- /dev/null +++ b/pearl/policy_learners/contextual_bandits/__init__.py @@ -0,0 +1,21 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .contextual_bandit_base import ContextualBanditBase +from .disjoint_bandit import DisjointBanditContainer +from .disjoint_linear_bandit import DisjointLinearBandit +from .linear_bandit import LinearBandit +from .neural_bandit import NeuralBandit +from .neural_linear_bandit import NeuralLinearBandit + +__all__ = [ + "ContextualBanditBase", + "DisjointBanditContainer", + "DisjointLinearBandit", + "LinearBandit", + "NeuralBandit", + "NeuralLinearBandit", +] diff --git a/pearl/policy_learners/exploration_modules/__init__.py b/pearl/policy_learners/exploration_modules/__init__.py new file mode 100644 index 00000000..8fd5045f --- /dev/null +++ b/pearl/policy_learners/exploration_modules/__init__.py @@ -0,0 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .exploration_module import ExplorationModule + +__all__ = ["ExplorationModule"] diff --git a/pearl/policy_learners/exploration_modules/common/__init__.py b/pearl/policy_learners/exploration_modules/common/__init__.py new file mode 100644 index 00000000..4871f20d --- /dev/null +++ b/pearl/policy_learners/exploration_modules/common/__init__.py @@ -0,0 +1,22 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .epsilon_greedy_exploration import EGreedyExploration +from .no_exploration import NoExploration +from .normal_distribution_exploration import NormalDistributionExploration +from .propensity_exploration import PropensityExploration +from .score_exploration_base import ScoreExplorationBase +from .uniform_exploration_base import UniformExplorationBase + + +__all__ = [ + "EGreedyExploration", + "NoExploration", + "NormalDistributionExploration", + "PropensityExploration", + "ScoreExplorationBase", + "UniformExplorationBase", +] diff --git a/pearl/policy_learners/exploration_modules/contextual_bandits/__init__.py b/pearl/policy_learners/exploration_modules/contextual_bandits/__init__.py new file mode 100644 index 00000000..03f9452f --- /dev/null +++ b/pearl/policy_learners/exploration_modules/contextual_bandits/__init__.py @@ -0,0 +1,16 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .squarecb_exploration import SquareCBExploration +from .thompson_sampling_exploration import ThompsonSamplingExplorationLinear +from .ucb_exploration import UCBExploration + + +__all__ = [ + "SquareCBExploration", + "ThompsonSamplingExplorationLinear", + "UCBExploration", +] diff --git a/pearl/policy_learners/exploration_modules/sequential_decision_making/__init__.py b/pearl/policy_learners/exploration_modules/sequential_decision_making/__init__.py new file mode 100644 index 00000000..8eff5b4a --- /dev/null +++ b/pearl/policy_learners/exploration_modules/sequential_decision_making/__init__.py @@ -0,0 +1,12 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .deep_exploration import DeepExploration + + +__all__ = [ + "DeepExploration", +] diff --git a/pearl/policy_learners/sequential_decision_making/__init__.py b/pearl/policy_learners/sequential_decision_making/__init__.py new file mode 100644 index 00000000..134f0b94 --- /dev/null +++ b/pearl/policy_learners/sequential_decision_making/__init__.py @@ -0,0 +1,42 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .actor_critic_base import ActorCriticBase +from .bootstrapped_dqn import BootstrappedDQN +from .ddpg import DeepDeterministicPolicyGradient +from .deep_q_learning import DeepQLearning +from .deep_sarsa import DeepSARSA +from .deep_td_learning import DeepTDLearning +from .double_dqn import DoubleDQN +from .implicit_q_learning import ImplicitQLearning +from .ppo import ProximalPolicyOptimization +from .quantile_regression_deep_q_learning import QuantileRegressionDeepQLearning +from .quantile_regression_deep_td_learning import QuantileRegressionDeepTDLearning +from .reinforce import REINFORCE +from .soft_actor_critic import SoftActorCritic +from .soft_actor_critic_continuous import ContinuousSoftActorCritic +from .tabular_q_learning import TabularQLearning +from .td3 import TD3 + + +__all__ = [ + "ActorCriticBase", + "BootstrappedDQN", + "DeepDeterministicPolicyGradient", + "DeepQLearning", + "DeepSARSA", + "DeepTDLearning", + "DoubleDQN", + "ImplicitQLearning", + "ProximalPolicyOptimization", + "QuantileRegressionDeepQLearning", + "QuantileRegressionDeepTDLearning", + "REINFORCE", + "ContinuousSoftActorCritic", + "SoftActorCritic", + "TabularQLearning", + "TD3", +] diff --git a/pearl/replay_buffers/__init__.py b/pearl/replay_buffers/__init__.py new file mode 100644 index 00000000..4c0db46c --- /dev/null +++ b/pearl/replay_buffers/__init__.py @@ -0,0 +1,23 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .replay_buffer import ReplayBuffer +from .tensor_based_replay_buffer import TensorBasedReplayBuffer +from .transition import ( + Transition, + TransitionBatch, + TransitionWithBootstrapMask, + TransitionWithBootstrapMaskBatch, +) + +__all__ = [ + "ReplayBuffer", + "TensorBasedReplayBuffer", + "Transition", + "TransitionBatch", + "TransitionWithBootstrapMask", + "TransitionWithBootstrapMaskBatch", +] diff --git a/pearl/replay_buffers/contextual_bandits/__init__.py b/pearl/replay_buffers/contextual_bandits/__init__.py new file mode 100644 index 00000000..5ce605dd --- /dev/null +++ b/pearl/replay_buffers/contextual_bandits/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .discrete_contextual_bandit_replay_buffer import ( + DiscreteContextualBanditReplayBuffer, +) + +__all__ = [ + "DiscreteContextualBanditReplayBuffer", +] diff --git a/pearl/replay_buffers/examples/__init__.py b/pearl/replay_buffers/examples/__init__.py new file mode 100644 index 00000000..b5c3c4b9 --- /dev/null +++ b/pearl/replay_buffers/examples/__init__.py @@ -0,0 +1,11 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .single_transition_replay_buffer import SingleTransitionReplayBuffer + +__all__ = [ + "SingleTransitionReplayBuffer", +] diff --git a/pearl/replay_buffers/sequential_decision_making/__init__.py b/pearl/replay_buffers/sequential_decision_making/__init__.py new file mode 100644 index 00000000..602893a0 --- /dev/null +++ b/pearl/replay_buffers/sequential_decision_making/__init__.py @@ -0,0 +1,19 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .bootstrap_replay_buffer import BootstrapReplayBuffer +from .fifo_off_policy_replay_buffer import FIFOOffPolicyReplayBuffer +from .fifo_on_policy_replay_buffer import FIFOOnPolicyReplayBuffer +from .hindsight_experience_replay_buffer import HindsightExperienceReplayBuffer +from .on_policy_episodic_replay_buffer import OnPolicyEpisodicReplayBuffer + +__all__ = [ + "BootstrapReplayBuffer", + "FIFOOffPolicyReplayBuffer", + "FIFOOnPolicyReplayBuffer", + "HindsightExperienceReplayBuffer", + "OnPolicyEpisodicReplayBuffer", +] diff --git a/pearl/safety_modules/__init__.py b/pearl/safety_modules/__init__.py new file mode 100644 index 00000000..c7b6c76d --- /dev/null +++ b/pearl/safety_modules/__init__.py @@ -0,0 +1,18 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .identity_safety_module import IdentitySafetyModule +from .reward_constrained_safety_module import RCSafetyModuleCostCriticContinuousAction +from .risk_sensitive_safety_modules import RiskSensitiveSafetyModule +from .safety_module import SafetyModule + + +__all__ = [ + "IdentitySafetyModule", + "RCSafetyModuleCostCriticContinuousAction", + "RiskSensitiveSafetyModule", + "SafetyModule", +] diff --git a/pearl/user_envs/__init__.py b/pearl/user_envs/__init__.py index 37aaedde..0d13b6fc 100644 --- a/pearl/user_envs/__init__.py +++ b/pearl/user_envs/__init__.py @@ -3,10 +3,6 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -# - -from .envs import * # noqa -from .wrappers import * # noqa try: from gymnasium.envs.registration import register diff --git a/pearl/user_envs/envs/__init__.py b/pearl/user_envs/envs/__init__.py index 6d59cd74..60fa38fe 100644 --- a/pearl/user_envs/envs/__init__.py +++ b/pearl/user_envs/envs/__init__.py @@ -5,4 +5,6 @@ # LICENSE file in the root directory of this source tree. # -from .bandit import * # noqa +from .bandit import MeanVarBanditEnv + +__all__ = ["MeanVarBanditEnv"] diff --git a/pearl/user_envs/wrappers/__init__.py b/pearl/user_envs/wrappers/__init__.py index 9a485890..5d1ed701 100644 --- a/pearl/user_envs/wrappers/__init__.py +++ b/pearl/user_envs/wrappers/__init__.py @@ -5,7 +5,36 @@ # LICENSE file in the root directory of this source tree. # -from .partial_observability import * # noqa -from .safety import * # noqa -from .sparse_reward import * # noqa -from .gym_avg_torque_cost import * # noqa +from .dynamic_action_env import DynamicActionSpaceWrapper +from .gym_avg_torque_cost import GymAvgTorqueWrapper +from .partial_observability import ( + AcrobotPartialObservableWrapper, + CartPolePartialObservableWrapper, + MountainCarPartialObservableWrapper, + PartialObservableWrapper, + PendulumPartialObservableWrapper, + PuckWorldPartialObservableWrapper, +) +from .safety import PuckWorldSafetyWrapper +from .sparse_reward import ( + AcrobotSparseRewardWrapper, + MountainCarSparseRewardWrapper, + PendulumSparseRewardWrapper, + PuckWorldSparseRewardWrapper, +) + +__all__ = [ + "AcrobotPartialObservableWrapper", + "CartPolePartialObservableWrapper", + "MountainCarPartialObservableWrapper", + "PendulumPartialObservableWrapper", + "PuckWorldPartialObservableWrapper", + "PuckWorldSafetyWrapper", + "PuckWorldSparseRewardWrapper", + "AcrobotSparseRewardWrapper", + "MountainCarSparseRewardWrapper", + "PendulumSparseRewardWrapper", + "PartialObservableWrapper", + "GymAvgTorqueWrapper", + "DynamicActionSpaceWrapper", +] diff --git a/pearl/utils/__init__.py b/pearl/utils/__init__.py new file mode 100644 index 00000000..e7306053 --- /dev/null +++ b/pearl/utils/__init__.py @@ -0,0 +1,23 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .device import ( + DeviceNotFoundInModuleError, + get_default_device, + get_device, + get_pearl_device, + is_distribution_enabled, +) +from .tensor_like import assert_is_tensor_like + +__all__ = [ + "assert_is_tensor_like", + "DeviceNotFoundInModuleError", + "get_default_device", + "get_device", + "get_pearl_device", + "is_distribution_enabled", +] diff --git a/pearl/utils/functional_utils/__init__.py b/pearl/utils/functional_utils/__init__.py new file mode 100644 index 00000000..4bdc5883 --- /dev/null +++ b/pearl/utils/functional_utils/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. diff --git a/pearl/utils/functional_utils/experimentation/__init__.py b/pearl/utils/functional_utils/experimentation/__init__.py new file mode 100644 index 00000000..4bdc5883 --- /dev/null +++ b/pearl/utils/functional_utils/experimentation/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. diff --git a/pearl/utils/functional_utils/learning/__init__.py b/pearl/utils/functional_utils/learning/__init__.py new file mode 100644 index 00000000..4bdc5883 --- /dev/null +++ b/pearl/utils/functional_utils/learning/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. diff --git a/pearl/utils/functional_utils/train_and_eval/__init__.py b/pearl/utils/functional_utils/train_and_eval/__init__.py new file mode 100644 index 00000000..4bdc5883 --- /dev/null +++ b/pearl/utils/functional_utils/train_and_eval/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. diff --git a/pearl/utils/instantiations/__init__.py b/pearl/utils/instantiations/__init__.py new file mode 100644 index 00000000..4bdc5883 --- /dev/null +++ b/pearl/utils/instantiations/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. diff --git a/pearl/utils/instantiations/environments/__init__.py b/pearl/utils/instantiations/environments/__init__.py new file mode 100644 index 00000000..ad216a29 --- /dev/null +++ b/pearl/utils/instantiations/environments/__init__.py @@ -0,0 +1,42 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .contextual_bandit_environment import ContextualBanditEnvironment +from .contextual_bandit_linear_synthetic_environment import ( + ContextualBanditLinearSyntheticEnvironment, +) +from .contextual_bandit_uci_environment import SLCBEnvironment +from .environments import ( + BoxObservationsEnvironmentBase, + BoxObservationsFromDiscrete, + FixedNumberOfStepsEnvironment, + OneHotObservationsFromDiscrete, +) +from .gym_environment import GymEnvironment +from .reward_is_equal_to_ten_times_action_contextual_bandit_environment import ( + RewardIsEqualToTenTimesActionContextualBanditEnvironment, +) +from .sparse_reward_environment import ( + ContinuousSparseRewardEnvironment, + DiscreteSparseRewardEnvironment, + SparseRewardEnvironment, +) + + +__all__ = [ + "BoxObservationsEnvironmentBase", + "BoxObservationsFromDiscrete", + "ContinuousSparseRewardEnvironment", + "ContextualBanditEnvironment", + "ContextualBanditLinearSyntheticEnvironment", + "DiscreteSparseRewardEnvironment", + "FixedNumberOfStepsEnvironment", + "GymEnvironment", + "OneHotObservationsFromDiscrete", + "RewardIsEqualToTenTimesActionContextualBanditEnvironment", + "SLCBEnvironment", + "SparseRewardEnvironment", +] diff --git a/pearl/utils/instantiations/spaces/__init__.py b/pearl/utils/instantiations/spaces/__init__.py new file mode 100644 index 00000000..b72c570f --- /dev/null +++ b/pearl/utils/instantiations/spaces/__init__.py @@ -0,0 +1,17 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .box import BoxSpace +from .box_action import BoxActionSpace +from .discrete import DiscreteSpace +from .discrete_action import DiscreteActionSpace + +__all__ = [ + "BoxActionSpace", + "BoxSpace", + "DiscreteActionSpace", + "DiscreteSpace", +] diff --git a/pearl/utils/scripts/__init__.py b/pearl/utils/scripts/__init__.py new file mode 100644 index 00000000..4bdc5883 --- /dev/null +++ b/pearl/utils/scripts/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. diff --git a/pearl/utils/scripts/cb_benchmark/__init__.py b/pearl/utils/scripts/cb_benchmark/__init__.py new file mode 100644 index 00000000..fd71d7ba --- /dev/null +++ b/pearl/utils/scripts/cb_benchmark/__init__.py @@ -0,0 +1,38 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +from .cb_benchmark_config import ( + return_neural_fastcb_config, + return_neural_lin_ts_config, + return_neural_lin_ucb_config, + return_neural_squarecb_config, + return_offline_eval_config, +) +from .cb_download_benchmarks import download_uci_data + +from .run_cb_benchmarks import ( + online_evaluation, + run_cb_benchmarks, + run_experiments, + run_experiments_offline, + run_experiments_online, + train_via_uniform_data, +) + +__all__ = [ + "download_uci_data", + "online_evaluation", + "return_neural_fastcb_config", + "return_neural_lin_ts_config", + "return_neural_lin_ucb_config", + "return_neural_squarecb_config", + "return_offline_eval_config", + "run_cb_benchmarks", + "run_experiments", + "run_experiments_offline", + "run_experiments_online", + "train_via_uniform_data", +] diff --git a/test/__init__.py b/test/__init__.py index e69de29b..4b87eb9e 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. diff --git a/test/integration/__init__.py b/test/integration/__init__.py index e69de29b..4b87eb9e 100644 --- a/test/integration/__init__.py +++ b/test/integration/__init__.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. diff --git a/test/unit/__init__.py b/test/unit/__init__.py index e69de29b..4b87eb9e 100644 --- a/test/unit/__init__.py +++ b/test/unit/__init__.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. diff --git a/test/unit/with_pytorch/__init__.py b/test/unit/with_pytorch/__init__.py index e69de29b..4b87eb9e 100644 --- a/test/unit/with_pytorch/__init__.py +++ b/test/unit/with_pytorch/__init__.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree.