MCPcopy Create free account

hub / github.com/mlco2/codecarbon / functions

Functions1,889 in github.com/mlco2/codecarbon

Methodtest_cloud_metadata_GCP_empty
(self, mock_get_env_cloud_details)
tests/test_geography.py:65
Methodtest_cloud_uses_forced_intensity_when_set
(self)
tests/test_emissions.py:200
Methodtest_codecarbon_api_live_out
(self)
tests/output_methods/test_http.py:139
Methodtest_codecarbon_api_out
(self)
tests/output_methods/test_http.py:162
Methodtest_codecarbon_api_output_initialization
(self)
tests/output_methods/test_http.py:131
Methodtest_codecarbon_live_out_api_call_failure
(self, mock_logger)
tests/output_methods/test_http.py:151
Methodtest_codecarbon_out_api_call_failure
(self, mock_logger)
tests/output_methods/test_http.py:174
Methodtest_config_no_local_new_all
( self, mock_typer_prompt, mock_token, mock_prompt, mock_confirm,
tests/cli/test_cli.py:62
Methodtest_context_file_lifecycle
Full lifecycle using from_file() constructor.
tests/test_boamps_output.py:1122
Methodtest_context_file_task_overrides
Context file task values are preserved.
tests/test_boamps_output.py:839
Methodtest_context_with_environment_overrides
Environment fields from context file are applied as overrides.
tests/test_boamps_output.py:906
Methodtest_context_with_infrastructure_overrides
Infrastructure fields from context file are applied as overrides.
tests/test_boamps_output.py:880
Methodtest_context_with_user_components
User-provided components enrich auto-detected ones.
tests/test_boamps_output.py:932
Functiontest_core_and_server_telemetry_schemas_do_not_drift
()
carbonserver/tests/api/test_telemetry_schema_drift.py:40
Functiontest_count_cpus_no_slurm
()
tests/test_core_util.py:99
Functiontest_count_cpus_slurm
()
tests/test_core_util.py:105
Functiontest_count_cpus_slurm_exception
()
tests/test_core_util.py:123
Functiontest_count_cpus_slurm_malformed
()
tests/test_core_util.py:135
Functiontest_count_cpus_slurm_no_gpu
()
tests/test_core_util.py:114
Functiontest_count_cpus_slurm_too_many_matches
()
tests/test_core_util.py:145
Methodtest_count_physical_cpus_linux
(self)
tests/test_cpu.py:869
Methodtest_count_physical_cpus_windows
(self)
tests/test_cpu.py:834
Methodtest_count_physical_cpus_windows_with_error
(self)
tests/test_cpu.py:847
Methodtest_country_data_lazy_loaded
Verify country-specific data is lazy-loaded and cached.
tests/test_input.py:70
Functiontest_country_specific_data_access
Test that we can access country-specific data if available.
tests/test_package_integrity.py:85
Methodtest_cpu_calculate_power_from_cpu_load_linear
( self, mocked_is_psutil_available, mocked_is_powergadget_available, mocked_is
tests/test_cpu_load.py:98
Methodtest_cpu_calculate_power_from_cpu_load_threadripper
( self, mocked_is_psutil_available, mocked_is_powergadget_available, mocked_is
tests/test_cpu_load.py:71
Methodtest_cpu_component_details
cpu_count (threads) is halved to approximate physical cores.
tests/test_boamps_output.py:355
Methodtest_cpu_load_detection
( self, mocked_is_psutil_available, mocked_is_powergadget_available, mocked_is
tests/test_cpu_load.py:52
Functiontest_cpu_power_data_included
Test that CPU power data is included.
tests/test_package_integrity.py:43
Methodtest_cpu_total_power
( self, mocked_is_psutil_available, mocked_is_powergadget_available, mocked_is
tests/test_cpu_load.py:36
Methodtest_cpu_total_power_averages_buffered_and_latest_sample
( self, mocked_get_power_from_cpus, mocked_is_psutil_available, mocked_is_powe
tests/test_cpu_load.py:172
Methodtest_cpu_total_power_empty_history
Regression test for issue #832: ZeroDivisionError when no power samples collected.
tests/test_cpu_load.py:129
Methodtest_cpu_total_power_fetches_sample_when_history_is_empty
Calling total_power should always fetch the latest sample before averaging.
tests/test_cpu_load.py:151
Methodtest_cpu_total_power_process
( self, mocked_is_psutil_available, mocked_is_powergadget_available, mocked_is
tests/test_cpu_load.py:14
Methodtest_cpu_utilization_as_fraction
cpu_utilization_percent is converted to 0-1 range.
tests/test_boamps_output.py:327
Functiontest_create_new_config_file_creates_parent_and_file
(monkeypatch, tmp_path)
tests/cli/test_cli_utils.py:78
Functiontest_create_new_config_file_expands_home
(monkeypatch, tmp_path)
tests/cli/test_cli_utils.py:94
Methodtest_create_organization_skips_when_name_exists
(self)
tests/test_api_call.py:161
Methodtest_create_run_returns_none_on_unsuccessful_status
(self)
tests/test_api_call.py:256
Functiontest_critical_data_files_included
Test that all critical data files are included in the package.
tests/test_package_integrity.py:14
Methodtest_cuda_visible_devices_takes_precedence_over_rocr_visible_devices
(self)
tests/test_config.py:385
Methodtest_cumulative_emissions_with_varying_intensity
( self, mock_scheduler, mock_get_hw, mock_resource_tracker, mock_get,
tests/test_emissions_tracker.py:859
Functiontest_data_cleanup
Cleanup test data after test execution.
carbonserver/tests/api/integration/test_project_cascade_delete.py:47
Methodtest_dataset_from_dict
(self)
tests/test_boamps_output.py:990
Methodtest_dataset_serialization
(self)
tests/test_boamps_output.py:162
Methodtest_decorator_OFFLINE_NO_COUNTRY
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:416
Methodtest_decorator_OFFLINE_WITH_CLOUD_ARGS
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:457
Methodtest_decorator_OFFLINE_WITH_LOC_ARGS
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:433
Methodtest_decorator_ONLINE_NO_ARGS
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:332
Methodtest_decorator_ONLINE_WITH_ARGS
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:360
Methodtest_decorator_constant
(self)
tests/test_emissions_tracker_constant.py:123
Methodtest_decorator_flush
(self)
tests/test_logging_output.py:80
Methodtest_decorator_flush
(self)
tests/test_custom_handler.py:47
Methodtest_decorator_flush
(self)
tests/test_emissions_tracker_flush.py:72
Methodtest_decorator_online_passes_output_methods
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:387
Methodtest_default_output_methods_is_csv
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:238
Functiontest_delete_nonexistent_project_returns_error
Test that attempting to delete a non-existent project returns appropriate error.
carbonserver/tests/api/routers/test_projects.py:147
Functiontest_delete_project
(client, custom_test_server)
carbonserver/tests/api/routers/test_projects.py:118
Functiontest_delete_project_cascades_to_children
Test that deleting a project through the router calls the repository delete, which will cascade to all child entities (experiments, runs, emi
carbonserver/tests/api/routers/test_projects.py:129
Functiontest_delete_project_token
(client, custom_test_server)
carbonserver/tests/api/routers/test_project_tokens.py:81
Functiontest_detailed_sum_computes_for_experiment_id
()
carbonserver/tests/api/usecase/run/test_experiment_sum_by_run_usecase.py:34
Functiontest_detailed_sum_computes_for_project_id
()
carbonserver/tests/api/usecase/experiment/test_project_global_sum_by_experiment_usecase.py:58
Methodtest_detect_arm_cpu
Test ARM CPU detection logic
tests/test_ram.py:253
Functiontest_detect_cpu_model_caching
Test that detect_cpu_model() results are cached.
tests/test_core_util.py:16
Functiontest_detect_monkeypatched_tracker
(monkeypatch)
tests/cli/test_cli_main.py:72
Functiontest_disabled_telemetry_is_rejected
(client, custom_test_server)
carbonserver/tests/api/routers/test_telemetry.py:69
Methodtest_discover_endpoints
(self, mock_get)
tests/cli/test_cli_auth.py:66
Methodtest_do_get_error
(self)
tests/cli/test_cli_auth.py:49
Methodtest_do_get_success
(self)
tests/cli/test_cli_auth.py:35
Functiontest_doc_python_blocks
Test independent Python code blocks from docs. Each block runs in isolation (memory=False). CWD is changed to tmp_path to isolate any file I/
tests/test_docs_examples.py:27
Functiontest_emission_service_creates_correct_emission
(_)
carbonserver/tests/api/service/test_experiments_service.py:60
Functiontest_emission_service_creates_correct_emission
(_)
carbonserver/tests/api/service/test_emission_service.py:66
Functiontest_emission_service_retrieves_all_existing_emissions_for_one_run
()
carbonserver/tests/api/service/test_experiments_service.py:77
Functiontest_emission_service_retrieves_all_existing_emissions_for_one_run
()
carbonserver/tests/api/service/test_emission_service.py:92
Functiontest_emission_service_retrives_correct_emission_by_id
()
carbonserver/tests/api/service/test_experiments_service.py:100
Functiontest_emission_service_retrives_correct_emission_by_id
()
carbonserver/tests/api/service/test_emission_service.py:106
Methodtest_emissions_CLOUD_AZURE
(self)
tests/test_emissions.py:29
Methodtest_emissions_CLOUD_GCP
(self)
tests/test_emissions.py:40
Methodtest_emissions_co2_signal_api_token_deprecated
Test that co2_signal_api_token still works in Emissions class.
tests/test_electricitymaps_backward_compatibility.py:16
Methodtest_emissions_new_parameter_takes_precedence
Test that new parameter takes precedence over old one.
tests/test_electricitymaps_backward_compatibility.py:33
Methodtest_emissions_tracker_unsupported_gpu
(self, mock_pynvml)
tests/test_unsupported_gpu.py:27
Methodtest_emit_selection_warning_noop_when_not_dual_gcd
(self)
tests/test_gpu_amd.py:179
Methodtest_empty_conf
(self)
tests/test_config.py:177
Methodtest_environment_mapping
country_name, latitude, longitude map to environment.
tests/test_boamps_output.py:432
Methodtest_environment_overrides
Environment overrides are applied.
tests/test_boamps_output.py:499
Methodtest_estimate_dimm_count
Test DIMM count estimation based on RAM size
tests/test_ram.py:270
Methodtest_exit_method
(self, mock_delete)
tests/output_methods/metrics/test_prometheus.py:55
Functiontest_extends_emissions_units
()
tests/test_viz_units.py:22
Functiontest_fetch_org_users
(client, custom_test_server)
carbonserver/tests/api/routers/test_organizations.py:163
Functiontest_fief_cookie_and_bearer_flow
()
carbonserver/tests/api/integration/test_auth_cookie_flow.py:94
Methodtest_file_handler_preserved_after_set_logger_format
A FileHandler added by the user must survive a call to set_logger_format().
tests/test_logger.py:18
Methodtest_file_output_initialization
(self)
tests/output_methods/test_file.py:56
Methodtest_file_output_initialization_invalid_csv_write_mode
(self)
tests/output_methods/test_file.py:59
Methodtest_file_output_initialization_invalid_dir
(self)
tests/output_methods/test_file.py:63
Methodtest_file_output_out_append_empty_file_exists
(self)
tests/output_methods/test_file.py:176
Methodtest_file_output_out_append_file_exists
(self)
tests/output_methods/test_file.py:127
Methodtest_file_output_out_append_no_file_exists
(self)
tests/output_methods/test_file.py:120
Methodtest_file_output_out_append_no_gpu_consistent_columns
Regression test: successive appends with gpu_count=None/gpu_model=None must never trigger a format-change warning or produce a .bak backup fil
tests/output_methods/test_file.py:200
Methodtest_file_output_out_append_no_gpu_zero_defaults
Test that gpu_count=0 and gpu_model="" (the new tracker defaults for CPU-only machines) produce consistent CSV columns across successive write
tests/output_methods/test_file.py:269
← previousnext →1,301–1,400 of 1,889, ranked by callers