mirror of
https://github.com/wassname/ray.git
synced 2026-07-09 11:11:56 +08:00
[RLlib] Add tf-graph by default when doing Policy.export_model(). (#7759)
* Rollback. * WIP. * WIP. * Fix. * LINT.
This commit is contained in:
@@ -347,7 +347,9 @@ class TFPolicy(Policy):
|
||||
signature_def_map = self._build_signature_def()
|
||||
builder.add_meta_graph_and_variables(
|
||||
self._sess, [tf.saved_model.tag_constants.SERVING],
|
||||
signature_def_map=signature_def_map)
|
||||
signature_def_map=signature_def_map,
|
||||
saver=tf.summary.FileWriter(export_dir).add_graph(
|
||||
graph=self._sess.graph))
|
||||
builder.save()
|
||||
|
||||
@override(Policy)
|
||||
|
||||
@@ -233,7 +233,6 @@ class TorchPolicy(Policy):
|
||||
|
||||
def extra_grad_info(self, train_batch):
|
||||
"""Return dict of extra grad info."""
|
||||
|
||||
return {}
|
||||
|
||||
def optimizer(self):
|
||||
|
||||
Reference in New Issue
Block a user