How to use the vowpalwabbit.pyvw.SearchTask.__init__ function in vowpalwabbit

To help you get started, we’ve selected a few vowpalwabbit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github VowpalWabbit / vowpal_wabbit / python / examples / test_search_ldf.py View on Github external
def __init__(self, vw, sch, num_actions):
        # you must must must initialize the parent class
        # this will automatically store self.sch <- sch, self.vw <- vw
        pyvw.SearchTask.__init__(self, vw, sch, num_actions)

        # set whatever options you want
        sch.set_options( sch.AUTO_HAMMING_LOSS | sch.AUTO_CONDITION_FEATURES | sch.IS_LDF )
github VowpalWabbit / vowpal_wabbit / python / examples / test_search.py View on Github external
def __init__(self, vw, sch, num_actions):
        # you must must must initialize the parent class
        # this will automatically store self.sch <- sch, self.vw <- vw
        pyvw.SearchTask.__init__(self, vw, sch, num_actions)

        # you can test program options with sch.po_exists
        # and get their values with sch.po_get -> string and
        # sch.po_get_int -> int
        if sch.po_exists('search'):
            print('found --search')
            print('--search value =', sch.po_get('search'), ', type =', type(sch.po_get('search')))

        # set whatever options you want
        sch.set_options( sch.AUTO_HAMMING_LOSS | sch.AUTO_CONDITION_FEATURES )
github VowpalWabbit / vowpal_wabbit / python / examples / word_alignment.py View on Github external
def __init__(self, vw, sch, num_actions):
        pyvw.SearchTask.__init__(self, vw, sch, num_actions)
        sch.set_options( sch.AUTO_HAMMING_LOSS | sch.IS_LDF | sch.AUTO_CONDITION_FEATURES )
github VowpalWabbit / vowpal_wabbit / python / examples / xor.py View on Github external
def __init__(self, vw, sch, num_actions):
        pyvw.SearchTask.__init__(self, vw, sch, num_actions)
        sch.set_options( sch.AUTO_CONDITION_FEATURES )
github VowpalWabbit / vowpal_wabbit / python / examples / covington.py View on Github external
def __init__(self, vw, sch, num_actions):
        pyvw.SearchTask.__init__(self, vw, sch, num_actions)
        sch.set_options( sch.AUTO_HAMMING_LOSS | sch.IS_LDF | sch.AUTO_CONDITION_FEATURES )
github VowpalWabbit / vowpal_wabbit / python / examples / covington.py View on Github external
def __init__(self, vw, sch, num_actions):
        pyvw.SearchTask.__init__(self, vw, sch, num_actions)
        sch.set_options( sch.AUTO_HAMMING_LOSS | sch.AUTO_CONDITION_FEATURES )

vowpalwabbit

Vowpal Wabbit Python package

BSD-3-Clause
Latest version published 5 months ago

Package Health Score

83 / 100
Full package analysis

Similar packages