funcx package

Subpackages

Submodules

funcx.config module

class funcx.config.Config(provider=LocalProvider( channel=LocalChannel( envs={}, script_dir=None, userhome='/home/docs/checkouts/readthedocs.org/user_builds/funcx/checkouts/latest/docs' ), cmd_timeout=30, init_blocks=4, launcher=SingleNodeLauncher(), max_blocks=10, min_blocks=0, move_files=None, nodes_per_block=1, parallelism=1, walltime='00:15:00', worker_init='' ), scaling_enabled=True, worker_ports=None, worker_port_range=(54000, 55000), strategy=<funcx.strategies.simple.SimpleStrategy object>, max_workers_per_node=inf, cores_per_worker=1.0, mem_per_worker=None, launch_cmd=None, worker_mode='no_container', scheduler_mode='hard', container_type=None, prefetch_capacity=10, heartbeat_period=2, heartbeat_threshold=10, poll_period=10, working_dir=None, worker_debug=False)

Bases: parsl.utils.RepresentationMixin

Specification of FuncX configuration options.

Parameters:
  • max_workers_per_node (int) – Maximum # of worker per node. Default: inf
  • cores_per_worker (float) – cores to be assigned to each worker. Oversubscription is possible by setting cores_per_worker < 1.0. Default=1
  • mem_per_worker (float) – GB of memory required per worker. If this option is specified, the node manager will check the available memory at startup and limit the number of workers such that the there’s sufficient memory for each worker. Default: None
  • working_dir (str) – Working dir to be used by the executor. Default to the endpoint directory if not specified
  • worker_debug (Bool) – Enables worker debug logging.
  • worker_mode (str) – Select the mode of operation from no_container, singularity_reuse, singularity_single_use Default: no_container
  • scheduler_mode (str) – Select the mode of how the container is managed from hard, soft Default: hard
  • container_type (str) – Select the type of container from Docker, Singularity, Shifter Default: None
  • scaling_enabled (Bool) – Allow Interchange to manage resource provisioning. If set to False, interchange will not do any scaling. Default: True

funcx.errors module

exception funcx.errors.FuncXUnreachable(address)

Bases: funcx.errors.FuncxError

FuncX remote service is unreachable

exception funcx.errors.FuncxError

Bases: Exception

Base class for all funcx exceptions

exception funcx.errors.MalformedResponse(response)

Bases: funcx.errors.FuncxError

FuncX remote service responded with a Malformed Response

exception funcx.errors.RegistrationError(reason)

Bases: funcx.errors.FuncxError

Registering the endpoint has failed

funcx.version module

Set module version.

<Major>.<Minor>.<maintenance>[alpha/beta/..] Alphas will be numbered like this -> 0.4.0a0

Module contents

funcX : Fast function serving for clouds, clusters and supercomputers.

funcx.set_file_logger(filename, name='funcx', level=10, format_string=None)

Add a stream log handler.

Parameters:
  • filename (-) – Name of the file to write logs to
  • name (-) – Logger name
  • level (-) – Set the logging level.
  • format_string (-) – Set the format string
Returns:

  • None

funcx.set_stream_logger(name='funcx', level=10, format_string=None)

Add a stream log handler.

Parameters:
  • name (-) – Set the logger name.
  • level (-) – Set to logging.DEBUG by default.
  • format_string (-) – Set to None by default.
Returns:

  • None