MCPcopy Create free account
hub / github.com/NVIDIA/DALI / property

Method property

dali/python/nvidia/dali/data_node.py:333–353  ·  view source on GitHub ↗

Returns a metadata property associated with a DataNode Parameters ---------- key : str The name of the metadata item. Currently supported: "source_info" - the file name or location in the dataset where the data originated

(self, key, *, device="cpu")

Source from the content-addressed store, hash-verified

331 return fn._shape(self, dtype=dtype, device=device)
332
333 def property(self, key, *, device="cpu"):
334 """Returns a metadata property associated with a DataNode
335
336 Parameters
337 ----------
338 key : str
339 The name of the metadata item. Currently supported:
340 "source_info" - the file name or location in the dataset where the data originated
341 (each sample is a 1D uint8 tensor)
342 "layout" - the layout string
343 (each sample is a 1D uint8 tensor)
344 device : str, optional
345 The device, where the value is returned; defaults to CPU.
346 """
347
348 from . import fn
349
350 if device == "cpu":
351 self._check_gpu2cpu()
352
353 return fn.get_property(self, key=key, device=device)
354
355 def source_info(self, *, device="cpu"):
356 """Returns the "source_info" property. Equivalent to self.meta("source_info")."""

Callers 4

source_infoMethod · 0.95
verifyMethod · 0.80
_kernelMethod · 0.80

Calls 1

_check_gpu2cpuMethod · 0.95

Tested by

no test coverage detected