Skip to content

Commit

Permalink
Remove a buggy (?) error.
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Zientkiewicz <[email protected]>
  • Loading branch information
mzient committed Dec 6, 2024
1 parent ff9a004 commit 7fd4e73
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions dali/python/nvidia/dali/ops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from itertools import count

import nvidia.dali.python_function_plugin
import nvidia.dali.types
from nvidia.dali import backend as _b
from nvidia.dali import fn as _functional
from nvidia.dali import internal as _internal
Expand Down Expand Up @@ -329,19 +328,7 @@ def _add_spec_args(schema, spec, kwargs):
# as if the argument was not supplied at all
continue

try:
dtype = schema.GetArgumentType(key)
except:
if key == "seed" and not schema.HasArgument("seed"):
raise ValueError('The argument "seed" is deprecated in operators which '
"don't use random number generators.")
dtype = nvidia.dali.types.INT64

if isinstance(value, (list, tuple)):
if len(value) == 0:
spec.AddArgEmptyList(key, _vector_element_type(dtype))
continue

dtype = schema.GetArgumentType(key)
if isinstance(value, (list, tuple)):
if len(value) == 0:
spec.AddArgEmptyList(key, _vector_element_type(dtype))
Expand Down

0 comments on commit 7fd4e73

Please sign in to comment.