crystalball icon indicating copy to clipboard operation
crystalball copied to clipboard

Get prediction as a list in STDOUT

Open pirj opened this issue 5 years ago • 6 comments

Crystalball needs to be able to list predicted examples without actually running them. It's useful for further load balancing with Knapsack\whatever.

Proposed interface: crystalball --dry-prediction which outputs a list of predicted examples one per line.

Related to #112

pirj avatar Jul 11 '19 15:07 pirj

It would also make Cucumber Support a lot easier

henrich-m avatar Jul 16 '19 17:07 henrich-m

Any update on this? or alternative ways? Thanks.

Neal910 avatar Aug 20 '20 20:08 Neal910

A pull request is welcome!

pirj avatar Aug 20 '20 20:08 pirj

With my prototype PR above, I have been able to output the prediction lists. However per each path the format is something like this ./spec/models/**/create_line_items_spec.rb[1:1:1:1:2]. Is there a way to make the output using line number instead of this [1:1:1:2] structure? Because line number is accepted by most of the rspec framework.

Neal910 avatar Sep 16 '20 17:09 Neal910

Couldn't quickly find it in the docs, but RSpec understands [1:1:1:1:2] as well.

pirj avatar Sep 17 '20 07:09 pirj

Spec address based on line number doesn't work well with shared examples or cycles, that's why 🔮 uses example id.

pluff avatar Sep 17 '20 08:09 pluff