actableai.utils.resources.profile.base.ResourceProfiler(resource_profiled: actableai.utils.resources.profile.ResourceProfilerType)¶Bases: abc.ABC
Abstract class representing a resource profiler
shutdown()¶Function called after using the profiler, it is assumed that the __call__ function cannot be called once shutdown is called
actableai.utils.resources.profile.gpu_memory.GPUMemoryProfiler(resource_profiled: actableai.utils.resources.profile.ResourceProfilerType)¶Bases: actableai.utils.resources.profile.base.ResourceProfiler
GPU Memory profiler
shutdown()¶Function called after using the profiler, in that case shutdowns the NVML library
actableai.utils.resources.profile.memory.MemoryProfiler(resource_profiled: actableai.utils.resources.profile.ResourceProfilerType)¶Bases: actableai.utils.resources.profile.base.ResourceProfiler
Memory profiler profiles the following resources: - RSS_MEMORY - VMS_MEMORY - SHARED_MEMORY - USS_MEMORY - PSS_MEMORY - SWAP_MEMORY
actableai.utils.resources.profile.ResourceProfilerResults(df_profiling_results: pandas.core.frame.DataFrame)¶Bases: object
Class representing the results returned by the profiling of a function
get_max_profiled(resource_profiled: actableai.utils.resources.profile.ResourceProfilerType) float¶Return the maximum profiled value of a specific resource
actableai.utils.resources.profile.ResourceProfilerType(value)¶Bases: enum.IntFlag
Enum representing the different resource that can be profiled
GPU_MEMORY = 64¶MEMORY = 63¶PSS_MEMORY = 16¶RSS_MEMORY = 1¶SHARED_MEMORY = 4¶SWAP_MEMORY = 32¶USS_MEMORY = 8¶VMS_MEMORY = 2¶actableai.utils.resources.profile.profile_function(resource_profiled: actableai.utils.resources.profile.ResourceProfilerType, include_children: bool, function: Callable, *args, **kwargs) Tuple[actableai.utils.resources.profile.ResourceProfilerResults, Any]¶Profile a function
Will call the function and start a new thread that will profile different resources of the function