Skip to content

andy-symonds/carbonhack-if

 
 

Repository files navigation

Impact Framework

For an overview of the impact Framework, check out our wiki

How to use the Impact Framework from the Green Software Foundation

Running Impact Framework Getting Started Pipeline

Install Framework

npm install -g "@grnsft/if"

Install Plugins

npm install -g "@grnsft/if-plugins"

Install unofficial plugins

npm i -g @grnsft/if-unofficial-plugins

Create a manifest file - manifest.yml

Create a .env file

Register for Watt Time

  1. Make an .env file
WATT_TIME_USERNAME=<YOUR_DESIRED_USERNAME>
WATT_TIME_PASSWORD=<YOUR_DESIRED_PW>
WATT_TIME_EMAIL=<YOUR_DESIRED_EMAIL>
WATT_TIME_ORG=<YOUR_DESIRED_ORG>
  1. Run the watt-register.py script:

python3 utilities/watt-register.py

Run the watt-login.py script:

python3 utilities/watt-login.py

  1. Run the sample manifest file:

ie --manifest manifest-input/manifest-in.yaml --output manifest-output/manifest-out


Other Info

Plugins.json

In the root of this repo is a plugins.json file, which lists each Impact Framework plugin's metadata (such as where to find its source code, documentation, and data sources used for calculation), as well as all the information about its inputs, outputs, and required configuration.

"config": {
  "energy-per-gb": {
    "type": "float",
    "units": "kWh/GB",
    "description": "the amount of energy used by memory per GB",
    "example": 0.000392,
    "required": true
  }
},

This allows you to look in a single location to assess what plugins you might need in your pipeline and how to implement them.

For an easy way to visual this data, you can head to this JSON Hero link which can navigate this JSON via a visual, expandable UI tree.

Plugin JSON navigator

Plugin Test Manifests

Within the manifest-input/tests and manifest-output/tests folders are yaml files for each of the official IF plugins, which show a minimal implementation of that plugin if it were used in isolation, along with the output it would produce. They can be run the same way the sample website measurement manifest is run, for example:

ie --manifest manifest-input/tests/mock-observations.yml --output manifest-output/tests/mock-observations-out

This can be helpful for getting a better sense of whether your plugin is configured properly for use in your pipeline, as well as understanding what sort of data it will produce as it relates to any other plugins you plan on using for your ultimate manifest file.

Relevant Plugins for Website Measurement

  • Teads Curve - estimates CPU usages across varying type of CPUs
  • Watt Time - provides a way to calculate emissions for a given time in a specific geolocation.
  • Cloud Metadata - determine an instance's physical processor and thermal design power based on its instance name.
  • Sci - amount of carbon emitted per functional unit (e.g. API request)
  • Sci-E- simply sums up the contributions to a component's energy use (CPU/memory/network in kWh over a duration, in seconds). Acts as input to operational emissions ↩️
  • Sci-O - Operational emissions of component while in use (energy in kWh X grid intensity in gCO2e/kWh) - yields gCO2eq
  • Sci-M - carbon emitted during the manufacture and eventual disposal of a component and is added to operational carbon, yielding gCO2eq
  • TDP - Thermal Design Power of a processor - sourced from Codecarbon, Boavista, and Kaggle.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%