Skip to main content

RenderingTypePredictor

Stores rendering type for previously crawled URLs and predicts the rendering type for unvisited urls.

Hierarchy

Index

Methods

__aenter__

__aexit__

  • async __aexit__(exc_type, exc_value, exc_traceback): None
  • Clear the predictor upon exiting the context manager.


    Parameters

    • exc_type: type[BaseException] | None
    • exc_value: BaseException | None
    • exc_traceback: TracebackType | None

    Returns None

__init__

  • __init__(): None
  • Initialize a new instance.


    Returns None

clear

  • async clear(): None
  • Clear and release additional resources used by the predictor.


    Returns None

initialize

  • async initialize(): None
  • Initialize additional resources required for the predictor operation.


    Returns None

predict

  • Get RenderingTypePrediction based on the input request.


    Parameters

    • request: Request

      Request instance for which the prediction is made.

    Returns RenderingTypePrediction

store_result

  • store_result(request, rendering_type): None
  • Store prediction results and retrain the model.


    Parameters

    Returns None