Skip to content

Support InferenceComponent CRD. #260

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

Merged
merged 11 commits into from
Mar 11, 2024
6 changes: 3 additions & 3 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2024-03-06T21:33:47Z"
build_date: "2024-03-11T20:40:41Z"
build_hash: a5ba3c851434263128a1464a2c41e528779eeefa
go_version: go1.22.0
version: v0.32.1
api_directory_checksum: 731faf4c5d6d6f5140b4e0786127df447f773217
api_directory_checksum: 476c2a15949ae95e3cefcc07b7eb39de6cd7548b
api_version: v1alpha1
aws_sdk_go_version: v1.50.15
generator_config_info:
file_checksum: 0d728ab3662c7e538aff6727f087b54c5969fdcf
file_checksum: 708e5a5444203d25538466e7e1914c3869d5a93e
original_file_name: generator.yaml
last_modification:
reason: API generation
12 changes: 6 additions & 6 deletions apis/v1alpha1/enums.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 69 additions & 1 deletion apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,80 @@ resources:
- InvalidParameterValue
- MissingParameter
fields:
EnableNetworkIsolation:
late_initialize:
min_backoff_seconds: 5
Tags:
compare:
is_ignored: true
hooks:
delta_pre_compare:
code: customSetDefaults(a, b)
InferenceComponent:
reconcile:
requeue_on_success_seconds: 30
update_conditions_custom_method_name: CustomUpdateConditions
exceptions:
errors:
404:
code: ValidationException
message_prefix: Could not find inference component
terminal_codes:
- InvalidParameterCombination
- InvalidParameterValue
- MissingParameter
# Custom error
- InferenceComponentUpdateError
hooks:
sdk_read_one_post_set_output:
template_path: inference_component/sdk_read_one_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: inference_component/sdk_update_pre_build_request.go.tpl
sdk_update_post_set_output:
template_path: inference_component/sdk_update_post_set_output.go.tpl
sdk_delete_pre_build_request:
template_path: common/sdk_delete_pre_build_request.go.tpl
sdk_delete_post_request:
template_path: common/sdk_delete_post_request.go.tpl
fields:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that theres a CurrentCopyCount(https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker/client/describe_inference_component.html), does that need to be included here as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, since that is not a read only field and can be updated by the customer.

InferenceComponentStatus:
is_read_only: true
print:
name: STATUS
from:
operation: DescribeInferenceComponent
path: InferenceComponentStatus
FailureReason:
is_read_only: true
print:
name: FAILURE-REASON
priority: 1
from:
operation: DescribeInferenceComponent
path: FailureReason
CreationTime:
is_read_only: true
from:
operation: DescribeInferenceComponent
path: CreationTime
LastModifiedTime:
is_read_only: true
from:
operation: DescribeInferenceComponent
path: LastModifiedTime
EndpointName:
is_read_only: true
from:
operation: DescribeInferenceComponent
path: EndpointName
VariantName:
is_read_only: true
from:
operation: DescribeInferenceComponent
path: VariantName
Tags:
compare:
is_ignored: true
Endpoint:
reconcile:
requeue_on_success_seconds: 30
Expand Down Expand Up @@ -1007,7 +1075,7 @@ ignore:
- Hub
- HumanTaskUi
# - HyperParameterTuningJob
- InferenceComponent
# - InferenceComponent
- InferenceRecommendationsJob
- Image
- ImageVersion
Expand Down
103 changes: 103 additions & 0 deletions apis/v1alpha1/inference_component.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 49 additions & 7 deletions apis/v1alpha1/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading