We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The annotation of the parameter device of PyTorchPredictor is incomplete, it should be Union[str, torch.device]
Union[str, torch.device]
class PyTorchPredictor(RepresentablePredictor): @validated() def __init__( self, input_names: List[str], prediction_net: nn.Module, batch_size: int, prediction_length: int, input_transform: Transformation, forecast_generator: ForecastGenerator = SampleForecastGenerator(), output_transform: Optional[OutputTransform] = None, lead_time: int = 0, device: str = "auto", ) -> None:
pydantic.v1.error_wrappers.ValidationError: 1 validation error for PyTorchPredictorModel device str type expected (type=type_error.str)
The text was updated successfully, but these errors were encountered:
For convenience, this is the line in question
gluonts/src/gluonts/torch/model/predictor.py
Line 53 in 4c8eefd
Sorry, something went wrong.
Thank youuuuuuuuuuuuuuuuuuu! I had the same issue. But thanks to your question I fixed it.
Successfully merging a pull request may close this issue.
Description
The annotation of the parameter device of PyTorchPredictor is incomplete, it should be
Union[str, torch.device]
To Reproduce
Error message or code output
The text was updated successfully, but these errors were encountered: