mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[fbcode]Removing @NoIntBaseDeprecated
annotation in evaluation.thrift
file (#150271)
Summary: #buildall Test Plan: ``` buck test 'fbcode//mode/opt' fbcode//caffe2/torch/fb/training_toolkit/applications/bulk_eval/tests:evaluator_test -- --exact 'caffe2/torch/fb/training_toolkit/applications/bulk_eval/tests:evaluator_test - test_setup_evaluation_utils (caffe2.torch.fb.training_toolkit.applications.bulk_eval.tests.evaluator_test.EvaluatorTest)' ``` Differential Revision: D72028940 Pull Request resolved: https://github.com/pytorch/pytorch/pull/150271 Approved by: https://github.com/huydhn
This commit is contained in:
committed by
PyTorch MergeBot
parent
d4c30b4599
commit
5d9c7f78e7
@ -2813,7 +2813,10 @@ class RelaxedNumberPair(NumberPair):
|
||||
elif isinstance(number_like, Enum):
|
||||
return int(number_like) # type: ignore[call-overload]
|
||||
else:
|
||||
return super()._to_number(number_like, id=id)
|
||||
number = super()._to_number(number_like, id=id)
|
||||
if type(number) not in self._TYPE_TO_DTYPE.keys():
|
||||
self._inputs_not_supported()
|
||||
return number
|
||||
|
||||
|
||||
class TensorOrArrayPair(TensorLikePair):
|
||||
|
Reference in New Issue
Block a user