-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[ML] Allow users to annotate ML anomaly results #33376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging @elastic/ml-core |
We should think about structured input the user can provide here as well, the simplest thing would be something to the effect of "this is important" or "this is not important". It is much harder to infer things from free text input if we start using this to provide supervision to our models (although having both is no bad thing). |
maybe this is also a solution for this ER? https://github.com/elastic/enhancements/issues/3322 |
We talked about this feature in the roadmap discussion in Dublin and decided that initially this will just be annotations by humans for human consumption. If we ever add user feedback to provide supervision to our models then we can either extend the format or add a new result type to store this feedback separately. |
Some possibilities based on a discussion with @peteharverson are:
If we allow groups we need to decide how and when they'll be expanded to specific job IDs. This makes the deletion logic quite complicated - annotations should be deleted when all jobs they relate to are deleted, but the wide variety of ways of specifying which jobs an annotation relates to makes determination of this complex. |
I wonder if |
We discussed this and decided to have |
We also decided that it would be useful to have persistent annotations, that don't get deleted if all the jobs they relate to get deleted. This would be useful for the case of repeatedly deleting and recreating a job to try out slightly different configurations. So there should be an |
The other thing we discussed is editing annotations. It will be incredibly frustrating for users if they are not allowed to edit annotations, for example, after making a typo. This leads on to the question of who can edit which annotations. Ideally there would be object level security such that each user could only edit annotations they added, unless the owning user opened up the permissions to more users. However, we do not currently have object level security. (The same problem applies to job configs for example.) We should not introduce a form of object level security purely for annotations. Therefore we decided that if you can edit annotations you can edit any annotations. There is also the question of whether creating and editing annotations should be an admin or user level privilege. Most write actions require admin privileges. However, that would cripple annotations as it's likely they'll be most useful to people looking at the results, and these people do not require admin privileges. Therefore we decided that the |
I think this only makes sense for an annotation tied to a single job and single I'm not sure the extra complexity is worth it, but happy to go with other opinions on this if others think it is worthwhile. |
One more problem that emerged is which index to store annotations in when they apply to multiple jobs. The original description of this issue suggested simply a "new result type", but of course different jobs could be using different results indices, so which index should store an annotation that applies to multiple jobs? Some options are:
The third option is nice because it makes it easier to grant write access to annotations to the |
|
Yes, definitely we'll add this index in the ES code. We'll also need to add some sort of cleanup code on the ES side. |
FYI, I wrote up some notes how TypeScript can help us with these kinds of format specifications: https://gist.github.com/walterra/1dd998cf8d14e19f7dd90a98e4d4eb71#file-typescript_interface-md |
The ML UI now provides the ability for users to annotate time periods with arbitrary text to add insight to what happened. This change makes the backend create the index for these annotations, together with read and write aliases to make future upgrades possible without adding complexity to the UI. It also adds read and write permission to the index for all ML users (not just admins). The spec for the index is in https://github.com/elastic/kibana/pull/26034/files#diff-c5c6ac3dbb0e7c91b6d127aa06121b2cR7 Relates elastic#33376 Relates elastic/kibana#26034
The ML UI now provides the ability for users to annotate time periods with arbitrary text to add insight to what happened. This change makes the backend create the index for these annotations, together with read and write aliases to make future upgrades possible without adding complexity to the UI. It also adds read and write permission to the index for all ML users (not just admins). The spec for the index is in https://github.com/elastic/kibana/pull/26034/files#diff-c5c6ac3dbb0e7c91b6d127aa06121b2cR7 Relates #33376 Relates elastic/kibana#26034
The ML UI now provides the ability for users to annotate time periods with arbitrary text to add insight to what happened. This change makes the backend create the index for these annotations, together with read and write aliases to make future upgrades possible without adding complexity to the UI. It also adds read and write permission to the index for all ML users (not just admins). The spec for the index is in https://github.com/elastic/kibana/pull/26034/files#diff-c5c6ac3dbb0e7c91b6d127aa06121b2cR7 Relates #33376 Relates elastic/kibana#26034
The first cut of annotations is in 6.6. Separate issues can be raised for future enhancements. |
It would be nice if a user who knows the reason for an interesting feature in the ML results to be able to annotate this.
To enable this we could add a new
annotation
result type, similar to this:By making the detector index optional, the annotation can apply to either the whole job or just a specific detector.
Unlike other ML results, instead of
timestamp
andbucket_span
annotations havetimestamp
andend_timestamp
so that the annotation can span an arbitrary time period.Originally it was thought that the same functionality could be used by the ML C++ code to add reasons why it created results, but the current thinking is that it is better to have separate functionality for the two use cases, hence elastic/ml-cpp#197 has been raised to discuss labelling by the C++ code.
The text was updated successfully, but these errors were encountered: