diff --git a/.gitignore b/.gitignore index fd07c943..2628a539 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea/ -tools/target/ \ No newline at end of file +.vscode/ +tools/target/ diff --git a/schema/bom-1.6.proto b/schema/bom-1.6.proto index 7312e33f..0b711641 100644 --- a/schema/bom-1.6.proto +++ b/schema/bom-1.6.proto @@ -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 { @@ -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. @@ -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; + // 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; + // The street address. For example, 100 Main Street. + optional string streetAddress = 7; } enum ModelParameterApproachType { @@ -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; @@ -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; diff --git a/schema/bom-1.6.schema.json b/schema/bom-1.6.schema.json index 8e96ebda..85a10f46 100644 --- a/schema/bom-1.6.schema.json +++ b/schema/bom-1.6.schema.json @@ -771,6 +771,11 @@ "Example Inc." ] }, + "address": { + "$ref": "#/definitions/postalAddress", + "title": "Address", + "description": "The physical address (location) of the organization" + }, "url": { "type": "array", "items": { @@ -3200,9 +3205,14 @@ "ethicalConsiderations": { "type": "array", "title": "Ethical Considerations", - "description": "What are the ethical (or environmental) risks involved in the application of this model?", + "description": "What are the ethical risks involved in the application of this model?", "items": { "$ref": "#/definitions/risk" } }, + "environmentalConsiderations":{ + "$ref": "#/definitions/environmentalConsiderations", + "title": "Environmental Considerations", + "description": "What are the various environmental impacts the corresponding machine learning model has exhibited across its lifecycle?" + }, "fairnessAssessments": { "type": "array", "title": "Fairness Assessments", @@ -3470,6 +3480,240 @@ "title": "Data Classification", "description": "Data classification tags data according to its type, sensitivity, and value if altered, stolen, or destroyed." }, + "environmentalConsiderations": { + "type": "object", + "title": "Environmental Considerations", + "description": "Describes various environmental impact metrics.", + "additionalProperties": false, + "properties": { + "energyConsumptions": { + "title": "Energy Consumptions", + "description": "Describes energy consumption information incurred for one or more component lifecycle activities.", + "type": "array", + "items": { + "$ref": "#/definitions/energyConsumption" + } + }, + "properties": { + "type": "array", + "title": "Properties", + "items": { + "$ref": "#/definitions/property" + } + } + } + }, + "energyConsumption": { + "title": "Energy consumption", + "description": "Describes energy consumption information incurred for the specified lifecycle activity.", + "type": "object", + "required": [ + "activity", + "energyProviders", + "activityEnergyCost" + ], + "additionalProperties": false, + "properties": { + "activity": { + "type": "string", + "title": "Activity", + "description": "The type of activity that is part of a machine learning model development or operational lifecycle.", + "enum": [ "design", "data-collection", "data-preparation", "training", "fine-tuning", "validation", "deployment", "inference" ], + "meta:enum": { + "design": "model design including problem framing, goal definition and algorithm selection.", + "data-collection": "model data acquisition including search, selection and transfer.", + "data-preparation": "model data preparation including data cleaning, labeling and conversion.", + "training": "model building, training and generalized tuning.", + "fine-tuning": "refining a trained model to produce desired outputs for a given problem space.", + "validation": "model validation including model output evaluation and testing.", + "deployment": "explicit model deployment to a target hosting infrastructure.", + "inference": "generating an output response from a hosted model from a set of inputs.", + "other": "a lifecycle activity type whose description does not match currently defined values." + } + }, + "energyProviders": { + "title": "Energy Providers", + "description": "The provider(s) of the energy consumed by the associated model development lifecycle activity.", + "type": "array", + "items": { "$ref": "#/definitions/energyProvider" } + }, + "activityEnergyCost": { + "title": "Activity Energy Cost", + "description": "The total energy cost associated with the model lifecycle activity.", + "$ref": "#/definitions/energyMeasure" + }, + "co2CostEquivalent": { + "title": "CO2 Equivalent Cost", + "description": "The CO2 cost (debit) equivalent to the total energy cost.", + "$ref": "#/definitions/co2Measure" + }, + "co2CostOffset": { + "title": "CO2 Cost Offset", + "description": "The CO2 offset (credit) for the CO2 equivalent cost.", + "$ref": "#/definitions/co2Measure" + }, + "properties": { + "type": "array", + "title": "Properties", + "items": { + "$ref": "#/definitions/property" + } + } + } + }, + "energyMeasure": { + "type": "object", + "title": "Energy Measure", + "description": "A measure of energy.", + "required": [ + "value", + "unit" + ], + "additionalProperties": false, + "properties": { + "value": { + "type": "number", + "title": "Value", + "description": "Quantity of energy." + }, + "unit": { + "type": "string", + "enum": [ "kWh" ], + "title": "Unit", + "description": "Unit of energy.", + "meta:enum": { + "kWh": "kilowatt-hour (kWh) is the energy delivered by one kilowatt (kW) of power for one hour (h)." + } + } + } + }, + "co2Measure": { + "type": "object", + "title": "CO2 Measure", + "description": "A measure of carbon dioxide (CO2).", + "required": [ + "value", + "unit" + ], + "additionalProperties": false, + "properties": { + "value": { + "type": "number", + "title": "Value", + "description": "Quantity of carbon dioxide (CO2)." + }, + "unit": { + "type": "string", + "enum": [ "tCO2eq" ], + "title": "Unit", + "description": "Unit of carbon dioxide (CO2).", + "meta:enum": { + "tCO2eq": "Tonnes (t) of carbon dioxide (CO2) equivalent (eq)." + } + } + } + }, + "energyProvider": { + "type": "object", + "title": "Energy Provider", + "description": "Describes the physical provider of energy used for model development or operations.", + "required": [ + "organization", + "energySource", + "energyProvided" + ], + "additionalProperties": false, + "properties": { + "bom-ref": { + "title": "BOM Reference", + "description": "An optional identifier which can be used to reference the energy provider elsewhere in the BOM. Every bom-ref MUST be unique within the BOM.\nValue SHOULD not start with the BOM-Link intro 'urn:cdx:' to avoid conflicts with BOM-Links.", + "$ref": "#/definitions/refType" + }, + "description": { + "type": "string", + "title": "Description", + "description": "A description of the energy provider." + }, + "organization": { + "type": "object", + "title": "Organization", + "$ref": "#/definitions/organizationalEntity" + }, + "energySource": { + "type": "string", + "enum": [ "coal", "oil", "natural-gas", "nuclear", "wind", "solar", "geothermal", "hydropower", "biofuel", "unknown", "other" ], + "meta:enum": { + "coal": "Energy produced by types of coal.", + "oil": "Petroleum products (primarily crude oil and its derivative fuel oils).", + "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.", + "nuclear": "Energy produced from the cores of atoms (i.e., through nuclear fission or fusion).", + "wind": "Energy produced from moving air.", + "solar": "Energy produced from the sun (i.e., solar radiation).", + "geothermal": "Energy produced from heat within the earth.", + "hydropower": "Energy produced from flowing water.", + "biofuel": "Liquid fuels produced from biomass feedstocks (i.e., organic materials such as plants or animals).", + "unknown": "The energy source is unknown.", + "other": "An energy source that is not listed." + }, + "title": "Energy Source", + "description": "The energy source for the energy provider." + }, + "energyProvided": { + "$ref": "#/definitions/energyMeasure", + "title": "Energy Provided", + "description": "The energy provided by the energy source for an associated activity." + }, + "externalReferences": { + "type": "array", + "items": {"$ref": "#/definitions/externalReference"}, + "title": "External References", + "description": "External references provide a way to document systems, sites, and information that may be relevant but are not included with the BOM. They may also establish specific relationships within or external to the BOM." + } + } + }, + "postalAddress": { + "type": "object", + "title": "Postal address", + "description": "An address used to identify a contactable location.", + "additionalProperties": false, + "properties": { + "bom-ref": { + "title": "BOM Reference", + "description": "An optional identifier which can be used to reference the address elsewhere in the BOM. Every bom-ref MUST be unique within the BOM.\nValue SHOULD not start with the BOM-Link intro 'urn:cdx:' to avoid conflicts with BOM-Links.", + "$ref": "#/definitions/refType" + }, + "country": { + "type": "string", + "title": "Country", + "description": "The country name or the two-letter ISO 3166-1 country code." + }, + "region": { + "type": "string", + "title": "Region", + "description": "The region or state in the country. For example, Texas." + }, + "locality": { + "type": "string", + "title": "Locality", + "description": "The locality or city within the country. For example, Austin." + }, + "postOfficeBoxNumber ": { + "type": "string", + "title": "Post Office Box Number", + "description": "The post office box number. For example, 901." + }, + "postalCode": { + "type": "string", + "title": "Postal Code", + "description": "The postal code. For example, 78758." + }, + "streetAddress": { + "type": "string", + "title": "Street Address", + "description": "The street address. For example, 100 Main Street." + } + } + }, "formula": { "title": "Formula", "description": "Describes workflows and resources that captures rules and other aspects of how the associated BOM component or service was formed.", diff --git a/schema/bom-1.6.xsd b/schema/bom-1.6.xsd index b904975e..afbf659a 100644 --- a/schema/bom-1.6.xsd +++ b/schema/bom-1.6.xsd @@ -346,6 +346,11 @@ limitations under the License. The name of the organization + + + The physical address (location) of the organization. + + The URL of the organization. Multiple URLs are allowed. @@ -3148,7 +3153,7 @@ limitations under the License. - 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? @@ -3176,6 +3181,13 @@ limitations under the License. + + + + What are the various environmental impacts the corresponding machine learning model has exhibited across its lifecycle? + + + @@ -3237,6 +3249,438 @@ limitations under the License. + + + + Describes various environmental impact metrics. + + + + + + + Describes energy consumption information incurred for one or more component lifecycle activities. + + + + + + Provides the ability to document properties in a name/value store. + This provides flexibility to include data not officially supported in the standard + without having to use additional namespaces or create extensions. Property names + of interest to the general public are encouraged to be registered in the + CycloneDX Property Taxonomy - https://github.com/CycloneDX/cyclonedx-property-taxonomy. + Formal registration is OPTIONAL. + + + + + + + + + + + + + Allows any undeclared elements as long as the elements are placed in a different namespace. + + + + + + + User-defined attributes may be used on this element as long as they + do not have the same name as an existing attribute used by the schema. + + + + + + + + Describes energy consumption information incurred for the specified lifecycle activity. + + + + + + + The type of activity that is part of a machine learning model development or operational lifecycle. + + + + + + + + model design including problem framing, goal definition and algorithm selection. + + + + + + + model data acquisition including search, selection and transfer. + + + + + + + model data preparation including data cleaning, labeling and conversion. + + + + + + + model building, training and generalized tuning. + + + + + + + refining a trained model to produce desired outputs for a given problem space. + + + + + + + model validation including model output evaluation and testing. + + + + + + + explicit model deployment to a target hosting infrastructure. + + + + + + + generating an output response from a hosted model from a set of inputs. + + + + + + + a lifecycle activity type whose description does not match currently defined values. + + + + + + + + + + The provider(s) of the energy consumed by the associated model development lifecycle activity. + + + + + + + The total energy cost associated with the model lifecycle activity. + + + + + + + The CO2 cost (debit) equivalent to the total energy cost. + + + + + + + The CO2 offset (credit) for the CO2 equivalent cost. + + + + + + Provides the ability to document properties in a name/value store. + This provides flexibility to include data not officially supported in the standard + without having to use additional namespaces or create extensions. Property names + of interest to the general public are encouraged to be registered in the + CycloneDX Property Taxonomy - https://github.com/CycloneDX/cyclonedx-property-taxonomy. + Formal registration is OPTIONAL. + + + + + + + + + + A measure of energy. + + + + + + + Quantity of energy. + + + + + + + Unit of energy. + + + + + + + + kilowatt-hour (kWh) is the energy delivered by one kilowatt (kW) of power for one hour (h). + + + + + + + + + + + + + A measure of carbon dioxide (CO2). + + + + + + + Quantity of carbon dioxide (CO2). + + + + + + + Unit of carbon dioxide (CO2). + + + + + + + + Tonnes (t) of carbon dioxide (CO2) equivalent (eq). + + + + + + + + + + + + + Describes the physical provider of energy used for model development or operations. + + + + + + + A description of the energy provider. + + + + + + + The organization of the energy provider. + + + + + + + The energy source for the energy provider. + + + + + + + + Energy produced by types of coal. + + + + + + + Petroleum products (primarily crude oil and its derivative fuel oils). + + + + + + + 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 produced from the cores of atoms (i.e., through nuclear fission or fusion). + + + + + + + Energy produced from moving air. + + + + + + + Energy produced from the sun (i.e., solar radiation). + + + + + + + Energy produced from heat within the earth. + + + + + + + Energy produced from flowing water. + + + + + + + Liquid fuels produced from biomass feedstocks (i.e., organic materials such as plants or animals). + + + + + + + The energy source is unknown. + + + + + + + An energy source that is not listed. + + + + + + + + + + The energy provided by the energy source for an associated activity. + + + + + + External references provide a way to document systems, sites, and information that may be relevant but are not included with the BOM. They may also establish specific relationships within or external to the BOM. + + + + + + + An optional identifier which can be used to reference the energy provider elsewhere in the BOM. + Uniqueness is enforced within all elements and children of the root-level bom element. + + + + + + + + + An address used to identify a contactable location. + + + + + + + The country name or the two-letter ISO 3166-1 country code. + + + + + + + The region or state in the country. For example, Texas. + + + + + + + The locality or city within the country. For example, Austin. + + + + + + + The post office box number. For example, 901. + + + + + + + The postal code. For example, 78758. + + + + + + + The street address. For example, 100 Main Street. + + + + + + + + An optional identifier which can be used to reference the address elsewhere in the BOM. + Uniqueness is enforced within all elements and children of the root-level bom element. + + + + + diff --git a/tools/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.json b/tools/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.json new file mode 100644 index 00000000..a7a0dbf5 --- /dev/null +++ b/tools/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.json @@ -0,0 +1,65 @@ +{ + "bomFormat": "CycloneDX", + "specVersion": "1.6", + "serialNumber": "urn:uuid:ed5c5ba0-2be6-4b58-ac29-01a7fd375123", + "version": 1, + "components": [ + { + "bom-ref": "huggingface.co-meta-llama-Llama-2-7b", + "group": "meta-llama", + "name": "Llama-2-7b", + "type": "machine-learning-model", + "supplier": { + "name": "Hugging Face" + }, + "publisher": "meta", + "externalReferences": [ + { + "type": "distribution", + "url": "https://huggingface.co/meta-llama/Llama-2-7b" + } + ], + "modelCard": { + "considerations": { + "environmentalConsiderations": { + "energyConsumptions": [ + { + "activity": "training", + "energyProviders": [ + { + "description": "Meta data-center, US-East", + "organization": { + "name": "Meta", + "address": { + "country": "United States", + "region": "New Jersey", + "locality": "Newark" + } + }, + "energySource": "natural-gas", + "energyProvided": { + "value": 0.4, + "unit": "kWh" + } + } + ], + "activityEnergyCost": { + "value": 0.4, + "unit": "kWh" + }, + "co2CostEquivalent": { + "value": 31.22, + "unit": "tCO2eq" + }, + "co2CostOffset": { + "value": 31.22, + "unit": "tCO2eq" + } + } + ] + } + } + } + } + ] +} diff --git a/tools/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.textproto b/tools/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.textproto new file mode 100644 index 00000000..c045c9e6 --- /dev/null +++ b/tools/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.textproto @@ -0,0 +1,57 @@ +# proto-file: schema/bom-1.6.proto +# proto-message: Bom + +spec_version: "1.6" +version: 1 +serial_number: "urn:uuid:ed5c5ba0-2be6-4b58-ac29-01a7fd375123" +components { + type: CLASSIFICATION_MACHINE_LEARNING_MODEL + bom_ref: "huggingface.co-meta-llama-Llama-2-7b" + group: "meta-llama" + name: "Llama-2-7b" + publisher: "meta" + supplier { + name: "Hugging Face" + } + external_references { + type: EXTERNAL_REFERENCE_TYPE_DISTRIBUTION + url: "https://huggingface.co/meta-llama/Llama-2-7b" + } + modelCard { + considerations { + environmentalConsiderations { + energyConsumptions { + activity: ACTIVITY_TYPE_TRAINING + activityEnergyCost { + value: 0.4 + unit: ENERGY_MEASURE_UNIT_TYPE_KILOWATT_HOURS + } + energyProviders { + description: "Meta data-center, US-East" + organization { + name: "Meta" + address { + country: "United States" + region: "New Jersey" + locality: "Newark" + } + } + energySource: ENERGY_SOURCE_TYPE_NATURAL_GAS + energyProvided { + value: 0.4 + unit: ENERGY_MEASURE_UNIT_TYPE_KILOWATT_HOURS + } + } + co2CostEquivalent { + value: 31.22 + unit: CO2_MEASURE_UNIT_TYPE_TONNES_CO2_EQUIVALENT + } + co2CostOffset { + value: 31.22 + unit: CO2_MEASURE_UNIT_TYPE_TONNES_CO2_EQUIVALENT + } + } + } + } + } +} diff --git a/tools/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.xml b/tools/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.xml new file mode 100644 index 00000000..2b4938c1 --- /dev/null +++ b/tools/src/test/resources/1.6/valid-machine-learning-considerations-env-1.6.xml @@ -0,0 +1,57 @@ + + + + + + Hugging Face + + meta + meta-llama + llama-2-7b + + + https://huggingface.co/meta-llama/Llama-2-7b + + + + + + + + training + + Meta data-center, US-East + + Meta +
+ United States + New Jersey + Newark +
+
+ natural-gas + + 0.4 + kWh + +
+ + 0.4 + kWh + + + 31.22 + tCO2eq + + + 31.22 + tCO2eq + +
+
+
+
+
+
+
+