mlrun.platforms#

mlrun.platforms.pprint(object, stream=None, indent=1, width=80, depth=None, *, compact=False, sort_dicts=True)[source]#

Pretty-print a Python object to a stream [default is sys.stdout].

mlrun.platforms.sleep(seconds)#

Delay execution for a given number of seconds. The argument may be a floating point number for subsecond precision.

mlrun.platforms.watch_stream(url, shard_ids: list | None = None, seek_to: str | None = None, interval=None, is_json=False, **kwargs)[source]#

watch on a v3io stream and print data every interval

example:

watch_stream("v3io:///users/admin/mystream")
Parameters:
  • url -- stream url

  • shard_ids -- range or list of shard IDs

  • seek_to -- where to start/seek ('EARLIEST', 'LATEST', 'TIME', 'SEQUENCE')

  • interval -- watch interval time in seconds, 0 to run once and return

  • is_json -- indicate the payload is json (will be deserialized)