mindspore.dataset.DatasetCache

class mindspore.dataset.DatasetCache(session_id, size=0, spilling=False, hostname=None, port=None, num_connections=None, prefetch_size=None)[source]

A client to interface with tensor caching service.

For details, please check Chinese tutorial, Chinese programming guide.

Parameters
  • session_id (int) – A user assigned session id for the current pipeline.

  • size (int, optional) – Size of the memory set aside for the row caching (default=0 which means unlimited, note that it might bring in the risk of running out of memory on the machine).

  • spilling (bool, optional) – Whether or not spilling to disk if out of memory (default=False).

  • hostname (str, optional) – Host name (default=”127.0.0.1”).

  • port (int, optional) – Port to connect to server (default=50052).

  • num_connections (int, optional) – Number of tcp/ip connections (default=12).

  • prefetch_size (int, optional) – Prefetch size (default=20).