MCPcopy
hub / github.com/dask/dask / tokenize

Function tokenize

dask/delayed.py:392–410  ·  view source on GitHub ↗

Mapping function from task -> consistent name. Parameters ---------- args : object Python objects that summarize the task. pure : boolean, optional If True, a consistent hash function is tried on the input. If this fails, then a unique identifier is used. If

(*args, pure=None, **kwargs)

Source from the content-addressed store, hash-verified

390
391
392def tokenize(*args, pure=None, **kwargs):
393 """Mapping function from task -> consistent name.
394
395 Parameters
396 ----------
397 args : object
398 Python objects that summarize the task.
399 pure : boolean, optional
400 If True, a consistent hash function is tried on the input. If this
401 fails, then a unique identifier is used. If False (default), then a
402 unique identifier is always used.
403 """
404 if pure is None:
405 pure = config.get("delayed_pure", False)
406
407 if pure:
408 return _tokenize(*args, **kwargs)
409 else:
410 return str(uuid.uuid4())
411
412
413@curry

Callers 15

to_sqlFunction · 0.90
project_columnsMethod · 0.70
_checkpoint_oneFunction · 0.70
_bind_oneFunction · 0.70
block_oneFunction · 0.70
finalizeFunction · 0.70
delayedFunction · 0.70
call_functionFunction · 0.70
__init__Method · 0.70
_make_mimesisFunction · 0.70
__init__Method · 0.70
read_bytesFunction · 0.50

Calls 2

_tokenizeFunction · 0.85
getMethod · 0.45

Tested by 9

__dask_tokenize__Method · 0.40
__dask_tokenize__Method · 0.40
__dask_tokenize__Method · 0.40
test_tokenize_hlgFunction · 0.40
test_custom_collectionFunction · 0.40
test_h5py_tokenizeFunction · 0.40
test_frompyfunc_wrapperFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…