Skip to content
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

Propose new environmental consideration information for ML models #395

Merged
merged 76 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
112057a
Propose new environmental consideration information for ML models
mrutkows Mar 7, 2024
ac3e92b
Propose new environmental consideration information for ML models
mrutkows Mar 7, 2024
c371e36
Propose new environmental consideration information for ML models
mrutkows Mar 7, 2024
89c47e2
Propose new environmental consideration information for ML models
mrutkows Mar 8, 2024
5bc5c89
Propose new environmental consideration information for ML models
mrutkows Mar 8, 2024
11447b4
Add XML schema for environmentalConsiderations of model cards
mrutkows Mar 21, 2024
1d47a9b
Add XML schema for co2MeasureType
mrutkows Mar 21, 2024
ce19f62
Add energyProviderType and postalAddressType to XML schema
mrutkows Mar 21, 2024
97500b3
Add energyConsumptionType to XML schema
mrutkows Mar 22, 2024
ac530ca
Assure json schema types do not allow additional props.
mrutkows Mar 22, 2024
248f4e0
Correct data type for energyMeasureType's element named value
mrutkows Mar 22, 2024
649367a
Correct data type within environmentalConsiderations to be an array o…
mrutkows Mar 22, 2024
48ea7f9
Correct data type within environmentalConsiderations to be an array o…
mrutkows Mar 22, 2024
ed2304b
Correct data type within environmentalConsiderations to be an array o…
mrutkows Mar 22, 2024
915481b
Correct data type within environmentalConsiderations to be an array o…
mrutkows Mar 22, 2024
c04e4ca
Correct data type within environmentalConsiderations to be an array o…
mrutkows Mar 22, 2024
535e72e
Fix description for energyCost element
mrutkows Mar 22, 2024
964173b
add bom-ref to postal address type
mrutkows Mar 22, 2024
a586728
Add missing descs. to formulation related types
mrutkows Mar 22, 2024
4403444
Add EnergyConsumptionType to protobuf sceham
mrutkows Mar 22, 2024
d10662e
Add EnergyConsumption, EnergyProvider and their ref. subtypes
mrutkows Mar 22, 2024
8ced6e8
Add PostalAddressType to protobuf
mrutkows Mar 22, 2024
6ea561d
Fix syntaax error in EnergyProviderType
mrutkows Mar 22, 2024
72f36e0
Fix zero value enums errors (i.e., should be suffixed with _UNSPECIFIED)
mrutkows Mar 22, 2024
7c701a2
Fix zero value enums errors (i.e., should be suffixed with _UNSPECIFIED)
mrutkows Mar 22, 2024
7237bc3
Fix zero value enums errors (i.e., should be suffixed with _UNSPECIFIED)
mrutkows Mar 22, 2024
1b8b886
Fix typo in EnergySourceType
mrutkows Mar 22, 2024
488489d
Fix typo in CO2_MEASURE_UNIT_TYPE_TONNES_CO2_EQUIVALENT enum defn.
mrutkows Mar 22, 2024
628ed72
Use the best practice of using an unspecified value of 0 for enums
mrutkows Mar 25, 2024
3e545a3
Use the best practice of using an unspecified value of 0 for enums
mrutkows Mar 25, 2024
a3db74a
Adjust energy source types and add enum. definitions for values
mrutkows Mar 25, 2024
2c3e1c8
Adjust energy source types and add enum. definitions for values
mrutkows Mar 25, 2024
076ba71
Adjust energy source types and add enum. definitions for values
mrutkows Mar 25, 2024
f381558
Correct double type defn. for energyConsumption
mrutkows Mar 25, 2024
597b956
Restore natural-gas as one of the energy sources
mrutkows Mar 25, 2024
3daf108
Add VSCode settings path to git ignore
mrutkows Mar 25, 2024
4a76e57
Add first example of env. consideration info.
mrutkows Mar 26, 2024
68757cc
Add LF at end of example JSON file and git ignore for linting warnings
mrutkows Mar 26, 2024
a20e982
Add ExternalReferences and Properties where they are needed for exten…
mrutkows Mar 26, 2024
1c15d63
Add valid tests to resources
mrutkows Mar 26, 2024
df4b536
foo
jkowalleck Mar 26, 2024
921e4da
Fix wrong type for publisher on json and xml schema tests
mrutkows Mar 26, 2024
1cdd16f
Fix wrong type for publisher on json and xml schema tests
mrutkows Mar 26, 2024
b8dfe00
Fix wrong type for publisher on json and xml schema tests
mrutkows Mar 26, 2024
998e58e
Merge pull request #1 from jkowalleck/energy_mod1
mrutkows Mar 26, 2024
6084dea
add description back in
jkowalleck Mar 26, 2024
e467a33
Updated tests to account for new organization element
mrutkows Mar 27, 2024
57d401f
Add type element to xml example
mrutkows Mar 27, 2024
347cc3e
Try a full supplier in XML example
mrutkows Mar 27, 2024
bb6d189
Try a full supplier in XML example
mrutkows Mar 27, 2024
00c8338
Try a full supplier in XML example
mrutkows Mar 27, 2024
f3cbda5
XML example attempt tp fix test error
mrutkows Mar 27, 2024
a88f91b
remove all but required fields from component
mrutkows Mar 27, 2024
ae5a631
build up xml test from scratch
mrutkows Mar 27, 2024
838a7be
build up xml test from scratch
mrutkows Mar 27, 2024
f9784ee
build up xml test from scratch
mrutkows Mar 27, 2024
f55385c
build up xml test from scratch
mrutkows Mar 27, 2024
b04b682
build up xml test from scratch
mrutkows Mar 27, 2024
c8e9d1c
build up xml test from scratch
mrutkows Mar 27, 2024
bbcfd93
build up xml test from scratch
mrutkows Mar 27, 2024
fdfe19f
build up xml test from scratch
mrutkows Mar 27, 2024
825a866
build up xml test from scratch
mrutkows Mar 27, 2024
c7793d1
fix examples
jkowalleck Mar 27, 2024
c299ad6
Merge remote-tracking branch 'origin/energy_mod2' into energy-fix-exa…
jkowalleck Mar 27, 2024
60af7d8
fix examples
jkowalleck Mar 27, 2024
394d698
build up xml test from scratch
mrutkows Mar 27, 2024
6779610
build up xml test from scratch
mrutkows Mar 27, 2024
44c8ba3
build up xml test from scratch
mrutkows Mar 27, 2024
4e2bff0
build up xml test from scratch
mrutkows Mar 27, 2024
8fca445
build up xml test from scratch
mrutkows Mar 27, 2024
3af31f1
Merge branch 'energy' into energy-fix-examples
mrutkows Mar 27, 2024
b822d87
Merge pull request #3 from jkowalleck/energy-fix-examples
mrutkows Mar 27, 2024
3525462
insert energyConsumptionsType (plural) into XSD to account for anon. …
mrutkows Mar 27, 2024
5d85af3
fix line-wrap in top of xml example
mrutkows Mar 27, 2024
641bd14
remove old example
mrutkows Mar 27, 2024
2a83cf9
Fix typo in name of test file
mrutkows Mar 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
tools/target/
.vscode/
tools/target/
143 changes: 142 additions & 1 deletion schema/bom-1.6.proto
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,8 @@ message OrganizationalEntity {
repeated OrganizationalContact contact = 3;
// An optional identifier which can be used to reference the object elsewhere in the BOM. Uniqueness is enforced within all elements and children of the root-level bom element.
optional string bom_ref = 4;
// The physical address (location) of the organization
optional PostalAddressType address = 5;
}

enum PatchClassification {
Expand Down Expand Up @@ -1129,10 +1131,12 @@ message ModelCard {
repeated string technicalLimitations = 3;
// What are the known tradeoffs in accuracy/performance of the model?
repeated string performanceTradeoffs = 4;
// What are the ethical (or environmental) risks involved in the application of this model?
// What are the ethical risks involved in the application of this model?
repeated EthicalConsiderations ethicalConsiderations = 5;
// How does the model affect groups at risk of being systematically disadvantaged? What are the harms and benefits to the various affected groups?
repeated FairnessAssessments fairnessAssessments = 6;
// What are the various environmental impacts the corresponding machine learning model has exhibited across its lifecycle?
optional EnvironmentalConsiderations environmentalConsiderations = 7;

message EthicalConsiderations {
// The name of the risk.
Expand All @@ -1150,7 +1154,142 @@ message ModelCard {
// With respect to the benefits and harms outlined, please describe any mitigation strategy implemented.
optional string mitigationStrategy = 4;
}
message EnvironmentalConsiderations {
// Describes energy consumption information incurred for one or more component lifecycle activities.
repeated EnergyConsumption energyConsumptions = 1;
jkowalleck marked this conversation as resolved.
Show resolved Hide resolved
// Specifies optional, custom properties for environment considerations
repeated Property properties = 2;
}
// Describes energy consumption information incurred for the specified lifecycle activity.
message EnergyConsumption {
// An activity that is part of a machine learning model development or operational lifecycle.
enum ActivityType {
ACTIVITY_TYPE_UNSPECIFIED = 0;
// a lifecycle activity type whose description does not match currently defined values (the default type).
ACTIVITY_TYPE_OTHER = 1;
// model design including problem framing, goal definition and algorithm selection.
ACTIVITY_TYPE_DESIGN = 2;
// model data acquisition including search, selection and transfer.
ACTIVITY_TYPE_DATA_COLLECTION = 3;
// model data preparation including data cleaning, labeling and conversion.
ACTIVITY_TYPE_DATA_PREPARATION = 4;
// model building, training and generalized tuning.
ACTIVITY_TYPE_TRAINING = 5;
// refining a trained model to produce desired outputs for a given problem space.
ACTIVITY_TYPE_FINE_TUNING = 6;
// model validation including model output evaluation and testing.
ACTIVITY_TYPE_VALIDATION = 7;
// explicit model deployment to a target hosting infrastructure.
ACTIVITY_TYPE_DEPLOYMENT = 8;
// generating an output response from a hosted model from a set of inputs.
ACTIVITY_TYPE_INFERENCE = 9;
}

// The type of activity that is part of a machine learning model development or operational lifecycle.
ActivityType activity = 1;
// The providers of the energy consumed by the associated model development lifecycle activity.
repeated EnergyProviderType energyProviders = 2;
// The total energy cost associated with the model lifecycle activity.
EnergyMeasureType activityEnergyCost = 3;
// The CO2 cost or debit equivalent to the total energy cost.
optional CO2MeasureType co2CostEquivalent = 4;
// The CO2 offset or credit for the CO2 equivalent cost.
optional CO2MeasureType co2CostOffset = 5;
// Specifies optional, custom properties for environment considerations
repeated Property properties = 6;
}
}
}


// Describes the physical provider of energy used for model development or operations.
message EnergyProviderType {
enum EnergySourceType {
ENERGY_SOURCE_TYPE_UNSPECIFIED = 0;
// energy source: unknown. The energy source is unknown.
ENERGY_SOURCE_TYPE_UNKNOWN = 1;
// energy source: other. An energy source that is not listed.
ENERGY_SOURCE_TYPE_OTHER = 2;
// energy source: coal. Energy produced by types of coal.
ENERGY_SOURCE_TYPE_COAL = 3;
// energy source: oil. Petroleum products (primarily crude oil and its derivative fuel oils).
ENERGY_SOURCE_TYPE_OIL = 4;
// energy source: natural-gas. Hydrocarbon gas liquids (HGL) that occur as gases at atmospheric pressure and as liquids under higher pressures including Natural gas (C5H12 and heavier), Ethane (C2H6), Propane (C3H8), etc.
ENERGY_SOURCE_TYPE_NATURAL_GAS = 5;
// energy source: nuclear. Energy produced from the cores of atoms (i.e., through nuclear fission or fusion).
ENERGY_SOURCE_TYPE_NUCLEAR = 6;
// energy source: wind. Energy produced from moving air.
ENERGY_SOURCE_TYPE_WIND = 7;
// energy source: solar. Energy produced from the sun (i.e., solar radiation).
ENERGY_SOURCE_TYPE_SOLAR = 8;
// energy source: geothermal. Energy produced from heat within the earth.
ENERGY_SOURCE_TYPE_GEOTHERMAL = 9;
// energy source: hydropower. Energy produced from flowing water.
ENERGY_SOURCE_TYPE_HYDROPOWER = 10;
// energy source: biofuel. Liquid fuels produced from biomass feedstocks (i.e., organic materials such as plants or animals).
ENERGY_SOURCE_TYPE_BIOFUEL = 11;
}

// BOM unique reference to the energy provider.
optional string bom_ref = 1;
// A description of the energy provider.
string description = 2;
// The organization of the energy provider.
OrganizationalEntity organization = 3;
// The energy source for the energy provider.
EnergySourceType energySource = 4;
// The energy provided by the energy source for an associated activity.
EnergyMeasureType energyProvided = 5;
// Provides the ability to document external references related to the BOM or to the project the BOM describes.
repeated ExternalReference external_references = 6;
}

// A measure of energy.
message EnergyMeasureType {
enum EnergyMeasureUnitType {
ENERGY_MEASURE_UNIT_TYPE_UNSPECIFIED = 0;
// kilowatt-hour (kWh) is the energy delivered by one kilowatt (kW) of power for one hour (h) (the default unit).
ENERGY_MEASURE_UNIT_TYPE_KILOWATT_HOURS = 1;
}

// Quantity of energy.
float value = 1;
// Unit of energy.
EnergyMeasureUnitType unit = 2;
}


// A measure of carbon dioxide (CO2).
message CO2MeasureType {
enum CO2MeasureUnitType {
CO2_MEASURE_UNIT_TYPE_UNSPECIFIED = 0;
// Tonnes (t) of carbon dioxide (CO2) equivalent (eq) (the default unit).
CO2_MEASURE_UNIT_TYPE_TONNES_CO2_EQUIVALENT = 1;
}

// Quantity of carbon dioxide (CO2).
float value = 1;
// Unit of carbon dioxide (CO2).
CO2MeasureUnitType unit = 2;
}


// An address used to identify a contactable location.
message PostalAddressType {
// An optional identifier which can be used to reference the address elsewhere in the BOM. Every bom-ref MUST be unique within the BOM.
optional string bom_ref = 1;
// The country name or the two-letter ISO 3166-1 country code.
optional string country = 2;
// The region or state in the country. For example, Texas.
optional string region = 3;
// The locality or city within the country. For example, Austin.
optional string locality = 4;
// The post office box number. For example, 901.
optional string postOfficeBoxNumber = 5;
// The postal code. For example, 78758.
optional string postalCodeue = 6;
jkowalleck marked this conversation as resolved.
Show resolved Hide resolved
// The street address. For example, 100 Main Street.
optional string streetAddress = 7;
jkowalleck marked this conversation as resolved.
Show resolved Hide resolved
}

enum ModelParameterApproachType {
Expand Down Expand Up @@ -1476,6 +1615,7 @@ message InputType {
repeated Property properties = 7;
}

// Type that represents various output data types and formats.
message OutputType {
// Describes the type of data output.
optional OutputTypeType type = 1;
Expand Down Expand Up @@ -1504,6 +1644,7 @@ message OutputType {
}
}

// Type that permits a choice to reference a resource using an iternal bom-ref identifier or an external reference.
message ResourceReferenceChoice {
oneof choice {
string ref = 1;
Expand Down
Loading