Holoscan SDK v4.1.0

holoscan.schedulers

This module provides a Python API to underlying C++ API Schedulers.

holoscan.schedulers.EventBasedScheduler Event-based multi-thread scheduler
holoscan.schedulers.GreedyScheduler Greedy scheduler
holoscan.schedulers.MultiThreadScheduler Multi-thread scheduler

class holoscan.schedulers.EventBasedScheduler

Bases: holoscan.gxf._gxf.GXFScheduler, holoscan.core._core.Component, holoscan.gxf._gxf.GXFComponent

Event-based multi-thread scheduler

Parameters
fragmentFragment

The fragment the condition will be associated with

clockholoscan.resources.Clock or None, optional

The clock used by the scheduler to define the flow of time. If None, a default-constructed holoscan.resources.RealtimeClock will be used.

worker_thread_numberint

The number of worker threads. This creates a default thread pool. Operators not explicitly assigned to a user-defined thread pool (via make_thread_pool) will use this default pool.

stop_on_deadlockbool, optional

If enabled the scheduler will stop when all entities are in a waiting state, but no periodic entity exists to break the dead end. Should be disabled when scheduling conditions can be changed by external actors, for example by clearing queues manually.

max_duration_msint, optional

The maximum duration for which the scheduler will execute (in ms). If not specified (or if a negative value is provided), the scheduler will run until all work is done. If periodic terms are present, this means the application will run indefinitely.

stop_on_deadlock_timeoutint, optional

The scheduler will wait this amount of time before determining that it is in deadlock and should stop. It will reset if a job comes in during the wait. A negative value means not stop on deadlock. This parameter only applies when stop_on_deadlock=true.

network_connection_timeoutint, optional

During the initial phase when network connections are being established, this longer timeout (in ms) is used instead of stop_on_deadlock_timeout. This allows sufficient time for UCX connections to be established without triggering false deadlock detection. “This parameter has no effect on single fragment (non-distributed) applications. “Defaults to 5000 ms (5 seconds).

pin_coreslist of int, optional

CPU core IDs to pin the default thread pool’s worker threads to. If specified, all the worker threads in the default pool (created based on worker_thread_number) will be pinned to the same set of specified cores. Note: This only affects the default pool; to control CPU affinity for user-defined thread pools, use the pin_cores parameter in ThreadPool.add(). If not specified, the default pool’s worker threads will not be pinned to any cores.

enable_queue_stealingbool, optional

If true, default worker threads attempt to steal ready jobs from other default worker queues before blocking on their own queue. Default is False.

steal_scan_limitint, optional

Maximum number of victim queues scanned per steal attempt (0 means scan all queues). Default is 0.

enable_worker_postcheck_fastpathbool, optional

If true, workers perform a fresh checkEntity() after executeEntity() and directly update READY/WAIT_TIME conditions without routing that entity through the dispatcher. Default is False.

postcheck_fallback_notify_intervalint, optional

When worker postcheck returns a non-ready state, send a periodic dispatcher wake-up every N fallbacks per worker. Set to 0 to only notify when no workers are running. Default is 256.

postcheck_fallback_notify_min_workersint, optional

Periodic fallback notify is enabled only when worker_thread_number is at least this value. Default is 8.

postcheck_fallback_notify_min_period_nsint, optional

Minimum global time spacing (in nanoseconds) between periodic fallback dispatcher wake-ups. Default is 100000.

internal_event_shard_countint, optional

Number of internal notification shards used by the dispatcher (0 = auto = worker_thread_number). Default is 0.

dispatcher_internal_pop_batch_sizeint, optional

Maximum number of internal notifications drained from one shard per dispatcher pop step. Default is 32.

wait_state_shard_countint, optional

Number of shards used for WAIT_EVENT and WAIT tracking lists. Default is 1.

log_perf_statsbool, optional

If true, logs scheduler instrumentation counters during deinitialize(). Default is False.

namestr, optional

The name of the scheduler.

Attributes

args The list of arguments associated with the component.
description YAML formatted string describing the component.
fragment Fragment that the scheduler belongs to.
gxf_cid The GXF component ID.
gxf_cname The name of the component.
gxf_context The GXF context of the component.
gxf_eid The GXF entity ID.
gxf_typename The GXF type name of the component.
id The identifier of the component.
name The name of the scheduler.

clock
dispatcher_internal_pop_batch_size
enable_queue_stealing
enable_worker_postcheck_fastpath
internal_event_shard_count
log_perf_stats
max_duration_ms
network_connection_timeout
pin_cores
postcheck_fallback_notify_interval
postcheck_fallback_notify_min_period_ns
postcheck_fallback_notify_min_workers
spec
steal_scan_limit
stop_on_deadlock
stop_on_deadlock_timeout
wait_state_shard_count
worker_thread_number

Methods

add_arg(*args, **kwargs) Overloaded function.
gxf_initialize(self) Initialize the component.
initialize(self) initialization method for the scheduler.
service(self, service_type[, id]) Retrieve a registered fragment service through the component's fragment.
setup(self, arg0) setup method for the scheduler.

__init__(self: holoscan.schedulers._schedulers.EventBasedScheduler, fragment: holoscan.core._core.Fragment, *, clock: holoscan.resources._resources.GXFClock = None, worker_thread_number: int = 1, stop_on_deadlock: bool = True, max_duration_ms: int = - 1, stop_on_deadlock_timeout: int = 0, network_connection_timeout: int = 5000, pin_cores: Optional[list[int]] = None, enable_queue_stealing: bool = False, steal_scan_limit: int = 0, enable_worker_postcheck_fastpath: bool = False, postcheck_fallback_notify_interval: int = 256, postcheck_fallback_notify_min_workers: int = 8, postcheck_fallback_notify_min_period_ns: int = 100000, internal_event_shard_count: int = 0, dispatcher_internal_pop_batch_size: int = 32, wait_state_shard_count: int = 1, log_perf_stats: bool = False, name: str = 'event_based_scheduler') → None

Event-based multi-thread scheduler

Parameters
fragmentFragment

The fragment the condition will be associated with

clockholoscan.resources.Clock or None, optional

The clock used by the scheduler to define the flow of time. If None, a default-constructed holoscan.resources.RealtimeClock will be used.

worker_thread_numberint

The number of worker threads. This creates a default thread pool. Operators not explicitly assigned to a user-defined thread pool (via make_thread_pool) will use this default pool.

stop_on_deadlockbool, optional

If enabled the scheduler will stop when all entities are in a waiting state, but no periodic entity exists to break the dead end. Should be disabled when scheduling conditions can be changed by external actors, for example by clearing queues manually.

max_duration_msint, optional

The maximum duration for which the scheduler will execute (in ms). If not specified (or if a negative value is provided), the scheduler will run until all work is done. If periodic terms are present, this means the application will run indefinitely.

stop_on_deadlock_timeoutint, optional

The scheduler will wait this amount of time before determining that it is in deadlock and should stop. It will reset if a job comes in during the wait. A negative value means not stop on deadlock. This parameter only applies when stop_on_deadlock=true.

network_connection_timeoutint, optional

During the initial phase when network connections are being established, this longer timeout (in ms) is used instead of stop_on_deadlock_timeout. This allows sufficient time for UCX connections to be established without triggering false deadlock detection. “This parameter has no effect on single fragment (non-distributed) applications. “Defaults to 5000 ms (5 seconds).

pin_coreslist of int, optional

CPU core IDs to pin the default thread pool’s worker threads to. If specified, all the worker threads in the default pool (created based on worker_thread_number) will be pinned to the same set of specified cores. Note: This only affects the default pool; to control CPU affinity for user-defined thread pools, use the pin_cores parameter in ThreadPool.add(). If not specified, the default pool’s worker threads will not be pinned to any cores.

enable_queue_stealingbool, optional

If true, default worker threads attempt to steal ready jobs from other default worker queues before blocking on their own queue. Default is False.

steal_scan_limitint, optional

Maximum number of victim queues scanned per steal attempt (0 means scan all queues). Default is 0.

enable_worker_postcheck_fastpathbool, optional

If true, workers perform a fresh checkEntity() after executeEntity() and directly update READY/WAIT_TIME conditions without routing that entity through the dispatcher. Default is False.

postcheck_fallback_notify_intervalint, optional

When worker postcheck returns a non-ready state, send a periodic dispatcher wake-up every N fallbacks per worker. Set to 0 to only notify when no workers are running. Default is 256.

postcheck_fallback_notify_min_workersint, optional

Periodic fallback notify is enabled only when worker_thread_number is at least this value. Default is 8.

postcheck_fallback_notify_min_period_nsint, optional

Minimum global time spacing (in nanoseconds) between periodic fallback dispatcher wake-ups. Default is 100000.

internal_event_shard_countint, optional

Number of internal notification shards used by the dispatcher (0 = auto = worker_thread_number). Default is 0.

dispatcher_internal_pop_batch_sizeint, optional

Maximum number of internal notifications drained from one shard per dispatcher pop step. Default is 32.

wait_state_shard_countint, optional

Number of shards used for WAIT_EVENT and WAIT tracking lists. Default is 1.

log_perf_statsbool, optional

If true, logs scheduler instrumentation counters during deinitialize(). Default is False.

namestr, optional

The name of the scheduler.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property clock
property description

YAML formatted string describing the component.

property dispatcher_internal_pop_batch_size
property enable_queue_stealing
property enable_worker_postcheck_fastpath
property fragment

Fragment that the scheduler belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Scheduler) → None

initialization method for the scheduler.

property internal_event_shard_count
property log_perf_stats
property max_duration_ms
property name

The name of the scheduler.

Returns
namestr
property network_connection_timeout
property pin_cores
property postcheck_fallback_notify_interval
property postcheck_fallback_notify_min_period_ns
property postcheck_fallback_notify_min_workers
service(self: object, service_type: type, id: str = '') → object

Retrieve a registered fragment service through the component’s fragment.

This method delegates to the fragment’s service() method to retrieve a previously registered fragment service by its type and optional identifier. Returns None if no fragment service is found with the specified type and identifier.

Parameters
service_typetype

The type of the fragment service to retrieve. Must be a type that inherits from Resource or FragmentService.

idstr, optional

The identifier of the fragment service. If empty, retrieves by service type only. For Resources, this would typically be the resource’s name.

Returns
object or None

The fragment service instance of the requested type, or None if not found. If the service wraps a Resource and a Resource type is requested, the unwrapped Resource instance is returned.

Raises
RuntimeError

If the component has no associated fragment or if the fragment’s service method cannot be accessed.

Notes

This is a convenience method that internally calls the fragment’s service() method. For services that wrap Resources, the method will automatically unwrap and return the Resource if a Resource type is requested.

setup(self: holoscan.core._core.Scheduler, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the scheduler.

property spec
property steal_scan_limit
property stop_on_deadlock
property stop_on_deadlock_timeout
property wait_state_shard_count
property worker_thread_number
class holoscan.schedulers.GreedyScheduler

Bases: holoscan.gxf._gxf.GXFScheduler, holoscan.core._core.Component, holoscan.gxf._gxf.GXFComponent

Greedy scheduler

Parameters
fragmentFragment

The fragment the condition will be associated with

clockholoscan.resources.Clock or None, optional

The clock used by the scheduler to define the flow of time. If None, a default-constructed holoscan.resources.RealtimeClock will be used.

stop_on_deadlockbool, optional

If enabled the scheduler will stop when all entities are in a waiting state, but no periodic entity exists to break the dead end. Should be disabled when scheduling conditions can be changed by external actors, for example by clearing queues manually.

max_duration_msint, optional

The maximum duration for which the scheduler will execute (in ms). If not specified (or if a negative value is provided), the scheduler will run until all work is done. If periodic terms are present, this means the application will run indefinitely.

check_recession_period_msfloat, optional

The maximum duration for which the scheduler would wait (in ms) when all operators are not ready to run in the current iteration.

stop_on_deadlock_timeoutint, optional

The scheduler will wait this amount of time before determining that it is in deadlock and should stop. It will reset if a job comes in during the wait. A negative value means not stop on deadlock. This parameter only applies when stop_on_deadlock=true”,

network_connection_timeoutint, optional

During the initial phase when network connections are being established, this longer timeout (in ms) is used instead of stop_on_deadlock_timeout. This allows sufficient time for UCX connections to be established without triggering false deadlock detection. “This parameter has no effect on single fragment (non-distributed) applications. “Defaults to 5000 ms (5 seconds).

namestr, optional

The name of the scheduler.

Attributes

args The list of arguments associated with the component.
description YAML formatted string describing the component.
fragment Fragment that the scheduler belongs to.
gxf_cid The GXF component ID.
gxf_cname The name of the component.
gxf_context The GXF context of the component.
gxf_eid The GXF entity ID.
gxf_typename The GXF type name of the component.
id The identifier of the component.
name The name of the scheduler.

check_recession_period_ms
clock
max_duration_ms
network_connection_timeout
spec
stop_on_deadlock
stop_on_deadlock_timeout

Methods

add_arg(*args, **kwargs) Overloaded function.
gxf_initialize(self) Initialize the component.
initialize(self) initialization method for the scheduler.
service(self, service_type[, id]) Retrieve a registered fragment service through the component's fragment.
setup(self, arg0) setup method for the scheduler.

__init__(self: holoscan.schedulers._schedulers.GreedyScheduler, fragment: holoscan.core._core.Fragment, *, clock: holoscan.resources._resources.GXFClock = None, stop_on_deadlock: bool = True, max_duration_ms: int = - 1, check_recession_period_ms: float = 0.0, stop_on_deadlock_timeout: int = 0, network_connection_timeout: int = 5000, name: str = 'greedy_scheduler') → None

Greedy scheduler

Parameters
fragmentFragment

The fragment the condition will be associated with

clockholoscan.resources.Clock or None, optional

The clock used by the scheduler to define the flow of time. If None, a default-constructed holoscan.resources.RealtimeClock will be used.

stop_on_deadlockbool, optional

If enabled the scheduler will stop when all entities are in a waiting state, but no periodic entity exists to break the dead end. Should be disabled when scheduling conditions can be changed by external actors, for example by clearing queues manually.

max_duration_msint, optional

The maximum duration for which the scheduler will execute (in ms). If not specified (or if a negative value is provided), the scheduler will run until all work is done. If periodic terms are present, this means the application will run indefinitely.

check_recession_period_msfloat, optional

The maximum duration for which the scheduler would wait (in ms) when all operators are not ready to run in the current iteration.

stop_on_deadlock_timeoutint, optional

The scheduler will wait this amount of time before determining that it is in deadlock and should stop. It will reset if a job comes in during the wait. A negative value means not stop on deadlock. This parameter only applies when stop_on_deadlock=true”,

network_connection_timeoutint, optional

During the initial phase when network connections are being established, this longer timeout (in ms) is used instead of stop_on_deadlock_timeout. This allows sufficient time for UCX connections to be established without triggering false deadlock detection. “This parameter has no effect on single fragment (non-distributed) applications. “Defaults to 5000 ms (5 seconds).

namestr, optional

The name of the scheduler.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property check_recession_period_ms
property clock
property description

YAML formatted string describing the component.

property fragment

Fragment that the scheduler belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Scheduler) → None

initialization method for the scheduler.

property max_duration_ms
property name

The name of the scheduler.

Returns
namestr
property network_connection_timeout
service(self: object, service_type: type, id: str = '') → object

Retrieve a registered fragment service through the component’s fragment.

This method delegates to the fragment’s service() method to retrieve a previously registered fragment service by its type and optional identifier. Returns None if no fragment service is found with the specified type and identifier.

Parameters
service_typetype

The type of the fragment service to retrieve. Must be a type that inherits from Resource or FragmentService.

idstr, optional

The identifier of the fragment service. If empty, retrieves by service type only. For Resources, this would typically be the resource’s name.

Returns
object or None

The fragment service instance of the requested type, or None if not found. If the service wraps a Resource and a Resource type is requested, the unwrapped Resource instance is returned.

Raises
RuntimeError

If the component has no associated fragment or if the fragment’s service method cannot be accessed.

Notes

This is a convenience method that internally calls the fragment’s service() method. For services that wrap Resources, the method will automatically unwrap and return the Resource if a Resource type is requested.

setup(self: holoscan.core._core.Scheduler, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the scheduler.

property spec
property stop_on_deadlock
property stop_on_deadlock_timeout
class holoscan.schedulers.MultiThreadScheduler

Bases: holoscan.gxf._gxf.GXFScheduler, holoscan.core._core.Component, holoscan.gxf._gxf.GXFComponent

Multi-thread scheduler

Parameters
fragmentFragment

The fragment the condition will be associated with

clockholoscan.resources.Clock or None, optional

The clock used by the scheduler to define the flow of time. If None, a default-constructed holoscan.resources.RealtimeClock will be used.

worker_thread_numberint

The number of worker threads.

stop_on_deadlockbool, optional

If enabled the scheduler will stop when all entities are in a waiting state, but no periodic entity exists to break the dead end. Should be disabled when scheduling conditions can be changed by external actors, for example by clearing queues manually.

check_recession_period_msfloat, optional

The maximum duration for which the scheduler would wait (in ms) when an operator is not ready to run yet.

max_duration_msint, optional

The maximum duration for which the scheduler will execute (in ms). If not specified (or if a negative value is provided), the scheduler will run until all work is done. If periodic terms are present, this means the application will run indefinitely.

stop_on_deadlock_timeoutint, optional

The scheduler will wait this amount of time before determining that it is in deadlock and should stop. It will reset if a job comes in during the wait. A negative value means not stop on deadlock. This parameter only applies when stop_on_deadlock=true”,

network_connection_timeoutint, optional

During the initial phase when network connections are being established, this longer timeout (in ms) is used instead of stop_on_deadlock_timeout. This allows sufficient time for UCX connections to be established without triggering false deadlock detection. “This parameter has no effect on single fragment (non-distributed) applications. “Defaults to 5000 ms (5 seconds).

strict_job_thread_pinningbool, optional

When true, the thread an operator is pinned to is not allowed to run any other operators. When false, if the pinned operator is not in a READY state, another operator could run on the thread.

namestr, optional

The name of the scheduler.

Attributes

args The list of arguments associated with the component.
description YAML formatted string describing the component.
fragment Fragment that the scheduler belongs to.
gxf_cid The GXF component ID.
gxf_cname The name of the component.
gxf_context The GXF context of the component.
gxf_eid The GXF entity ID.
gxf_typename The GXF type name of the component.
id The identifier of the component.
name The name of the scheduler.

check_recession_period_ms
clock
max_duration_ms
network_connection_timeout
spec
stop_on_deadlock
stop_on_deadlock_timeout
worker_thread_number

Methods

add_arg(*args, **kwargs) Overloaded function.
gxf_initialize(self) Initialize the component.
initialize(self) initialization method for the scheduler.
service(self, service_type[, id]) Retrieve a registered fragment service through the component's fragment.
setup(self, arg0) setup method for the scheduler.

__init__(self: holoscan.schedulers._schedulers.MultiThreadScheduler, fragment: holoscan.core._core.Fragment, *, clock: holoscan.resources._resources.GXFClock = None, worker_thread_number: int = 1, stop_on_deadlock: bool = True, check_recession_period_ms: float = 5.0, max_duration_ms: int = - 1, stop_on_deadlock_timeout: int = 0, network_connection_timeout: int = 5000, strict_job_thread_pinning: bool = False, name: str = 'multithread_scheduler') → None

Multi-thread scheduler

Parameters
fragmentFragment

The fragment the condition will be associated with

clockholoscan.resources.Clock or None, optional

The clock used by the scheduler to define the flow of time. If None, a default-constructed holoscan.resources.RealtimeClock will be used.

worker_thread_numberint

The number of worker threads.

stop_on_deadlockbool, optional

If enabled the scheduler will stop when all entities are in a waiting state, but no periodic entity exists to break the dead end. Should be disabled when scheduling conditions can be changed by external actors, for example by clearing queues manually.

check_recession_period_msfloat, optional

The maximum duration for which the scheduler would wait (in ms) when an operator is not ready to run yet.

max_duration_msint, optional

The maximum duration for which the scheduler will execute (in ms). If not specified (or if a negative value is provided), the scheduler will run until all work is done. If periodic terms are present, this means the application will run indefinitely.

stop_on_deadlock_timeoutint, optional

The scheduler will wait this amount of time before determining that it is in deadlock and should stop. It will reset if a job comes in during the wait. A negative value means not stop on deadlock. This parameter only applies when stop_on_deadlock=true”,

network_connection_timeoutint, optional

During the initial phase when network connections are being established, this longer timeout (in ms) is used instead of stop_on_deadlock_timeout. This allows sufficient time for UCX connections to be established without triggering false deadlock detection. “This parameter has no effect on single fragment (non-distributed) applications. “Defaults to 5000 ms (5 seconds).

strict_job_thread_pinningbool, optional

When true, the thread an operator is pinned to is not allowed to run any other operators. When false, if the pinned operator is not in a READY state, another operator could run on the thread.

namestr, optional

The name of the scheduler.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None

Add a list of arguments to the component.

property args

The list of arguments associated with the component.

Returns
arglistholoscan.core.ArgList
property check_recession_period_ms
property clock
property description

YAML formatted string describing the component.

property fragment

Fragment that the scheduler belongs to.

Returns
nameholoscan.core.Fragment
property gxf_cid

The GXF component ID.

property gxf_cname

The name of the component.

property gxf_context

The GXF context of the component.

property gxf_eid

The GXF entity ID.

gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None

Initialize the component.

property gxf_typename

The GXF type name of the component.

Returns
str

The GXF type name of the component.

property id

The identifier of the component.

The identifier is initially set to -1, and will become a valid value when the component is initialized.

With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.

Returns
idint
initialize(self: holoscan.core._core.Scheduler) → None

initialization method for the scheduler.

property max_duration_ms
property name

The name of the scheduler.

Returns
namestr
property network_connection_timeout
service(self: object, service_type: type, id: str = '') → object

Retrieve a registered fragment service through the component’s fragment.

This method delegates to the fragment’s service() method to retrieve a previously registered fragment service by its type and optional identifier. Returns None if no fragment service is found with the specified type and identifier.

Parameters
service_typetype

The type of the fragment service to retrieve. Must be a type that inherits from Resource or FragmentService.

idstr, optional

The identifier of the fragment service. If empty, retrieves by service type only. For Resources, this would typically be the resource’s name.

Returns
object or None

The fragment service instance of the requested type, or None if not found. If the service wraps a Resource and a Resource type is requested, the unwrapped Resource instance is returned.

Raises
RuntimeError

If the component has no associated fragment or if the fragment’s service method cannot be accessed.

Notes

This is a convenience method that internally calls the fragment’s service() method. For services that wrap Resources, the method will automatically unwrap and return the Resource if a Resource type is requested.

setup(self: holoscan.core._core.Scheduler, arg0: holoscan.core._core.ComponentSpec) → None

setup method for the scheduler.

property spec
property stop_on_deadlock
property stop_on_deadlock_timeout
property worker_thread_number
Previous holoscan.resources
Next Holoscan Application Package Specification (HAP)
© Copyright 2022-2026, NVIDIA. Last updated on Apr 1, 2026