Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename FIFOOffPolicyReplayBuffer to SARSAReplayBuffer in tutorials #104

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
"outputs": [],
"source": [
"from pearl.utils.functional_utils.experimentation.set_seed import set_seed\n",
"from pearl.replay_buffers.sequential_decision_making.fifo_off_policy_replay_buffer import FIFOOffPolicyReplayBuffer\n",
"from pearl.replay_buffers.sequential_decision_making.sarsa_replay_buffer import SARSAReplayBuffer\n",
"from pearl.utils.functional_utils.train_and_eval.online_learning import online_learning\n",
"from pearl.pearl_agent import PearlAgent\n",
"\n",
Expand Down Expand Up @@ -335,7 +335,7 @@
" std_dev=0.1,\n",
" ),\n",
" ),\n",
" replay_buffer=FIFOOffPolicyReplayBuffer(\n",
" replay_buffer=SARSAReplayBuffer(\n",
" capacity=100000,\n",
" has_cost_available=True\n",
" ),\n",
Expand Down Expand Up @@ -446,7 +446,7 @@
" std_dev=0.1,\n",
" ),\n",
" ),\n",
" replay_buffer=FIFOOffPolicyReplayBuffer(\n",
" replay_buffer=SARSAReplayBuffer(\n",
" capacity=100000,\n",
" has_cost_available=True\n",
" ),\n",
Expand Down
10 changes: 5 additions & 5 deletions tutorials/contextual_bandits/contextual_bandits_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"source": [
"from pearl.utils.functional_utils.experimentation.set_seed import set_seed\n",
"from pearl.action_representation_modules.one_hot_action_representation_module import OneHotActionTensorRepresentationModule\n",
"from pearl.replay_buffers.sequential_decision_making.fifo_off_policy_replay_buffer import FIFOOffPolicyReplayBuffer\n",
"from pearl.replay_buffers.sequential_decision_making.sarsa_replay_buffer import SARSAReplayBuffer\n",
"from pearl.utils.functional_utils.train_and_eval.online_learning import online_learning\n",
"from pearl.pearl_agent import PearlAgent\n",
"from pearl.utils.uci_data import download_uci_data\n",
Expand Down Expand Up @@ -534,7 +534,7 @@
" action_representation_module=action_representation_module,\n",
" exploration_module= SquareCBExploration(gamma = env.observation_dim * env.unique_labels_num * number_of_steps)\n",
" ),\n",
" replay_buffer=FIFOOffPolicyReplayBuffer(100_000),\n",
" replay_buffer=SARSAReplayBuffer(100_000),\n",
" device_id=-1,\n",
")\n",
"\n",
Expand Down Expand Up @@ -831,7 +831,7 @@
" action_representation_module=action_representation_module,\n",
" exploration_module= UCBExploration(alpha=1.0)\n",
" ),\n",
" replay_buffer=FIFOOffPolicyReplayBuffer(100_000),\n",
" replay_buffer=SARSAReplayBuffer(100_000),\n",
" device_id=-1,\n",
")\n",
"\n",
Expand Down Expand Up @@ -1111,7 +1111,7 @@
" action_representation_module=action_representation_module,\n",
" exploration_module= ThompsonSamplingExplorationLinear()\n",
" ),\n",
" replay_buffer=FIFOOffPolicyReplayBuffer(100_000),\n",
" replay_buffer=SARSAReplayBuffer(100_000),\n",
" device_id=-1,\n",
")\n",
"\n",
Expand Down Expand Up @@ -1197,4 +1197,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
4 changes: 2 additions & 2 deletions tutorials/frozen_lake/frozen_lake.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"source": [
"from pearl.utils.functional_utils.experimentation.set_seed import set_seed\n",
"from pearl.policy_learners.sequential_decision_making.deep_q_learning import DeepQLearning\n",
"from pearl.replay_buffers.sequential_decision_making.fifo_off_policy_replay_buffer import FIFOOffPolicyReplayBuffer\n",
"from pearl.replay_buffers.sequential_decision_making.sarsa_replay_buffer import SARSAReplayBuffer\n",
"from pearl.utils.functional_utils.train_and_eval.online_learning import online_learning\n",
"from pearl.pearl_agent import PearlAgent\n",
"from pearl.utils.instantiations.environments.gym_environment import GymEnvironment\n",
Expand Down Expand Up @@ -1783,7 +1783,7 @@
" training_rounds=1,\n",
" action_representation_module=action_representation_module\n",
" ),\n",
" replay_buffer=FIFOOffPolicyReplayBuffer(1000),\n",
" replay_buffer=SARSAReplayBuffer(1000),\n",
")\n",
"\n",
"info = online_learning(\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
"from pearl.utils.functional_utils.experimentation.set_seed import set_seed\n",
"from pearl.policy_learners.sequential_decision_making.deep_q_learning import DeepQLearning\n",
"from pearl.policy_learners.sequential_decision_making.double_dqn import DoubleDQN\n",
"from pearl.replay_buffers.sequential_decision_making.fifo_off_policy_replay_buffer import FIFOOffPolicyReplayBuffer\n",
"from pearl.replay_buffers.sequential_decision_making.sarsa_replay_buffer import SARSAReplayBuffer\n",
"from pearl.utils.functional_utils.train_and_eval.online_learning import online_learning\n",
"from pearl.pearl_agent import PearlAgent\n",
"from pearl.utils.instantiations.environments.gym_environment import GymEnvironment\n",
Expand Down Expand Up @@ -292,7 +292,7 @@
" max_number_actions=num_actions\n",
" ),\n",
" ),\n",
" replay_buffer=FIFOOffPolicyReplayBuffer(10_000),\n",
" replay_buffer=SARSAReplayBuffer(10_000),\n",
")"
]
},
Expand Down Expand Up @@ -432,7 +432,7 @@
" max_number_actions=num_actions\n",
" ),\n",
" ),\n",
" replay_buffer=FIFOOffPolicyReplayBuffer(10_000),\n",
" replay_buffer=SARSAReplayBuffer(10_000),\n",
")"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@
"from pearl.replay_buffers.sequential_decision_making.bootstrap_replay_buffer import (\n",
" BootstrapReplayBuffer,\n",
")\n",
"from pearl.replay_buffers.sequential_decision_making.fifo_off_policy_replay_buffer import (\n",
" FIFOOffPolicyReplayBuffer,\n",
"from pearl.replay_buffers.sequential_decision_making.sarsa_replay_buffer import (\n",
" SARSAReplayBuffer,\n",
")\n",
"from pearl.utils.functional_utils.experimentation.set_seed import set_seed\n",
"from pearl.utils.functional_utils.train_and_eval.online_learning import online_learning\n",
Expand Down Expand Up @@ -450,7 +450,7 @@
" training_rounds=50,\n",
" action_representation_module=action_representation_module,\n",
" ),\n",
" replay_buffer=FIFOOffPolicyReplayBuffer(100_000),\n",
" replay_buffer=SARSAReplayBuffer(100_000),\n",
" device_id=device_id,\n",
")\n",
"\n",
Expand Down Expand Up @@ -1526,7 +1526,7 @@
" hidden_dim=128,\n",
" history_length=history_length,\n",
" ),\n",
" replay_buffer=FIFOOffPolicyReplayBuffer(100_000),\n",
" replay_buffer=SARSAReplayBuffer(100_000),\n",
" device_id=device_id,\n",
")\n",
"\n",
Expand Down Expand Up @@ -5673,4 +5673,4 @@
}
}
]
}
}
Loading