Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/mlco2/codecarbon
/ functions
Functions
1,889 in github.com/mlco2/codecarbon
⨍
Functions
1,889
◇
Types & classes
328
↳
Endpoints
162
Method
test_get_total_energy_consumption_missing_keys_warns
(self)
tests/test_gpu_amd.py:223
Method
test_get_total_energy_consumption_returns_none_for_other_models
(self)
tests/test_gpu_amd.py:153
Method
test_get_total_energy_consumption_returns_zero_for_known_dual_gcd_model
(self)
tests/test_gpu_amd.py:133
Method
test_get_total_energy_consumption_uses_power_key
(self)
tests/test_gpu_amd.py:208
Function
test_get_user_by_id_returns_correct_user_with_correct_id
( client, custom_test_server )
carbonserver/tests/api/routers/test_users.py:72
Method
test_get_uuid
(self)
tests/test_gpu_amd.py:276
Method
test_get_windows_exec_backup_finds_matching_folder
(self)
tests/test_cpu.py:255
Function
test_global_energy_mix_data_included
Test that global energy mix data is included.
tests/test_package_integrity.py:59
Method
test_google_cloud_logger_live_out_calls_out
(self)
tests/output_methods/test_logger.py:124
Method
test_google_cloud_logger_output_exception
(self, mock_error_logger)
tests/output_methods/test_logger.py:117
Method
test_google_cloud_logger_output_success
(self)
tests/output_methods/test_logger.py:110
Method
test_gpu_component_details
(self)
tests/test_boamps_output.py:365
Method
test_gpu_details
(self)
tests/test_gpu_nvidia.py:185
Method
test_gpu_details_not_available
(self)
tests/test_gpu_nvidia.py:422
Method
test_gpu_ids_from_env
(self)
tests/test_config.py:338
Method
test_gpu_ids_from_rocr_visible_devices
(self)
tests/test_config.py:371
Method
test_gpu_metadata_one_gpu_power
Get the power of just one GPU even if there are more than 1
tests/test_gpu_nvidia.py:268
Method
test_gpu_metadata_one_gpu_power_CUDA_VISIBLE_DEVICES
Get the power of just one GPU even if there are more than 1
tests/test_gpu_nvidia.py:305
Method
test_gpu_metadata_total_power
Get the total power of all GPUs
tests/test_gpu_nvidia.py:234
Method
test_gpu_no_power_limit
(self)
tests/test_gpu_nvidia.py:192
Method
test_gpu_not_ready
(self)
tests/test_gpu_nvidia.py:213
Method
test_gpu_omitted_when_no_gpu
GPU component is omitted when gpu_count=0 and gpu_model is empty.
tests/test_boamps_output.py:381
Method
test_gpu_utilization_as_fraction
gpu_utilization_percent is converted to 0-1 range when GPU present.
tests/test_boamps_output.py:333
Method
test_gpu_utilization_omitted_when_no_gpu
GPU utilization not set when no GPU.
tests/test_boamps_output.py:396
Method
test_graceful_start_failure
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:178
Method
test_graceful_stop_failure
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:197
Method
test_handler_programmatic_config
Handler can be constructed with programmatic config.
tests/test_boamps_output.py:559
Method
test_hardware_serialization
(self)
tests/test_boamps_output.py:197
Method
test_has_powermetrics_sudo_raises_on_nonzero_returncode
(self)
tests/test_powermetrics.py:83
Method
test_has_powermetrics_sudo_returns_false_on_password_prompt
(self)
tests/test_powermetrics.py:68
Method
test_has_powermetrics_sudo_returns_false_when_powermetrics_missing
(self)
tests/test_powermetrics.py:61
Method
test_has_powermetrics_sudo_returns_false_when_sudo_missing
(self)
tests/test_powermetrics.py:57
Method
test_has_powermetrics_sudo_returns_true_on_success
(self)
tests/test_powermetrics.py:97
Method
test_has_valid_headers_different_order_success
(self)
tests/output_methods/test_file.py:80
Method
test_has_valid_headers_failure
(self)
tests/output_methods/test_file.py:90
Method
test_has_valid_headers_success
(self)
tests/output_methods/test_file.py:67
Method
test_has_valid_headers_success_with_empty_file
(self)
tests/output_methods/test_file.py:73
Method
test_header_auto_population
run_id -> reportId, timestamp -> reportDatetime.
tests/test_boamps_output.py:303
Method
test_header_from_dict_with_publisher
(self)
tests/test_boamps_output.py:1009
Method
test_header_serialization
(self)
tests/test_boamps_output.py:138
Method
test_http_output_post_exception
(self, mock_post, mock_logger)
tests/output_methods/test_http.py:75
Method
test_http_output_post_success
(self, mock_post)
tests/output_methods/test_http.py:53
Method
test_http_output_post_unexpected_status
(self, mock_post, mock_logger)
tests/output_methods/test_http.py:64
Method
test_import_failure_logs_warning
Each import-time failure (OSError/KeyError/AttributeError) must log a warning.
tests/test_gpu_amd.py:457
Method
test_import_warns_when_amdsmi_attribute_error
(self)
tests/test_gpu.py:126
Method
test_import_warns_when_modules_missing
(self)
tests/test_gpu.py:60
Method
test_import_warns_when_pynvml_init_fails
(self)
tests/test_gpu.py:88
Method
test_infra_overrides
Infrastructure overrides are applied.
tests/test_boamps_output.py:490
Method
test_infrastructure_decomposition
CPU, GPU, RAM as separate components[].
tests/test_boamps_output.py:346
Method
test_infrastructure_from_dict_with_components
(self)
tests/test_boamps_output.py:1019
Method
test_infrastructure_serialization
(self)
tests/test_boamps_output.py:208
Method
test_init_amd_exception_warns
(self)
tests/test_gpu_amd.py:522
Method
test_init_rejects_invalid_telemetry_without_calling_api
(self)
tests/test_telemetry_client.py:87
Method
test_init_sets_up_client_without_calling_api
(self)
tests/test_telemetry_client.py:11
Method
test_init_use_local
( self, mock_prompt, mock_config, mock_path_exists, mock_token, MockApiClient )
tests/cli/test_cli.py:154
Method
test_init_with_amd_handles_and_bdf_fallback
(self)
tests/test_gpu_amd.py:493
Method
test_init_with_no_amd_handles
(self)
tests/test_gpu_amd.py:472
Method
test_intel_power_gadget
(self)
tests/test_cpu.py:182
Method
test_intel_rapl
(self)
tests/test_cpu.py:334
Method
test_invalid_context_file_path_raises
Invalid context file path raises clear error.
tests/test_boamps_output.py:866
Method
test_is_dual_gcd_power_limited_model_mi210
(self)
tests/test_gpu_amd.py:173
Method
test_is_gpu_details_available
(self)
tests/test_gpu_nvidia.py:157
Method
test_is_gpu_details_not_available
(self)
tests/test_gpu_nvidia.py:417
Function
test_is_mac_arm
(cpu_model, expected)
tests/test_core_util.py:95
Method
test_is_main_domain_falls_back_to_suffix
(self)
tests/test_cpu.py:115
Method
test_is_main_domain_reads_package_name
(self)
tests/test_cpu.py:108
Method
test_is_nvidia_system
(self, mock_subprocess)
tests/test_gpu.py:179
Method
test_is_nvidia_system_fail
(self, mock_subprocess)
tests/test_gpu.py:186
Function
test_is_operation_authorized_on_org
(auth_context)
carbonserver/tests/api/service/test_auth_context.py:47
Function
test_is_operation_authorized_on_project
(auth_context)
carbonserver/tests/api/service/test_auth_context.py:59
Method
test_is_powergadget_available_returns_false_on_exception
( self, mock_powergadget )
tests/test_cpu.py:35
Method
test_is_powermetrics_available_returns_false_on_instantiation_error
(self)
tests/test_powermetrics.py:50
Method
test_is_psutil_available_with_nice
(self, mock_cpu_times)
tests/test_cpu.py:41
Method
test_is_psutil_available_with_small_nice_uses_fallback
(self, mock_cpu_times)
tests/test_cpu.py:49
Method
test_is_psutil_available_without_nice
(self, mock_cpu_times)
tests/test_cpu.py:69
Method
test_is_psutil_not_available_on_exception
(self, mock_cpu_times)
tests/test_cpu.py:78
Method
test_is_psutil_not_available_when_small_nice_fallback_fails
( self, mock_cpu_times )
tests/test_cpu.py:59
Method
test_is_rapl_available_returns_false_on_unexpected_error
( self, mock_candidates, mock_scan )
tests/test_cpu.py:174
Method
test_is_rapl_available_scans_candidate_bases
(self, mock_candidates, mock_scan)
tests/test_cpu.py:167
Method
test_is_rocm_system
(self, mock_subprocess)
tests/test_gpu.py:163
Method
test_is_rocm_system_fail
(self, mock_subprocess)
tests/test_gpu.py:170
Method
test_keyerror_sets_amdsmi_unavailable
KeyError during amdsmi import (e.g. macOS with amdsmi installed but no ROCm) must disable AMD GPU support.
tests/test_gpu_amd.py:443
Method
test_list_experiments_from_project_returns_empty_list_on_error
(self)
tests/test_api_call.py:270
Function
test_list_organizations_returns_all_orgs
(client, custom_test_server)
carbonserver/tests/api/routers/test_organizations.py:109
Function
test_list_organizations_returns_all_orgs_for_user
(client, custom_test_server)
carbonserver/tests/api/routers/test_organizations.py:127
Function
test_list_runs_returns_all_runs
(client, custom_test_server)
carbonserver/tests/api/routers/test_runs.py:169
Method
test_live_out_is_noop
live_out() is a no-op (BoAmps reports are final).
tests/test_boamps_output.py:577
Method
test_live_out_method_calls_out
(self)
tests/output_methods/metrics/test_prometheus.py:73
Method
test_load_valid_context_file
Load a valid BoAmps context file.
tests/test_boamps_output.py:790
Method
test_log_values_returns_none_on_non_darwin
(self)
tests/test_powermetrics.py:129
Method
test_log_values_returns_none_on_unsupported_platform
(self)
tests/test_cpu.py:271
Method
test_log_values_warns_on_nonzero_returncode
(self)
tests/test_powermetrics.py:135
Method
test_log_values_warns_on_nonzero_returncode_windows
(self)
tests/test_cpu.py:277
Method
test_logfire_import_error
(self)
tests/output_methods/metrics/test_logfire.py:56
Method
test_logfire_initialization
(self)
tests/output_methods/metrics/test_logfire.py:60
Method
test_logfire_live_out
(self)
tests/output_methods/metrics/test_logfire.py:80
Method
test_logfire_out
(self)
tests/output_methods/metrics/test_logfire.py:75
Method
test_logger_live_out_calls_out
(self)
tests/output_methods/test_logger.py:63
Method
test_logger_output_exception
(self, mock_error_logger)
tests/output_methods/test_logger.py:56
Method
test_logger_output_success
(self)
tests/output_methods/test_logger.py:49
← previous
next →
1,501–1,600 of 1,889, ranked by callers