Skip to content

Commit d200783

Browse files
authored
[nfc] alias tf_agents.policies.policy_saver as tf_policy_saver (google#528)
1 parent cfcdd82 commit d200783

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler_opt/rl/policy_saver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import tensorflow as tf
2323
from tf_agents.policies import tf_policy
24-
from tf_agents.policies import policy_saver
24+
from tf_agents.policies import policy_saver as tf_policy_saver
2525
from tf_agents.typing import types as tf_agents_types
2626

2727
OUTPUT_SIGNATURE = 'output_spec.json'
@@ -158,8 +158,8 @@ def __init__(self, policy_dict: dict[str, tf_policy.TFPolicy]):
158158
policy_dict: A dict mapping from policy name to policy.
159159
"""
160160
self._policy_saver_dict: dict[str, tuple[
161-
policy_saver.PolicySaver, tf_policy.TFPolicy]] = {
162-
policy_name: (policy_saver.PolicySaver(
161+
tf_policy_saver.PolicySaver, tf_policy.TFPolicy]] = {
162+
policy_name: (tf_policy_saver.PolicySaver(
163163
policy, batch_size=1, use_nest_path_signatures=False), policy
164164
) for policy_name, policy in policy_dict.items()
165165
}

0 commit comments

Comments
 (0)