Created
November 26, 2020 00:36
-
-
Save simon-mo/3f120f7f53b82d5a62e200778d54665d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this_node_key = next( | |
| filter( | |
| lambda resource_key: resource_key.startswith("node:"), | |
| next( | |
| filter( | |
| lambda node: ( | |
| node["NodeID"] == ray.get_runtime_context().node_id.hex() | |
| ), | |
| ray.nodes(), | |
| ) | |
| )["Resources"].keys(), | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment