get-ml-info.asciidoc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[get-ml-info]]
  4. = Get machine learning info API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Get {ml} info</titleabbrev>
  8. ++++
  9. Returns defaults and limits used by machine learning.
  10. [[get-ml-info-request]]
  11. == {api-request-title}
  12. `GET _ml/info`
  13. [[get-ml-info-prereqs]]
  14. == {api-prereq-title}
  15. Requires the `monitor_ml` cluster privilege. This privilege is included in the
  16. `machine_learning_user` built-in role.
  17. [[get-ml-info-desc]]
  18. == {api-description-title}
  19. This endpoint is designed to be used by a user interface that needs to fully
  20. understand machine learning configurations where some options are not specified,
  21. meaning that the defaults should be used. This endpoint may be used to find out
  22. what those defaults are. It also provides information about the maximum size
  23. of {ml} jobs that could run in the current cluster configuration.
  24. [[get-ml-info-example]]
  25. == {api-examples-title}
  26. The endpoint takes no arguments:
  27. [source,console]
  28. --------------------------------------------------
  29. GET _ml/info
  30. --------------------------------------------------
  31. // TEST
  32. This is a possible response:
  33. [source,console-result]
  34. ----
  35. {
  36. "defaults" : {
  37. "anomaly_detectors" : {
  38. "categorization_analyzer" : {
  39. "tokenizer" : "ml_classic",
  40. "filter" : [
  41. {
  42. "type" : "stop",
  43. "stopwords" : [
  44. "Monday",
  45. "Tuesday",
  46. "Wednesday",
  47. "Thursday",
  48. "Friday",
  49. "Saturday",
  50. "Sunday",
  51. "Mon",
  52. "Tue",
  53. "Wed",
  54. "Thu",
  55. "Fri",
  56. "Sat",
  57. "Sun",
  58. "January",
  59. "February",
  60. "March",
  61. "April",
  62. "May",
  63. "June",
  64. "July",
  65. "August",
  66. "September",
  67. "October",
  68. "November",
  69. "December",
  70. "Jan",
  71. "Feb",
  72. "Mar",
  73. "Apr",
  74. "May",
  75. "Jun",
  76. "Jul",
  77. "Aug",
  78. "Sep",
  79. "Oct",
  80. "Nov",
  81. "Dec",
  82. "GMT",
  83. "UTC"
  84. ]
  85. }
  86. ]
  87. },
  88. "model_memory_limit" : "1gb",
  89. "categorization_examples_limit" : 4,
  90. "model_snapshot_retention_days" : 10,
  91. "daily_model_snapshot_retention_after_days" : 1
  92. },
  93. "datafeeds" : {
  94. "scroll_size" : 1000
  95. }
  96. },
  97. "upgrade_mode": false,
  98. "native_code" : {
  99. "version": "7.0.0",
  100. "build_hash": "99a07c016d5a73"
  101. },
  102. "limits" : {
  103. "effective_max_model_memory_limit": "28961mb",
  104. "total_ml_memory": "86883mb"
  105. }
  106. }
  107. ----
  108. // TESTRESPONSE[s/"upgrade_mode": false/"upgrade_mode": $body.upgrade_mode/]
  109. // TESTRESPONSE[s/"version": "7.0.0",/"version": "$body.native_code.version",/]
  110. // TESTRESPONSE[s/"build_hash": "99a07c016d5a73"/"build_hash": "$body.native_code.build_hash"/]
  111. // TESTRESPONSE[s/"effective_max_model_memory_limit": "28961mb"/"effective_max_model_memory_limit": "$body.limits.effective_max_model_memory_limit"/]
  112. // TESTRESPONSE[s/"total_ml_memory": "86883mb"/"total_ml_memory": "$body.limits.total_ml_memory"/]