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
↓ 2 callers
Method
get_household_fraction
Total CO2 emissions for energy use per home: 5.734 metric tons CO2 for electricity + 2.06 metric tons CO2 for natural gas + 0.26 metr
codecarbon/viz/data.py:86
↓ 2 callers
Function
get_http_exception
take an internal exception and return a HTTPException
carbonserver/carbonserver/api/errors.py:67
↓ 2 callers
Method
get_net_summary
()
codecarbon/viz/components.py:55
↓ 2 callers
Method
get_nordic_country_energy_mix_data
Returns Nordic Country Energy Mix Data. Data is cached on first access per country.
codecarbon/input.py:190
↓ 2 callers
Method
get_one_organization
(self, organization_id)
carbonserver/carbonserver/api/domain/organizations.py:12
↓ 2 callers
Method
get_project_details
()
codecarbon/viz/components.py:102
↓ 2 callers
Method
get_project_dropdown
(df: pd.DataFrame)
codecarbon/viz/components.py:84
↓ 2 callers
Method
get_project_emissions_bar_chart
()
codecarbon/viz/components.py:631
↓ 2 callers
Method
get_project_emissions_bar_chart_figure
(project_data: dt.DataTable)
codecarbon/viz/components.py:662
↓ 2 callers
Method
get_project_summary
(project_data: List[Dict])
codecarbon/viz/data.py:25
↓ 2 callers
Method
get_project_time_series
()
codecarbon/viz/components.py:617
↓ 2 callers
Method
get_project_time_series_figure
(project_data: dt.DataTable)
codecarbon/viz/components.py:645
↓ 2 callers
Method
get_references
()
codecarbon/viz/components.py:711
↓ 2 callers
Method
get_region_emissions
Computes emissions for a region on private infra. Given an quantity of power consumed, use regional data on emissions per un
codecarbon/core/emissions.py:233
↓ 2 callers
Method
get_regional_emissions_choropleth_data
( self, net_energy_consumed: float, country_iso_code: str )
codecarbon/viz/data.py:157
↓ 2 callers
Method
get_regional_emissions_choropleth_figure
( self, choropleth_data, country_iso_code: str )
codecarbon/viz/components.py:567
↓ 2 callers
Method
get_regional_emissions_comparison
()
codecarbon/viz/components.py:544
↓ 2 callers
Method
get_tv_time
Gives the amount of time a 32-inch LCD flat screen TV will emit an equivalent amount of carbon Ratio is 0.097 kg CO2
codecarbon/viz/data.py:67
↓ 2 callers
Method
get_user_by_email
(self, email: str)
carbonserver/carbonserver/api/services/user_service.py:23
↓ 2 callers
Function
heavy_computation
(run_time_secs: int = 3)
tests/test_custom_handler.py:9
↓ 2 callers
Function
heavy_computation
(run_time_secs: float = 3)
tests/test_offline_emissions_tracker.py:13
↓ 2 callers
Function
is_mac_arm
(cpu_model: str)
codecarbon/core/util.py:91
↓ 2 callers
Function
is_powermetrics_available
()
codecarbon/core/powermetrics.py:14
↓ 2 callers
Method
is_user_authorized_on_project
(self, project_id, user_id: UUID)
carbonserver/carbonserver/api/infra/repositories/repository_users.py:115
↓ 2 callers
Method
list_experiments_from_project
List all experiments for a project
codecarbon/core/api_client.py:300
↓ 2 callers
Method
list_runs
(self, user: User = None)
carbonserver/carbonserver/api/services/run_service.py:25
↓ 2 callers
Method
list_runs_from_experiment
(self, experiment_id: str, user: User = None)
carbonserver/carbonserver/api/services/run_service.py:28
↓ 2 callers
Method
list_tokens_from_project
(self, project_id, user)
carbonserver/carbonserver/api/services/project_token_service.py:65
↓ 2 callers
Method
live_out
(self, total: EmissionsData, _)
codecarbon/output_methods/logger.py:26
↓ 2 callers
Method
live_out
(self, _, delta: EmissionsData)
codecarbon/output_methods/http.py:59
↓ 2 callers
Function
load_dataset
(dataset, split)
examples/task_inference.py:6
↓ 2 callers
Function
makeExperimentReport
(args: { experimentId: string; name: string; description: string; emissions: number; energ
webapp/src/api/mock/data.ts:137
↓ 2 callers
Function
makeProject
(args: { id: string; organizationId: string; name: string; description: string; public: bo
webapp/src/api/mock/data.ts:94
↓ 2 callers
Function
makeUser
(args: { id: string; name: string; email: string; organizationId: string; })
webapp/src/api/mock/data.ts:79
↓ 2 callers
Method
map_sql_to_schema
Convert a models.Emission to a schemas.Emission :emission: An Emission in SQLAlchemy format. :returns: An Emission in pyDantic BaseMo
carbonserver/carbonserver/api/infra/repositories/repository_emissions.py:91
↓ 2 callers
Function
measure_power
Measure power over a duration in seconds
examples/rapl/test_rapl_domains.py:24
↓ 2 callers
Function
noContent
()
webapp/src/api/mock/handlers.ts:14
↓ 2 callers
Function
one_test
(expected_load, load_type)
examples/compare_cpu_load_and_RAPL.py:328
↓ 2 callers
Method
out
(self, _, delta: EmissionsData)
codecarbon/output_methods/http.py:66
↓ 2 callers
Method
out
(self, _, delta: EmissionsData)
codecarbon/output_methods/metrics/logfire.py:62
↓ 2 callers
Function
parse_env_config
Get all environment variables starting with "CODECARBON_" (also in lower caps) mapped to their values in a dict eg: * "CODECARBO
codecarbon/core/config.py:26
↓ 2 callers
Method
patch_organization
( self, organization_id: str, organization: OrganizationPatch, user: User )
carbonserver/carbonserver/api/services/organization_service.py:79
↓ 2 callers
Method
patch_project
(self, project_id, project: ProjectPatch, user: User)
carbonserver/carbonserver/api/services/project_service.py:45
↓ 2 callers
Function
print_gpu_usage
(gpu_id)
examples/transformers_smollm2.py:31
↓ 2 callers
Method
read_organization
(self, organization_id: str, user: User)
carbonserver/carbonserver/api/services/organization_service.py:50
↓ 2 callers
Method
read_project_last_run
( self, project_id: str, start_date, end_date, user: User = None )
carbonserver/carbonserver/api/services/run_service.py:31
↓ 2 callers
Method
read_run
(self, run_id: UUID, user: User = None)
carbonserver/carbonserver/api/services/run_service.py:22
↓ 2 callers
Function
read_tapo
()
examples/compare_cpu_load_and_RAPL.py:86
↓ 2 callers
Function
renderInTable
(node: React.ReactNode)
webapp/tests/components/custom-row.test.tsx:8
↓ 2 callers
Function
renderWithSwr
(node: React.ReactNode)
webapp/tests/pages/HomePage.test.tsx:29
↓ 2 callers
Function
renderWithSwr
(node: React.ReactNode)
webapp/tests/pages/ProjectsPage.test.tsx:31
↓ 2 callers
Function
renderWithSwr
(node: React.ReactNode)
webapp/tests/pages/MembersPage.test.tsx:27
↓ 2 callers
Function
send_run
(experiment_id: str)
carbonserver/tests/api/integration/test_api_black_box.py:209
↓ 2 callers
Method
session
(self)
carbonserver/carbonserver/api/infra/database/database_manager.py:29
↓ 2 callers
Method
set_CPU_GPU_ram_tracking
Set up CPU, GPU and RAM tracking based on the user's configuration. param tracker: BaseEmissionsTracker object
codecarbon/core/resource_tracker.py:253
↓ 2 callers
Method
set_RAM_tracking
(self)
codecarbon/core/resource_tracker.py:24
↓ 2 callers
Function
show_config
(path: Path = Path("./.codecarbon.config"))
codecarbon/cli/main.py:70
↓ 2 callers
Method
sign_up
( self, user: UserAutoCreate, )
carbonserver/carbonserver/api/services/signup_service.py:37
↓ 2 callers
Method
start
(self)
codecarbon/external/hardware.py:73
↓ 2 callers
Method
task_out
Save the emissions data from a single task in an experiment run to a CSV file. Does not attempt to backup existing files or prevent
codecarbon/output_methods/file.py:132
↓ 2 callers
Function
trimTrailingSlash
(value: string)
webapp/src/api/auth.ts:1
↓ 2 callers
Function
updateProject
( projectId: string, project: ProjectInputs, )
webapp/src/api/projects.ts:17
↓ 2 callers
Function
useChart
()
webapp/src/components/ui/chart.tsx:27
↓ 1 callers
Method
__init__
:param project_name: Project name for current experiment run, default name is "codecarbon". :param measu
codecarbon/emissions_tracker.py:367
↓ 1 callers
Method
__init__
(self, save_to_file=False, **kwargs)
tests/cli/test_cli_main.py:74
↓ 1 callers
Function
_allocate_matrix
Allocate matrix tensors on all devices with fallback to smaller size on failure.
examples/slurm_rocm/pytorch_matrix.py:94
↓ 1 callers
Method
_auth_handler
(self, url, method, timeout, headers, data)
codecarbon/output_methods/metrics/prometheus.py:119
↓ 1 callers
Function
_build_environment
Build environment from EmissionsData location fields.
codecarbon/output_methods/boamps/mapper.py:240
↓ 1 callers
Function
_build_header
Build header from EmissionsData, merging with user overrides.
codecarbon/output_methods/boamps/mapper.py:85
↓ 1 callers
Function
_build_infrastructure
Build infrastructure from EmissionsData hardware fields.
codecarbon/output_methods/boamps/mapper.py:157
↓ 1 callers
Function
_build_measure
Build a BoAmps measure from EmissionsData.
codecarbon/output_methods/boamps/mapper.py:114
↓ 1 callers
Method
_build_readable_domains
Build list of readable domain tuples.
codecarbon/core/cpu.py:586
↓ 1 callers
Function
_build_software
Build software info from EmissionsData.
codecarbon/output_methods/boamps/mapper.py:149
↓ 1 callers
Function
_build_system
Build system info from EmissionsData.
codecarbon/output_methods/boamps/mapper.py:144
↓ 1 callers
Method
_calculate_power_from_cpu_load_treadripper
(tdp, cpu_load)
codecarbon/external/hardware.py:243
↓ 1 callers
Function
_check_external
(session: requests.Session, url: str)
scripts/check_docs_links.py:150
↓ 1 callers
Method
_classify_domains
Classify domains into package, psys, dram, and subdomains.
codecarbon/core/cpu.py:617
↓ 1 callers
Function
_cleanup_resources
Clean up GPU and tensor resources.
examples/slurm_rocm/pytorch_matrix.py:207
↓ 1 callers
Method
_collect_domain_dirs
Collect all potential RAPL domain directories from candidate bases.
codecarbon/core/cpu.py:508
↓ 1 callers
Method
_configure_electricitymaps_token
( self, electricitymaps_api_token, co2_signal_api_token )
codecarbon/emissions_tracker.py:188
↓ 1 callers
Method
_configure_multiple_runs
(self, allow_multiple_runs)
codecarbon/emissions_tracker.py:168
↓ 1 callers
Method
_create_rapl_files
Create RAPLFile objects from deduplicated domains.
codecarbon/core/cpu.py:750
↓ 1 callers
Function
_create_warn_function
Create a warning function that only warns once for permission errors.
codecarbon/core/cpu.py:161
↓ 1 callers
Method
_deduplicate_domains
Deduplicate domains by name, preferring MMIO over MSR.
codecarbon/core/cpu.py:731
↓ 1 callers
Method
_deduplicate_domains
Remove duplicate domains with the same name, preferring MMIO over MSR-based :param domains: List of domain info dictionaries
examples/rapl/intel_rapl_show.py:225
↓ 1 callers
Method
_detect_arm_cpu
Detect if the CPU is ARM-based
codecarbon/external/ram.py:68
↓ 1 callers
Method
_do_measurements
(self)
codecarbon/emissions_tracker.py:1131
↓ 1 callers
Method
_fallback_collect_domains
Fallback: try direct listing of configured RAPL dir.
codecarbon/core/cpu.py:515
↓ 1 callers
Method
_fetch_rapl_files
Fetches RAPL files from the RAPL directory. By default, reads CPU package only Set rapl_include_dram=True to measure CPU pac
codecarbon/core/cpu.py:799
↓ 1 callers
Method
_get_cloud_metadata
(self)
codecarbon/emissions_tracker.py:1361
↓ 1 callers
Method
_get_cpu_constant_power
Extract constant power from matched CPU
codecarbon/core/cpu.py:890
↓ 1 callers
Method
_get_energy_from_cpus
Get CPU energy deltas from RAPL files :return: energy in kWh
codecarbon/external/hardware.py:364
↓ 1 callers
Method
_get_geo_metadata
:return: Metadata containing geographical info
codecarbon/emissions_tracker.py:1089
↓ 1 callers
Method
_get_power
Get Chip part power Args: chip_part (str): Chip part to get power from (CPU, GPU) :return: power in kW
codecarbon/external/hardware.py:471
↓ 1 callers
Method
_get_rapl_candidate_bases
Get list of directories to scan for RAPL domains.
codecarbon/core/cpu.py:464
↓ 1 callers
Method
_global_energy_mix_to_emissions_rate
Convert a mix of electricity sources into emissions per kWh. :param energy_mix: A dictionary that breaks down the electricity produce
codecarbon/core/emissions.py:328
↓ 1 callers
Function
_has_powermetrics_sudo
()
codecarbon/core/powermetrics.py:27
↓ 1 callers
Method
_init_output_methods
Prepare the different output methods based on ``self._output_methods``.
codecarbon/emissions_tracker.py:588
↓ 1 callers
Method
_initialize_emissions_context
(self)
codecarbon/emissions_tracker.py:350
↓ 1 callers
Method
_initialize_hardware_tracking
(self)
codecarbon/emissions_tracker.py:314
← previous
next →
301–400 of 1,889, ranked by callers