Skip to content

Manufacturing impacts backend #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

evenmatencio
Copy link
Contributor

@evenmatencio evenmatencio commented Jun 18, 2025

Manufacturing impacts

Description

This PR implements the computation of two manufacturing impacts: green house gases emissions (GWP, in gCO2e) and abiotic (metals and minerals) resources depletion (ADP, in kgSbe). Currently, the corresponding metrics are only available through the exported csv because the user interface for it is not implemented yet.

Methodology

The formulas and values used for manufacturing impacts rely on the methodology from the MLCA paper [1] and were jointly developed with Clément Morand.

Input data and retro-compatibility

New data files are required for this PR. This data relates to hardware impacts values for GWP and ADP. We also use new cores specifications, namely the die area and and memory for GPUs.

We did not modify the data files from previous versions. Using the previous data versions in the calculator will work the same for existing usage impacts and will return null manufacturing impacts.

Outputs

We compute the manufacturing impacts for CPUs, GPUs, memory and other devices of the selected computation platform (casing, motherboard...). These values are aggregated to produce the final impact value. As for other impacts, it works strictly the same on the home page and IA page.

Related features

Cores sub-forms

Users who want to input custom cores characteristics are now invited to select the option "I can't find my cpu/gpu". This item shows an additional sub-form with three core specs: TDP, die area and number of cores for CPUs and TDP, die area and memory for GPUs. All of them come with pre-filled average values.

CSV data files cleaned and harmonized

This was motivated by the new values used for the manufacturing impacts.
Because we need the die area that is not available for all cores, the new data comes with the following modifications of the CPU and GPU list:

  • We lose 83 CPUs, including 7 explicitly requested in Issue Missing processors (CPU or GPU) #1, but we add plenty of new cores, so the final list contains 152 CPUs with complete data.
  • We lose 19 GPUs but we add plenty of new cores, so the final list contains 25 GPUs with complete data.

New platform type: Personal workstation

The previous 'Personal computer' is now renamed as 'Personal laptop' and a new option is available: 'Personal workstation'.
This distinction is useful only for manufacturing impacts computations.
WARNING: the personal laptop base impacts for ADP is set to 0.

Other content

This PR also goes with the following improvements:

Improved error message at csv loading

Increased readability and more flexible message.

Custom carbon intensity field

The user can decide to enter a custom carbon intensity when selecting the continent of his computation, in the location section.

Adaptive cores default values

[BUGFIX] The cores default value now depends on the version.

Refactorization

We now implement blueprints as classes that inherit from the dash_extensions.enrich.DashBlueprint class. Blueprints do not really match the 'class-oriented development' patterns as callbacks cannot be implemented as methods but it is the solution we chose to make it compatible with the translation feature. Even if translation is not directly implemented in this PR, the refactorization will ease future merge processes.

References

[1] Morand, C., Ligozat, A. L., & Névéol, A. (2024, June). Mlca: a tool for machine learning life cycle assessment. In 2024 10th International Conference on ICT for Sustainability (ICT4S) (pp. 227-238). IEEE.

… die area + first manufacturing coputation for CPU
…ting some processing to the new data structure
…s, so completed now. Need to check and debug with google sheet
- satisfying frontend for all zoom levels
- calculator backend working but no retro-compatibility with previous data versions: FIX needed
- tests with export csv were not perforemed because of that
…formed yet. Retrocompatibility with previous data versions (inputs and imported csv) to be implemented
- data and imported csv retro-compatibility is satisfying,
- terminology: manufacturing instead of embodied,
- all 9 tests from csv run correctly
- increased readlibility (css improvements)
- more detailed message (distincition between missing inputs and other kinds of errors)
- csv exported from an old version of the calculator detected
@evenmatencio evenmatencio changed the title Manufacturing abiotic backend Manufacturing impacts backend Jun 19, 2025
- a subform is shown when the custom option is selected,
- apropriate tests are performed on the imported value
- small mistake in the impcats summary text
- improved comments of default values usage
- changing Both into CPU + GPU,
- addind unit to custom CI title
- WARNING: the base impact for ADP is replaced by a null value, was negative otherwise
…vated by translation that cannot work otherwise. We apply this refactorization to this branch to ease future merge
…s is motivated by translation that cannot work otherwise. We apply this refactorization to this branch to ease future merge
…is motivated by translation that cannot work otherwise. We apply this refactorization to this branch to ease future merge
…otivated by translation that cannot work otherwise. We apply this refactorization to this branch to ease future merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant