MultiDevContainer

class ivy.MultiDevContainer(dict_in, dev_strs, queues=None, queue_load_sizes=None, container_combine_method='list_join', queue_timeout=None, print_limit=10, print_indent=4, print_line_spacing=0, ivyh=None, keyword_color_dict=None, rebuild_child_containers=False, **kwargs)[source]

Bases: ivy.core.container.Container

__init__(dict_in, dev_strs, queues=None, queue_load_sizes=None, container_combine_method='list_join', queue_timeout=None, print_limit=10, print_indent=4, print_line_spacing=0, ivyh=None, keyword_color_dict=None, rebuild_child_containers=False, **kwargs)[source]

Initialize container object from input dict representation.

Parameters
  • dict_in (dict, optional) – the dictionary the container should wrap around. Default is None.

  • queues (sequence of multiprocessing queues, optional) – Sequence of multiprocessing queues, each of which returns containers. This enables the current container to be passed around asynchronously while waiting for data. Default is None.

  • queue_load_sizes (sequence of ints, optional) – Size of leading dimension of the containers returned by each queue. Default is None.

  • container_combine_method (str, optional) – The method to use for combining containers arriving from different queues. Default is ivy.Container.list_join

  • queue_timeout (float, optional) – The timeout when waiting for containers to arrive from the queues. Default is global.

  • print_limit (int, optional) – The total array size limit when printing the container. Default is 10.

  • print_indent (int, optional) – The number of whitespaces to use for indenting when printing the container. Default is 4.

  • print_line_spacing (int, optional) – The number of extra newlines to use between keys when printing the container. Default is 0.

  • ivyh (handle to ivy module, optional) – Handle to ivy module to use for the calculations. Default is None, which results in the global ivy.

  • keyword_color_dict (dict, optional) – A dict mapping keywords to their termcolor color codes for printing the container.

  • rebuild_child_containers (bool, optional) – Whether to rebuild container found in dict_in with these constructor params. Default is False, in which case the original container are kept as are.

  • types_to_iteratively_nest (seq of iterable types) – The data types to nest iteratively in the dict structure, each type must be iterable. Default is None.

  • kwargs (keyword arguments.) – keyword arguments for dict creation. Default is None.

at_dev(dev_str)[source]
at_devs()[source]

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty