Skip to content

Commit

Permalink
Configure jit-compilation for q-learning.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfi1 committed Oct 20, 2024
1 parent c3fb7e3 commit 8711fb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions slippi_ai/eval_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def multi_sample(
return actions, hidden_state

if run_on_cpu:
if jit_compile:
raise UserWarning("jit compilation may ignore run_on_cpu")
sample = tf_utils.run_on_cpu(sample)
multi_sample = tf_utils.run_on_cpu(multi_sample)

Expand Down
1 change: 1 addition & 0 deletions slippi_ai/train_q_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class RuntimeConfig:
class AgentConfig:
batch_steps: int = 0
compile: bool = True
jit_compile: bool = True
name: str = nametags.DEFAULT_NAME
async_inference: bool = False

Expand Down

0 comments on commit 8711fb3

Please sign in to comment.