MCPcopy Create free account

hub / github.com/mlco2/codecarbon / functions

Functions1,889 in github.com/mlco2/codecarbon

Functiontest_rapl_include_dram_false
Verify that rapl_include_dram=False excludes DRAM domains.
tests/test_rapl_parameters.py:48
Functiontest_rapl_include_dram_logs_message
Verify that appropriate log messages are generated for rapl_include_dram setting.
tests/test_rapl_parameters.py:315
Functiontest_rapl_include_dram_true_explicit
Verify that rapl_include_dram=True explicitly includes DRAM domains.
tests/test_rapl_parameters.py:85
Functiontest_rapl_parameters_stored_correctly
Verify that the parameters are stored correctly in the IntelRAPL instance.
tests/test_rapl_parameters.py:441
Functiontest_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
Functiontest_rapl_prefer_psys_false_explicit
Verify that rapl_prefer_psys=False explicitly prefers package over psys.
tests/test_rapl_parameters.py:192
Functiontest_rapl_prefer_psys_logs_message
Verify that appropriate log messages are generated for rapl_prefer_psys setting.
tests/test_rapl_parameters.py:373
Functiontest_rapl_prefer_psys_true
Verify that rapl_prefer_psys=True uses psys domain instead of package domains.
tests/test_rapl_parameters.py:156
Functiontest_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
Methodtest_read_confs
(self)
tests/test_config.py:104
Methodtest_read_confs_and_parse_envs
(self)
tests/test_config.py:143
Methodtest_read_slurm_scontrol_returns_decoded_output
(self, mock_check_output)
tests/test_ram.py:116
Methodtest_read_slurm_scontrol_returns_none_on_error
(self, mock_check_output)
tests/test_ram.py:128
Methodtest_refresh_tokens
(self, mock_discover, mock_post)
tests/cli/test_cli_auth.py:160
Methodtest_reinit_on_amdsmi_not_initialized_error
(self)
tests/test_gpu_amd.py:29
Methodtest_release_does_not_release_when_not_created_by_this_instance
( self, mock_file, mock_remove )
tests/test_lock.py:35
Methodtest_release_removes_lock_file
(self, mock_file, mock_remove)
tests/test_lock.py:28
Methodtest_report_from_dict_roundtrip
Report can survive a to_dict -> from_dict roundtrip.
tests/test_boamps_output.py:1032
Methodtest_report_serializes_to_valid_json
Report.to_dict() result is JSON-serializable.
tests/test_boamps_output.py:259
Methodtest_report_without_task_fails_schema
Report without required task section fails validation.
tests/test_boamps_output.py:755
Functiontest_revoke_token_exception
Revocation is non-blocking even when load_server_metadata raises.
carbonserver/tests/api/routers/test_authenticate.py:141
Functiontest_revoke_token_http_error
Revocation failure does not raise — logout must always succeed.
carbonserver/tests/api/routers/test_authenticate.py:123
Functiontest_revoke_token_no_endpoint
Revocation is silently skipped when the provider has no revocation_endpoint.
carbonserver/tests/api/routers/test_authenticate.py:111
Functiontest_revoke_token_success
Token is revoked successfully when the provider exposes a revocation_endpoint.
carbonserver/tests/api/routers/test_authenticate.py:87
Methodtest_rocm_initialization
(self, mock_subprocess, mock_nvidia, mock_rocm)
tests/test_gpu.py:209
Functiontest_run_and_monitor_handles_generic_exception
(monkeypatch)
tests/cli/test_monitor.py:48
Functiontest_run_and_monitor_handles_keyboard_interrupt
(monkeypatch)
tests/cli/test_monitor.py:125
Functiontest_run_and_monitor_handles_missing_command
(monkeypatch)
tests/cli/test_monitor.py:33
Functiontest_run_and_monitor_requires_command
(monkeypatch)
tests/cli/test_monitor.py:23
Functiontest_run_and_monitor_uses_offline_tracker_when_offline_mode
(monkeypatch)
tests/cli/test_monitor.py:63
Functiontest_run_and_monitor_uses_online_tracker_by_default
(monkeypatch)
tests/cli/test_monitor.py:94
Functiontest_run_service_creates_correct_run
(_)
carbonserver/tests/api/service/test_run_service.py:36
Functiontest_run_service_retrieves_all_existing_runs
()
carbonserver/tests/api/service/test_run_service.py:55
Functiontest_run_service_retrieves_correct_last_run_for_project_id
()
carbonserver/tests/api/service/test_run_service.py:97
Functiontest_run_service_retrieves_correct_run_by_experiment_id
()
carbonserver/tests/api/service/test_run_service.py:84
Functiontest_run_service_retrieves_correct_run_by_id
()
carbonserver/tests/api/service/test_run_service.py:71
Methodtest_save_and_load_credentials
(self, mock_open)
tests/cli/test_cli_auth.py:77
Methodtest_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
Methodtest_scan_base_for_rapl_checks_direct_entries_fallback
(self)
tests/test_cpu.py:154
Methodtest_scan_direct_entries_returns_false_when_no_matching_dirs
(self)
tests/test_cpu.py:148
Methodtest_scan_domain_directories_returns_true_for_main_domain
(self)
tests/test_cpu.py:133
Methodtest_scheduler_warning_shown_when_running
Test that scheduler warning is shown when scheduler is running but delayed.
tests/test_emissions_tracker.py:785
Methodtest_scheduler_warning_suppressed_when_stopped
Test that scheduler warning is suppressed when scheduler is stopped.
tests/test_emissions_tracker.py:742
Methodtest_set_access_token_updates_client
(self)
tests/test_api_call.py:42
Functiontest_set_cpu_gpu_ram_tracking_calls_all_setup_steps
()
tests/test_resource_tracker.py:340
Methodtest_set_cpu_tracking_fallback_instantiates_tdp
(self)
tests/test_cpu.py:681
Functiontest_set_cpu_tracking_falls_back_when_forced_power_is_set
()
tests/test_resource_tracker.py:263
Methodtest_set_cpu_tracking_force_cpu_load_instantiates_tdp
(self)
tests/test_cpu.py:634
Functiontest_set_cpu_tracking_force_mode_uses_cpu_load_and_returns
()
tests/test_resource_tracker.py:201
Functiontest_set_cpu_tracking_prefers_power_gadget
()
tests/test_resource_tracker.py:217
Functiontest_set_cpu_tracking_prefers_rapl_before_powermetrics
()
tests/test_resource_tracker.py:240
Methodtest_set_cpu_tracking_skips_tdp_when_rapl_available
(self)
tests/test_cpu.py:582
Methodtest_set_experiment_updates_value
(self)
tests/test_api_call.py:284
Functiontest_set_gpu_tracking_handles_no_gpu
()
tests/test_resource_tracker.py:321
Functiontest_set_gpu_tracking_nvidia_populates_conf
()
tests/test_resource_tracker.py:288
Methodtest_set_gpu_tracking_rocm_with_mixed_ids
(self)
tests/test_cpu.py:795
Methodtest_set_gpu_tracking_rocm_with_string_ids
(self)
tests/test_cpu.py:753
Functiontest_set_ram_tracking_uses_forced_power
()
tests/test_resource_tracker.py:58
Methodtest_setup_cli_raises_on_unsupported_platform
(self)
tests/test_powermetrics.py:110
Methodtest_setup_cli_raises_on_unsupported_platform
(self)
tests/test_cpu.py:250
Methodtest_setup_cli_raises_when_binary_missing_on_apple_silicon
(self)
tests/test_powermetrics.py:118
Methodtest_setup_cli_uses_windows_backup_when_primary_missing
(self)
tests/test_cpu.py:226
Functiontest_setup_cpu_load_mode_returns_false_without_psutil
()
tests/test_resource_tracker.py:77
Functiontest_setup_cpu_load_mode_updates_tracker_state
()
tests/test_resource_tracker.py:87
Functiontest_setup_fallback_tracking_uses_cpu_load_when_tdp_matches
()
tests/test_resource_tracker.py:139
Functiontest_setup_fallback_tracking_uses_global_constant_when_no_tdp_and_no_psutil
()
tests/test_resource_tracker.py:171
Functiontest_setup_powermetrics_tracks_cpu_and_gpu
()
tests/test_resource_tracker.py:117
Functiontest_show_config_handles_access_token_errors
(monkeypatch, tmp_path, capsys)
tests/cli/test_cli_main.py:107
Functiontest_show_config_prints_missing_project_and_experiment
( monkeypatch, tmp_path, capsys )
tests/cli/test_cli_main.py:219
Functiontest_sign_up_service_creates_user_with_default_project_and_organisation
()
carbonserver/tests/api/service/test_sign_up_service.py:95
Methodtest_slurm_memory_gb_caches_parsed_result
(self, mock_read)
tests/test_ram.py:171
Methodtest_slurm_memory_gb_falls_back_when_scontrol_fails
( self, mock_virtual_memory, mock_read )
tests/test_ram.py:157
Methodtest_snake_to_camel_conversion
(self)
tests/test_boamps_output.py:112
Methodtest_software_mapping
language='python', version from python_version.
tests/test_boamps_output.py:453
Methodtest_static_gpu_info
(self)
tests/test_gpu_nvidia.py:162
Methodtest_static_gpu_info_not_available
(self)
tests/test_gpu_nvidia.py:429
Methodtest_stream_handler_not_duplicated
Calling set_logger_format() twice must not duplicate the StreamHandler.
tests/test_logger.py:43
Functiontest_sum_computes_for_organization_id
()
carbonserver/tests/api/usecase/organization/test_organization_detailed_sums.py:40
Functiontest_sum_computes_for_project_id
()
carbonserver/tests/api/usecase/project/test_project_detailed_sums.py:34
Functiontest_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
Methodtest_system_mapping
os field maps to system.os.
tests/test_boamps_output.py:448
Methodtest_task_energy_with_live_update_interference
( self, mock_apple_silicon_measure, mock_cpu_measure, # Method decorator (innermost)
tests/test_emissions_tracker.py:614
Methodtest_task_from_dict_with_nested
(self)
tests/test_boamps_output.py:997
Methodtest_task_serialization_with_nested_lists
(self)
tests/test_boamps_output.py:173
Methodtest_task_utilization_tracking
Test that task-based tracking includes utilization metrics.
tests/test_utilization_tracking.py:155
Functiontest_telemetry_service_creates_telemetry
()
carbonserver/tests/api/service/test_telemetry_service.py:12
Methodtest_too_much_gpu_ids_in_env
(self)
tests/test_config.py:351
Methodtest_total_power_returns_zero_on_exception
(self)
tests/test_ram.py:240
Methodtest_total_power_uses_process_memory_in_process_mode
(self)
tests/test_ram.py:221
Methodtest_track_emissions_forwards_force_carbon_intensity_parameter
(self)
tests/test_config.py:292
Methodtest_track_emissions_forwards_force_carbon_intensity_to_offline_tracker
(self)
tests/test_config.py:310
Methodtest_tracker_co2_signal_api_token_deprecated
Test that co2_signal_api_token parameter works in EmissionsTracker.
tests/test_electricitymaps_backward_compatibility.py:48
Methodtest_tracker_measures_correctly_each_inference_from_task
(self)
tests/test_tracking_inference.py:64
Methodtest_tracker_measures_model_loading_task
(self)
tests/test_tracking_inference.py:45
Methodtest_tracker_new_parameter_takes_precedence
Test that new parameter takes precedence in EmissionsTracker.
tests/test_electricitymaps_backward_compatibility.py:64
Methodtest_tracker_outputs_data_point_for_each_task_logged
(self)
tests/test_tracking_inference.py:84
Methodtest_tracking_modes_omitted
cpuTrackingMode/gpuTrackingMode are omitted (not available in EmissionsData).
tests/test_boamps_output.py:339
Methodtest_try_get_nordic_region_emissions_returns_none_for_non_nordic_region
(self)
tests/test_emissions.py:271
Methodtest_try_get_nordic_region_emissions_returns_none_if_region_data_missing
(self)
tests/test_emissions.py:345
Methodtest_try_get_nordic_region_emissions_returns_none_on_data_loading_error
(self)
tests/test_emissions.py:361
← previousnext →1,701–1,800 of 1,889, ranked by callers