RenderingTypePredictor
Hierarchy
- RenderingTypePredictor
Index
Methods
__aenter__
Initialize the predictor upon entering the context manager.
Returns RenderingTypePredictor
__aexit__
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__
Initialize a new instance.
Returns None
clear
Clear and release additional resources used by the predictor.
Returns None
initialize
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 prediction results and retrain the model.
Parameters
request: Request
Used request.
rendering_type: RenderingType
Known suitable
RenderingType
.
Returns None
Stores rendering type for previously crawled URLs and predicts the rendering type for unvisited urls.