Toggle Menu
Prev Up Next

# `langchain_experimental.rl_chain.base`.VwPolicy

class langchain_experimental.rl_chain.base.VwPolicy(model_repo: ModelRepository, vw_cmd: List[str], feature_embedder: Embedder, vw_logger: VwLogger, *args: Any, **kwargs: Any)

  Vowpal Wabbit policy.

  Methods

  `__init__`(model_repo, vw_cmd, ...) |
  `learn`(event) |
  `log`(event) |
  `predict`(event) |
  `save`() |

  Parameters

    - model_repo (ModelRepository) –

    - vw_cmd (List[str]) –

    - feature_embedder (Embedder) –

    - vw_logger (VwLogger) –

    - args (Any) –

    - kwargs (Any) –

  __init__(model_repo: ModelRepository, vw_cmd: List[str], feature_embedder: Embedder, vw_logger: VwLogger, *args: Any, **kwargs: Any)
    Parameters

      - model_repo (ModelRepository) –

      - vw_cmd (List[str]) –

      - feature_embedder (Embedder) –

      - vw_logger (VwLogger) –

      - args (Any) –

      - kwargs (Any) –

  learn(event: TEvent) → None
    Parameters

      event (TEvent) –

    Return type

      None

  log(event: TEvent) → None
    Parameters

      event (TEvent) –

    Return type

      None

  predict(event: TEvent) → Any
    Parameters

      event (TEvent) –

    Return type

      Any

  save() → None
    Return type

      None