(labels: Dict[str, str])
| 109 | # TODO (ryanaoleary@): This function will be removed after the migration to the label |
| 110 | # selector API from NodeLabelSchedulingPolicy is complete. |
| 111 | def validate_node_labels(labels: Dict[str, str]): |
| 112 | if labels is None: |
| 113 | return |
| 114 | for key in labels.keys(): |
| 115 | if key.startswith(ray_constants.RAY_DEFAULT_LABEL_KEYS_PREFIX): |
| 116 | raise ValueError( |
| 117 | f"Custom label keys `{key}` cannot start with the prefix " |
| 118 | f"`{ray_constants.RAY_DEFAULT_LABEL_KEYS_PREFIX}`. " |
| 119 | f"This is reserved for Ray defined labels." |
| 120 | ) |
| 121 | |
| 122 | |
| 123 | def validate_label_key(key: str) -> Optional[str]: |
searching dependent graphs…