get-ml-info.asciidoc 3.3 KB

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