MCPcopy
hub / github.com/ray-project/ray / cleanup

Method cleanup

python/ray/tune/trainable/trainable.py:948–962  ·  view source on GitHub ↗

Subclasses should override this for any cleanup on stop. If any Ray actors are launched in the Trainable (i.e., with a RLlib trainer), be sure to kill the Ray actor process here. This process should be lightweight. Per default, You can kill a Ray actor by calling `

(self)

Source from the content-addressed store, hash-verified

946 pass
947
948 def cleanup(self):
949 """Subclasses should override this for any cleanup on stop.
950
951 If any Ray actors are launched in the Trainable (i.e., with a RLlib
952 trainer), be sure to kill the Ray actor process here.
953
954 This process should be lightweight. Per default,
955
956 You can kill a Ray actor by calling `ray.kill(actor)`
957 on the actor or removing all references to it and waiting for garbage
958 collection
959
960 .. versionadded:: 0.8.7
961 """
962 pass
963
964 def _export_model(self, export_formats: List[str], export_dir: str):
965 """Subclasses should override this to export model.

Callers 5

stopMethod · 0.95
mock_serverFunction · 0.45

Calls

no outgoing calls

Tested by 1

mock_serverFunction · 0.36