Skip to content
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

CCB prediction is not exposed in C# #4250

Open
ataymano opened this issue Oct 25, 2022 · 0 comments
Open

CCB prediction is not exposed in C# #4250

ataymano opened this issue Oct 25, 2022 · 0 comments
Assignees
Labels
Feature Request New feature requested in system

Comments

@ataymano
Copy link
Member

Describe the bug

There is no natural way of calling predict on single example and get prediction result in C# since decision_scores is not exposed here:
https://github.com/VowpalWabbit/vowpal_wabbit/blob/5a600e9ca642935f52f9df10a1d7c3eecd7b2048/cs/cli/vw_prediction.h

How to reproduce

using (var vw = new VW.VowpalWabbit($"--ccb_explore_adf "))
{
    var test = new List<string>();
    test.Add("ccb shared | s_1");
    test.Add("ccb action | a_1");
    test.Add("ccb action | a_2");
    test.Add("ccb action | a_3");
    test.Add("ccb slot |");
    test.Add("ccb slot |");

    using (var coll = new VW.VowpalWabbitMultiLineExampleCollection(vw, null, test.Select(x => vw.ParseLine(x)).ToArray()))
    {
        var prediction = coll.Predict(VW.VowpalWabbitPredictionType.ActionProbabilities);
    }
}
System.ArgumentException: 'Prediction type must be prediction_type_t::action_probs but is prediction_type_t::decision_probs'

Version

9.5

OS

All

Language

C#

Additional context

No response

@ataymano ataymano added the Bug Bug in learning semantics, critical by default label Oct 25, 2022
@ataymano ataymano self-assigned this Oct 27, 2022
@peterychang peterychang added Feature Request New feature requested in system and removed Bug Bug in learning semantics, critical by default labels Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature requested in system
Projects
None yet
Development

No branches or pull requests

2 participants