hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.87k stars 9.21k forks source link

[New Resource]: aws_sagemaker_model_card #34517

Open bee7ch7 opened 1 year ago

bee7ch7 commented 1 year ago

Description

A new resources in AWS Sagemaker under Governance section called Model Cards

Requested Resource(s) and/or Data Source(s)

aws_sagemaker_model_card

Potential Terraform Configuration

resource "aws_sagemaker_model_card" "this" {
  name = "Model Card Name"
  model_card_status = "Draft"

  encryption = {
    kms = "arn_of_kms_key"
  }

  model_details = {
    model_name = "model_name"
    model_artifacts = [
      "uri_1",
      "uri_2"
    ]

    inference_environment = [
      "container_1",
      "container_2"
    ]

    model_id = "id"
    model_description = "description"
    model_version = 1

    problem_type = "Binary classification"
    algorithm_type = "Recurrent neural network"

    model_creator = "John Doe"
    model_owner = "John Doe, Marry Smith"
  }

  business_details = {
    business_problem = "Description"
    business_stakeholders = "Stakeholder_1, Stakeholder_2"
    line_of_business = "Description"
  }

  intended_uses = {
    description = "General purpose"
    factors_affecting_model_efficacy = "Description"
    risk_rating = "Low"
    risk_rating_description = "Description"
  }

  training_details = {

    objective_function = {
      optimization_direction = "Minimize"
      metric = "Loss"
      description = "Description"
      notes = "Description"
    }

    training_observations = "Description"
    training_job_details = {
      name = "Job name"
      training_dataset = [
        "uri_1",
        "uri_2"
      ]

      training_environment = [
        "container_1",
        "container_2"
      ]
    }

    training_results = {
      metrics {
        {
          metric = "some_metric"
          value = "some_value"
          description = "description"
        },
        {
          metric = "some_metric"
          value = "some_value"
          description = "description"
        }
      }

      hyperparameters {
        {
          parameter = "p1"
          value = "some_value"
        },
        {
          parameter = "p2"
          value = "some_value"
        }
      }
    }

  }

  evaluation_result = {
    data_source = {
      type = "s3"
      uri = "s3_uri_to_json_file"
    }

    report_type = "clarify_bias"
    job_name = "some_name"
  }

  ethical_considerations = "Description"
  caveats_and_recommendations = "Description"
  custom_fields = {
    field_1 = "value"
    field_2 = "value"
    field_3 = "value"
  }

}

References

AWS documentation

General description what it is a how to use Model Cards link Documentation for aws cli Documentation for CloudFormation

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue