Skip to content

Commit 5c99dd8

Browse files
Pavlos Athanasios Apostolopoulosfacebook-github-bot
Pavlos Athanasios Apostolopoulos
authored andcommitted
Publishing the model with exploration scores for CB use-cases
Summary: Adding exploration module as part of the output for CB models Removed also is_contextual_bandit from the transoformer's input arguments as this can retrieved by the type of agent Renamde max_number_actions to number_of_actions for clarity Differential Revision: D67604246 fbshipit-source-id: 2bf26ef6ad9e6fd2c9c4b5da128e2c085b0aab48
1 parent 334a08c commit 5c99dd8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pearl/utils/functional_utils/train_and_eval/offline_learning_and_evaluation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ def offline_learning(
189189
batch = data_buffer.sample(offline_agent.policy_learner.batch_size)
190190
assert isinstance(batch, TransitionBatch)
191191
loss = offline_agent.learn_batch(batch=batch)
192-
learning_logger(loss, i, batch, TRAINING_TAG)
192+
if i % 1000 == 0:
193+
learning_logger(loss, i, batch, TRAINING_TAG)
193194

194195

195196
def offline_evaluation(

0 commit comments

Comments
 (0)