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
boxplot support for transform 52189 #96515
boxplot support for transform 52189 #96515
Conversation
Pinging @elastic/ml-core (Team:ML) |
@Kiriakos1998 Thanks for your contribution. To make reviewing easier, could you add an example how this looks like if you use the (The preview API returns the deduced mappings, I like to confirm they are ok). We also need a small docs change, so that e.g. https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html lists boxplot. See It should be straightforward to add boxplot there (alphabetic order). |
@elasticmachine test this please |
Hi @hendrikmuhs , This is the schema of my request And this is the result I got |
I also updated the docs and rebased to the main( I think that's why the 2 tests failed). |
Thank you @Kiriakos1998, there is a problem with the mappings, if you look at the generated mappings:
There are no mappings for
It tells transform to take the mapping from the source field (in this case However I think we can default map the boxplot output like percentiles using:
If you change it like this, mappings should be created and all boxplot fields should be mapped to |
I changed it and now I get this result. |
Thank you @Kiriakos1998, LGTM @przemekwitek will have a 2nd look, he is currently on vacation and will pick this up, when he is back @elasticmachine test this please |
Thanks for the feedback @hendrikmuhs. I see again two tests failing but in terms of the docs suite, I can't quite understand why it's happening. As it concerns :x-pack:plugin:transform:test (cit/part-2 suite) it succeeds locally so I am not sure how to investigate the failing task. |
run elasticsearch-ci/part-2 |
d0a16e2
to
2e77e89
Compare
Hi, @przemekwitek I run some of failing test cases and I think the reason was that the release tag moved to 8.10.0 and my branch was at 8.9.0. After I rebased the tests succeeded. |
@elasticmachine test this please |
Hi, @hendrikmuhs @przemekwitek. It fails on the test that I wrote in line 1903. The q1 is actually 3 and not 2.75. But I remember running the test and actually passing with q1 expected to be 2.75. Is it possible that for different test seeds a different q1 is produced? To be honest, I run the test locally again multiple times (q1 expected to be 3) and it never fails so I think that I was sloppy in the first place with this test. |
Yes, it is an approximate algorithm based on TDigest. Please try to run the failing test locally:
It should fail on your local machine given this seed. I think you have to test some of your outputs (q1-q3) using a range instead on an equals check. I am not sure how to get to the right values exactly, but I think it is ok if you do this trial and error as the purpose of this test is the box plot integration, not the algorithm itself. Still it would be good to have values that at least somehow make sense. So I would simply relax the test to check that q1 is within a range of 2.75 - 3. Once you relaxed it you can run many test iterations using this command:
I removed the seed. This command runs If no further adjustments are necessary, can you please paste the output of this command here? |
Indeed it failed.
I run 1000(10000 was giving a timeout exception to the test suite) iterations locally with q1 set to be expecting the value 3 and the output was: |
@elasticmachine update branch |
@elasticmachine test this please |
3842236
to
5c46b0f
Compare
Hello @droberts195, just checked again multiple test repetitions with q1 set to 3 and the test is passing. I also rebased the branch so if you want to run again the suite I believe will succeed this time. |
@elasticmachine test this please |
Add support for boxplot aggregation in transform.
Closes(#52189)