usage_constants.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. SCHEMA_VERSION = "0.1"
  2. # The key to store / obtain cluster metadata.
  3. CLUSTER_METADATA_KEY = b"CLUSTER_METADATA"
  4. # The name of a json file where usage stats will be written.
  5. USAGE_STATS_FILE = "usage_stats.json"
  6. USAGE_STATS_ENABLED_ENV_VAR = "RAY_USAGE_STATS_ENABLED"
  7. USAGE_STATS_SOURCE_ENV_VAR = "RAY_USAGE_STATS_SOURCE"
  8. USAGE_STATS_SOURCE_OSS = "OSS"
  9. USAGE_STATS_ENABLED_FOR_CLI_MESSAGE = (
  10. "Usage stats collection is enabled. To disable this, add `--disable-usage-stats` "
  11. "to the command that starts the cluster, or run the following command:"
  12. " `ray disable-usage-stats` before starting the cluster. "
  13. "See https://docs.ray.io/en/master/cluster/usage-stats.html for more details."
  14. )
  15. USAGE_STATS_ENABLED_FOR_RAY_INIT_MESSAGE = (
  16. "Usage stats collection is enabled. To disable this, run the following command:"
  17. " `ray disable-usage-stats` before starting Ray. "
  18. "See https://docs.ray.io/en/master/cluster/usage-stats.html for more details."
  19. )
  20. USAGE_STATS_DISABLED_MESSAGE = "Usage stats collection is disabled."
  21. USAGE_STATS_ENABLED_BY_DEFAULT_FOR_CLI_MESSAGE = (
  22. "Usage stats collection is enabled by default without user confirmation "
  23. "because this terminal is detected to be non-interactive. "
  24. "To disable this, add `--disable-usage-stats` to the command that starts "
  25. "the cluster, or run the following command:"
  26. " `ray disable-usage-stats` before starting the cluster. "
  27. "See https://docs.ray.io/en/master/cluster/usage-stats.html for more details."
  28. )
  29. USAGE_STATS_ENABLED_BY_DEFAULT_FOR_RAY_INIT_MESSAGE = (
  30. "Usage stats collection is enabled by default for nightly wheels. "
  31. "To disable this, run the following command:"
  32. " `ray disable-usage-stats` before starting Ray. "
  33. "See https://docs.ray.io/en/master/cluster/usage-stats.html for more details."
  34. )
  35. USAGE_STATS_CONFIRMATION_MESSAGE = (
  36. "Enable usage stats collection? "
  37. "This prompt will auto-proceed in 10 seconds to avoid blocking cluster startup."
  38. )
  39. LIBRARY_USAGE_SET_NAME = "library_usage_"
  40. HARDWARE_USAGE_SET_NAME = "hardware_usage_"
  41. # Keep in-sync with the same constants defined in usage_stats_client.h
  42. EXTRA_USAGE_TAG_PREFIX = "extra_usage_tag_"
  43. USAGE_STATS_NAMESPACE = "usage_stats"
  44. KUBERNETES_SERVICE_HOST_ENV = "KUBERNETES_SERVICE_HOST"
  45. KUBERAY_ENV = "RAY_USAGE_STATS_KUBERAY_IN_USE"
  46. PROVIDER_KUBERNETES_GENERIC = "kubernetes"
  47. PROVIDER_KUBERAY = "kuberay"