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
Function
test_rapl_include_dram_false
Verify that rapl_include_dram=False excludes DRAM domains.
tests/test_rapl_parameters.py:48
Function
test_rapl_include_dram_logs_message
Verify that appropriate log messages are generated for rapl_include_dram setting.
tests/test_rapl_parameters.py:315
Function
test_rapl_include_dram_true_explicit
Verify that rapl_include_dram=True explicitly includes DRAM domains.
tests/test_rapl_parameters.py:85
Function
test_rapl_parameters_stored_correctly
Verify that the parameters are stored correctly in the IntelRAPL instance.
tests/test_rapl_parameters.py:441
Function
test_rapl_prefer_psys_default_false
Verify that rapl_prefer_psys defaults to False and prefers package domains over psys.
tests/test_rapl_parameters.py:120
Function
test_rapl_prefer_psys_false_explicit
Verify that rapl_prefer_psys=False explicitly prefers package over psys.
tests/test_rapl_parameters.py:192
Function
test_rapl_prefer_psys_logs_message
Verify that appropriate log messages are generated for rapl_prefer_psys setting.
tests/test_rapl_parameters.py:373
Function
test_rapl_prefer_psys_true
Verify that rapl_prefer_psys=True uses psys domain instead of package domains.
tests/test_rapl_parameters.py:156
Function
test_rapl_prefer_psys_with_no_package_domains
Verify that even with rapl_prefer_psys=False, psys is used as fallback when no package domains are available.
tests/test_rapl_parameters.py:228
Method
test_read_confs
(self)
tests/test_config.py:104
Method
test_read_confs_and_parse_envs
(self)
tests/test_config.py:143
Method
test_read_slurm_scontrol_returns_decoded_output
(self, mock_check_output)
tests/test_ram.py:116
Method
test_read_slurm_scontrol_returns_none_on_error
(self, mock_check_output)
tests/test_ram.py:128
Method
test_refresh_tokens
(self, mock_discover, mock_post)
tests/cli/test_cli_auth.py:160
Method
test_reinit_on_amdsmi_not_initialized_error
(self)
tests/test_gpu_amd.py:29
Method
test_release_does_not_release_when_not_created_by_this_instance
( self, mock_file, mock_remove )
tests/test_lock.py:35
Method
test_release_removes_lock_file
(self, mock_file, mock_remove)
tests/test_lock.py:28
Method
test_report_from_dict_roundtrip
Report can survive a to_dict -> from_dict roundtrip.
tests/test_boamps_output.py:1032
Method
test_report_serializes_to_valid_json
Report.to_dict() result is JSON-serializable.
tests/test_boamps_output.py:259
Method
test_report_without_task_fails_schema
Report without required task section fails validation.
tests/test_boamps_output.py:755
Function
test_revoke_token_exception
Revocation is non-blocking even when load_server_metadata raises.
carbonserver/tests/api/routers/test_authenticate.py:141
Function
test_revoke_token_http_error
Revocation failure does not raise — logout must always succeed.
carbonserver/tests/api/routers/test_authenticate.py:123
Function
test_revoke_token_no_endpoint
Revocation is silently skipped when the provider has no revocation_endpoint.
carbonserver/tests/api/routers/test_authenticate.py:111
Function
test_revoke_token_success
Token is revoked successfully when the provider exposes a revocation_endpoint.
carbonserver/tests/api/routers/test_authenticate.py:87
Method
test_rocm_initialization
(self, mock_subprocess, mock_nvidia, mock_rocm)
tests/test_gpu.py:209
Function
test_run_and_monitor_handles_generic_exception
(monkeypatch)
tests/cli/test_monitor.py:48
Function
test_run_and_monitor_handles_keyboard_interrupt
(monkeypatch)
tests/cli/test_monitor.py:125
Function
test_run_and_monitor_handles_missing_command
(monkeypatch)
tests/cli/test_monitor.py:33
Function
test_run_and_monitor_requires_command
(monkeypatch)
tests/cli/test_monitor.py:23
Function
test_run_and_monitor_uses_offline_tracker_when_offline_mode
(monkeypatch)
tests/cli/test_monitor.py:63
Function
test_run_and_monitor_uses_online_tracker_by_default
(monkeypatch)
tests/cli/test_monitor.py:94
Function
test_run_service_creates_correct_run
(_)
carbonserver/tests/api/service/test_run_service.py:36
Function
test_run_service_retrieves_all_existing_runs
()
carbonserver/tests/api/service/test_run_service.py:55
Function
test_run_service_retrieves_correct_last_run_for_project_id
()
carbonserver/tests/api/service/test_run_service.py:97
Function
test_run_service_retrieves_correct_run_by_experiment_id
()
carbonserver/tests/api/service/test_run_service.py:84
Function
test_run_service_retrieves_correct_run_by_id
()
carbonserver/tests/api/service/test_run_service.py:71
Method
test_save_and_load_credentials
(self, mock_open)
tests/cli/test_cli_auth.py:77
Method
test_save_to_flags_map_to_output_methods_and_warn
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:254
Method
test_scan_base_for_rapl_checks_direct_entries_fallback
(self)
tests/test_cpu.py:154
Method
test_scan_direct_entries_returns_false_when_no_matching_dirs
(self)
tests/test_cpu.py:148
Method
test_scan_domain_directories_returns_true_for_main_domain
(self)
tests/test_cpu.py:133
Method
test_scheduler_warning_shown_when_running
Test that scheduler warning is shown when scheduler is running but delayed.
tests/test_emissions_tracker.py:785
Method
test_scheduler_warning_suppressed_when_stopped
Test that scheduler warning is suppressed when scheduler is stopped.
tests/test_emissions_tracker.py:742
Method
test_set_access_token_updates_client
(self)
tests/test_api_call.py:42
Function
test_set_cpu_gpu_ram_tracking_calls_all_setup_steps
()
tests/test_resource_tracker.py:340
Method
test_set_cpu_tracking_fallback_instantiates_tdp
(self)
tests/test_cpu.py:681
Function
test_set_cpu_tracking_falls_back_when_forced_power_is_set
()
tests/test_resource_tracker.py:263
Method
test_set_cpu_tracking_force_cpu_load_instantiates_tdp
(self)
tests/test_cpu.py:634
Function
test_set_cpu_tracking_force_mode_uses_cpu_load_and_returns
()
tests/test_resource_tracker.py:201
Function
test_set_cpu_tracking_prefers_power_gadget
()
tests/test_resource_tracker.py:217
Function
test_set_cpu_tracking_prefers_rapl_before_powermetrics
()
tests/test_resource_tracker.py:240
Method
test_set_cpu_tracking_skips_tdp_when_rapl_available
(self)
tests/test_cpu.py:582
Method
test_set_experiment_updates_value
(self)
tests/test_api_call.py:284
Function
test_set_gpu_tracking_handles_no_gpu
()
tests/test_resource_tracker.py:321
Function
test_set_gpu_tracking_nvidia_populates_conf
()
tests/test_resource_tracker.py:288
Method
test_set_gpu_tracking_rocm_with_mixed_ids
(self)
tests/test_cpu.py:795
Method
test_set_gpu_tracking_rocm_with_string_ids
(self)
tests/test_cpu.py:753
Function
test_set_ram_tracking_uses_forced_power
()
tests/test_resource_tracker.py:58
Method
test_setup_cli_raises_on_unsupported_platform
(self)
tests/test_powermetrics.py:110
Method
test_setup_cli_raises_on_unsupported_platform
(self)
tests/test_cpu.py:250
Method
test_setup_cli_raises_when_binary_missing_on_apple_silicon
(self)
tests/test_powermetrics.py:118
Method
test_setup_cli_uses_windows_backup_when_primary_missing
(self)
tests/test_cpu.py:226
Function
test_setup_cpu_load_mode_returns_false_without_psutil
()
tests/test_resource_tracker.py:77
Function
test_setup_cpu_load_mode_updates_tracker_state
()
tests/test_resource_tracker.py:87
Function
test_setup_fallback_tracking_uses_cpu_load_when_tdp_matches
()
tests/test_resource_tracker.py:139
Function
test_setup_fallback_tracking_uses_global_constant_when_no_tdp_and_no_psutil
()
tests/test_resource_tracker.py:171
Function
test_setup_powermetrics_tracks_cpu_and_gpu
()
tests/test_resource_tracker.py:117
Function
test_show_config_handles_access_token_errors
(monkeypatch, tmp_path, capsys)
tests/cli/test_cli_main.py:107
Function
test_show_config_prints_missing_project_and_experiment
( monkeypatch, tmp_path, capsys )
tests/cli/test_cli_main.py:219
Function
test_sign_up_service_creates_user_with_default_project_and_organisation
()
carbonserver/tests/api/service/test_sign_up_service.py:95
Method
test_slurm_memory_gb_caches_parsed_result
(self, mock_read)
tests/test_ram.py:171
Method
test_slurm_memory_gb_falls_back_when_scontrol_fails
( self, mock_virtual_memory, mock_read )
tests/test_ram.py:157
Method
test_snake_to_camel_conversion
(self)
tests/test_boamps_output.py:112
Method
test_software_mapping
language='python', version from python_version.
tests/test_boamps_output.py:453
Method
test_static_gpu_info
(self)
tests/test_gpu_nvidia.py:162
Method
test_static_gpu_info_not_available
(self)
tests/test_gpu_nvidia.py:429
Method
test_stream_handler_not_duplicated
Calling set_logger_format() twice must not duplicate the StreamHandler.
tests/test_logger.py:43
Function
test_sum_computes_for_organization_id
()
carbonserver/tests/api/usecase/organization/test_organization_detailed_sums.py:40
Function
test_sum_computes_for_project_id
()
carbonserver/tests/api/usecase/project/test_project_detailed_sums.py:34
Function
test_sum_returns_zero_report_when_organization_has_no_emissions
Issue #693: an organization with no emissions in the requested period should get back a zero-valued report instead of triggering the global "G
carbonserver/tests/api/usecase/organization/test_organization_detailed_sums.py:60
Method
test_system_mapping
os field maps to system.os.
tests/test_boamps_output.py:448
Method
test_task_energy_with_live_update_interference
( self, mock_apple_silicon_measure, mock_cpu_measure, # Method decorator (innermost)
tests/test_emissions_tracker.py:614
Method
test_task_from_dict_with_nested
(self)
tests/test_boamps_output.py:997
Method
test_task_serialization_with_nested_lists
(self)
tests/test_boamps_output.py:173
Method
test_task_utilization_tracking
Test that task-based tracking includes utilization metrics.
tests/test_utilization_tracking.py:155
Function
test_telemetry_service_creates_telemetry
()
carbonserver/tests/api/service/test_telemetry_service.py:12
Method
test_too_much_gpu_ids_in_env
(self)
tests/test_config.py:351
Method
test_total_power_returns_zero_on_exception
(self)
tests/test_ram.py:240
Method
test_total_power_uses_process_memory_in_process_mode
(self)
tests/test_ram.py:221
Method
test_track_emissions_forwards_force_carbon_intensity_parameter
(self)
tests/test_config.py:292
Method
test_track_emissions_forwards_force_carbon_intensity_to_offline_tracker
(self)
tests/test_config.py:310
Method
test_tracker_co2_signal_api_token_deprecated
Test that co2_signal_api_token parameter works in EmissionsTracker.
tests/test_electricitymaps_backward_compatibility.py:48
Method
test_tracker_measures_correctly_each_inference_from_task
(self)
tests/test_tracking_inference.py:64
Method
test_tracker_measures_model_loading_task
(self)
tests/test_tracking_inference.py:45
Method
test_tracker_new_parameter_takes_precedence
Test that new parameter takes precedence in EmissionsTracker.
tests/test_electricitymaps_backward_compatibility.py:64
Method
test_tracker_outputs_data_point_for_each_task_logged
(self)
tests/test_tracking_inference.py:84
Method
test_tracking_modes_omitted
cpuTrackingMode/gpuTrackingMode are omitted (not available in EmissionsData).
tests/test_boamps_output.py:339
Method
test_try_get_nordic_region_emissions_returns_none_for_non_nordic_region
(self)
tests/test_emissions.py:271
Method
test_try_get_nordic_region_emissions_returns_none_if_region_data_missing
(self)
tests/test_emissions.py:345
Method
test_try_get_nordic_region_emissions_returns_none_on_data_loading_error
(self)
tests/test_emissions.py:361
← previous
next →
1,701–1,800 of 1,889, ranked by callers