MCPcopy Create free account

hub / github.com/Kanegraffiti/Parslet / functions

Functions437 in github.com/Kanegraffiti/Parslet

↓ 42 callersMethodrun
Executes all tasks in the provided DAG according to their dependencies. The method first validates the DAG and gets a topological ex
parslet/core/runner.py:561
↓ 36 callersMethodbuild_dag
Builds the DAG from a list of "entry" ParsletFuture objects. Entry futures are typically the terminal tasks of a workflow (t
parslet/core/dag.py:133
↓ 20 callersFunctionget_battery_level
Return the current battery percentage if available.
parslet/utils/resource_utils.py:122
↓ 18 callersMethodresult
(self)
tests/test_hybrid.py:14
↓ 16 callersFunctionget_available_ram_mb
Returns the available system RAM in Megabytes (MB). This function relies on the `psutil` library. If `psutil` is not installed or if an
parslet/utils/resource_utils.py:83
↓ 14 callersMethodvalidate_dag
Validates the DAG structure, primarily checking for cycles. If the graph is empty, validation is considered successful (vacu
parslet/core/dag.py:196
↓ 9 callersMethodset_exception
Records an exception that occurred during the task's execution. This method is typically called by the `DAGRunner` if the task
parslet/core/task.py:158
↓ 8 callersFunctionload_workflow_module
Load a workflow script or module reference. The ``path`` can either be a filesystem path to a Python file or a ``module:func`` reference. In
parslet/cli.py:42
↓ 8 callersFunctionset_allow_redefine
Globally allow redefining tasks regardless of decorator flags.
parslet/core/task.py:423
↓ 7 callersMethodresult
Retrieves the result of the task. If the task executed successfully, its return value is provided. If the task failed, the e
parslet/core/task.py:175
↓ 6 callersMethodevaluate
Return ``True`` if *all* requirements are satisfied.
parslet/core/context.py:76
↓ 6 callersMethodset_result
Sets the successful result of the task. This method is typically called by the `DAGRunner` once the task has completed succe
parslet/core/task.py:133
↓ 5 callersMethodget_execution_order
Performs a topological sort on the DAG to get a valid execution order of task IDs. Tasks with no dependencies will appear ea
parslet/core/dag.py:252
↓ 5 callersMethodmark_complete
Record a successfully finished task. Parameters ---------- task_id: The unique identifier of the task. st
parslet/utils/checkpointing.py:35
↓ 5 callersFunctionresolve_workflow_entry
Return the workflow entry function for a loaded module. Resolution order: 1) ``main`` function, for backwards compatibility. 2) A single
parslet/cli.py:12
↓ 4 callersMethod_normalise_name
(name: str)
parslet/core/context.py:199
↓ 4 callersMethoddecide_pool_size
Return desired worker count given current resource probes.
parslet/core/policy.py:18
↓ 4 callersFunctionensure_sample_image
Ensure the sample.png asset exists and return its path.
examples/utils.py:12
↓ 4 callersFunctionget_cpu_count
Returns the number of logical CPUs available to the system. This function uses `os.cpu_count()`. It is designed to always return a posit
parslet/utils/resource_utils.py:50
↓ 4 callersFunctionget_power_state
Return the best effort :class:`PowerState` for the system. Providers are tried in order and the first non-``None`` result is used. If every p
parslet/utils/power.py:115
↓ 4 callersMethodget_task_future
Retrieves the `ParsletFuture` object for a given task ID. Args: task_id (str): The unique ID of the task. Retur
parslet/core/dag.py:290
↓ 4 callersFunctionoffline_guard
Block network socket creation when ``enabled`` is :data:`True`.
parslet/security/__init__.py:79
↓ 4 callersFunctionsave_dag_to_png
Saves the Parslet DAG as a PNG image file. This function requires both the `pydot` library and a functional Graphviz installation (speci
parslet/core/exporter.py:153
↓ 4 callersMethodscan_code
DEFCON1: scan for dangerous calls.
parslet/security/defcon.py:24
↓ 4 callersMethodverify_chain
DEFCON2: verify DAG hash against signature.
parslet/security/defcon.py:44
↓ 3 callersMethod__init__
Initializes the DAGRunner. Args: max_workers (Optional[int]): The maximum number of worker threads for t
parslet/core/runner.py:138
↓ 3 callersMethod_is_delayed
Return ``True`` if *expr* refers to ``dask.delayed``.
parslet/compat/dask_adapter.py:46
↓ 3 callersFunction_make_image
(path: Path, color: int)
tests/test_rad_parslet.py:12
↓ 3 callersMethodcalculate_worker_count
Determine how many workers to use based on system resources.
parslet/core/scheduler.py:28
↓ 3 callersMethodcleanup
(self)
tests/test_hybrid.py:44
↓ 3 callersFunctionconvert_task_to_parsl
Wrap a Parslet task function as a Parsl ``python_app``. This requires the ``parsl`` package to be installed. The returned function behaves li
parslet/core/parsl_bridge.py:50
↓ 3 callersFunctionget_cache_dir
Return the directory used for storing cache files.
parslet/core/cache.py:63
↓ 3 callersMethodget_task_benchmarks
Retrieves benchmark data for all tasks processed or known by the runner. The returned data includes the status of each task
parslet/core/runner.py:262
↓ 3 callersFunctioninc
(x)
tests/test_dask_adapter_runtime.py:7
↓ 3 callersFunctionneeds_power
(x)
tests/test_battery_sensitive.py:6
↓ 3 callersMethodresult
(self)
tests/test_parsl_bridge.py:19
↓ 3 callersMethodsnapshot
Return the current view of all known detectors and overrides.
parslet/core/context.py:88
↓ 2 callersFunction_compute_model_hash
(model: object)
examples/rad_parslet/rad_parslet.py:91
↓ 2 callersFunction_deserialize_arg
(val: Any, task_map: Dict[str, ParsletFuture])
parslet/core/dag_io.py:47
↓ 2 callersFunction_run_once
()
tests/test_cache.py:21
↓ 2 callersMethod_run_task_serially
Execute a task synchronously in fallback mode.
parslet/core/runner.py:508
↓ 2 callersFunction_safe_serialize
Serialize ``obj`` into JSON-friendly structures. Non-JSON-serializable objects fall back to ``repr`` strings. Collections are processed recur
parslet/core/cache.py:14
↓ 2 callersFunction_serialize_arg
(arg: Any)
parslet/core/dag_io.py:17
↓ 2 callersFunctionadd
A simple Parslet task that adds two integers. Simulates some work using `time.sleep()`. Args: a (int): The first integer.
examples/hello.py:74
↓ 2 callersFunctionadd_one
(x)
tests/test_dask_bridge.py:47
↓ 2 callersFunctionanalyze
Analyze an image with tiny models. Args: image_path: Path to input image. output_dir: Directory to store outputs. ignore_
examples/rad_parslet/rad_parslet.py:96
↓ 2 callersFunctioncompute
Evaluate one or more ``ParsletFuture`` objects like ``dask.compute``.
parslet/compat/dask_adapter.py:230
↓ 2 callersFunctiondag_to_pydot
Converts a Parslet DAG to a `pydot.Dot` object using NetworkX. This function serves as the core conversion utility for generating visual
parslet/core/exporter.py:76
↓ 2 callersMethoddraw_dag
Return a simple visualisation of the DAG. If ``ascii_only`` is True or Graphviz is not available, an ASCII representation is returned
parslet/core/dag.py:347
↓ 2 callersFunctionexecute_with_dask
Execute a Parslet workflow using Dask. Parameters ---------- entry_futures: Terminal futures from the workflow's ``main()`` funct
parslet/core/dask_bridge.py:17
↓ 2 callersFunctionexport_parsl_dag
Export a Parslet DAG to a Parsl-style Python script.
parslet/compat/parsl_adapter.py:192
↓ 2 callersFunctionfind_free_port
Finds an available port starting from ``start_port``. Args: start_port: Initial port to try. max_tries: Maximum number of increme
parslet/utils/diagnostics.py:9
↓ 2 callersFunctiongated_task
()
tests/test_context_oracle.py:32
↓ 2 callersMethodget_dependencies
Returns a list of task IDs that are direct dependencies (predecessors) of the specified task. Args: task_id (str
parslet/core/dag.py:309
↓ 2 callersFunctionimport_parsl_script
Convert a simple Parsl workflow file to Parslet syntax. Parameters ---------- src : str Path to the Parsl script. dest : str
parslet/compat/parsl_adapter.py:94
↓ 2 callersFunctioninfer_edges_from_params
Derive graph edges by inspecting task parameter references. The helper assumes that if a parameter name matches another task name the latter
parslet/core/ir.py:42
↓ 2 callersFunctionis_network_available
Return True if we can reach the given host:port within ``timeout``.
parslet/utils/network_utils.py:15
↓ 2 callersFunctionis_running_in_termux
Checks if the script is currently running within a Termux environment. The detection is primarily based on the presence and specific values
termux/helpers.py:18
↓ 2 callersFunctionone
()
tests/test_dask_bridge.py:43
↓ 2 callersFunctionparslet_task
Decorator to define a Python function as a Parslet task. When a function decorated with `@parslet_task` is called, it does not execute i
parslet/core/task.py:225
↓ 2 callersMethodrender_prologue
Return a pre-flight briefing describing contexts and tasks.
parslet/core/concierge.py:44
↓ 2 callersFunctionsave_to_cache
Persist ``value`` for ``key`` to the cache.
parslet/core/cache.py:80
↓ 2 callersFunctionsquare
A simple Parslet task that squares an integer. Simulates some work using `time.sleep()`. Args: x (int): The integer to square.
examples/hello.py:95
↓ 2 callersMethodtamper_guard
DEFCON3: ensure files unchanged.
parslet/security/defcon.py:53
↓ 2 callersFunctiontoposort
Topologically sort ``tasks`` given an iterable of ``edges``. A ``ValueError`` is raised if a cycle is detected. The algorithm is a tiny impl
parslet/core/ir.py:58
↓ 1 callersMethod__init__
( self, message: str = ( "pydot library is not installed. Please install it to use
parslet/core/exporter.py:45
↓ 1 callersMethod__init__
(self, ram_mb: float)
examples/rad_parslet/rad_parslet.py:42
↓ 1 callersFunction_blocked
(*args: object, **kwargs: object)
parslet/security/__init__.py:53
↓ 1 callersMethod_copy_file
(self, path: Path)
parslet/hybrid/relay.py:22
↓ 1 callersMethod_energy_rank
(self, cost: str)
parslet/core/policy.py:41
↓ 1 callersFunction_ensure_parsl_loaded
Lazily load Parsl with a small thread pool configuration.
parslet/core/parsl_bridge.py:25
↓ 1 callersMethod_evaluate_single
(self, requirement: str)
parslet/core/context.py:126
↓ 1 callersMethod_is_night
(self)
parslet/core/context.py:122
↓ 1 callersMethod_maybe_resize_pool
Adjust executor worker count based on current policy.
parslet/core/runner.py:393
↓ 1 callersMethod_qos_rank
(self, qos: str)
parslet/core/policy.py:44
↓ 1 callersMethod_register_builtin_detectors
(self)
parslet/core/context.py:111
↓ 1 callersMethod_remediation_hint
Provide a simple one-line remediation hint based on the exception.
parslet/core/runner.py:413
↓ 1 callersMethod_resolve_context
(self, name: str)
parslet/core/context.py:153
↓ 1 callersMethod_resolve_dynamic
(self, name: str)
parslet/core/context.py:174
↓ 1 callersMethod_resolve_task_arguments
Resolves the arguments for a given ParsletFuture by obtaining results from its dependency ParsletFutures. This method iterat
parslet/core/runner.py:301
↓ 1 callersMethod_task_context_rows
(self)
parslet/core/concierge.py:141
↓ 1 callersMethod_task_done_callback
Callback executed when a task submitted to the ThreadPoolExecutor completes. This method retrieves the result (or exception)
parslet/core/runner.py:419
↓ 1 callersFunctionadd
(x, y)
tests/test_parsl_adapter_runtime.py:47
↓ 1 callersFunctionadd
(x: int, y: int)
tests/test_task.py:8
↓ 1 callersFunctionadd
(x, y)
tests/test_parsl_bridge.py:98
↓ 1 callersFunctionadd
(x, y)
tests/test_runner.py:5
↓ 1 callersFunctionadd
(x: int, y: int)
examples/compat/dask_demo.py:7
↓ 1 callersFunctionadd
(x: int, y: int)
examples/compat/parsl_demo.py:7
↓ 1 callersFunctionadd_one
(x)
tests/test_parsl_bridge.py:115
↓ 1 callersFunctionadd_one
(x)
tests/test_hybrid.py:94
↓ 1 callersFunctionanalyze_power
(records: List[Dict[str, float]])
use_cases/telecom_power_monitor.py:80
↓ 1 callersFunctionapply_blur
Applies a Gaussian blur to a Pillow Image object.
examples/image_filter.py:38
↓ 1 callersFunctionapply_fallback
( result: Dict[str, object], threshold: float = 0.8 )
examples/mobile_edge_inference.py:95
↓ 1 callersFunctionarchive_responses
( responses: List[Dict[str, str]], dest: Path, resources: Dict[str, bool] )
use_cases/offline_survey_flow.py:90
↓ 1 callersFunctionascii_heatmap
(path: str)
examples/tools/plot_stats.py:8
↓ 1 callersFunctionboom
()
tests/test_fail_messages.py:13
↓ 1 callersMethodbuild_runbook
Return a JSON-serialisable structure describing the run.
parslet/core/concierge.py:102
↓ 1 callersFunctioncheap
()
tests/test_energy_policy_ordering.py:12
↓ 1 callersFunctioncheck_resources
( min_ram_mb: int = 50, min_battery: int = 20 )
use_cases/offline_edu_content_builder.py:35
↓ 1 callersFunctioncheck_resources
( min_ram_mb: int = 30, min_battery: int = 20 )
use_cases/shared_hub_jobs.py:33
next →1–100 of 437, ranked by callers