Skip to content

fix(train): refresh the entity's own version in DataSet and Evaluator - #6426

Open
AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/ai-registry-refresh-version
Open

AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/ai-registry-refresh-version

Conversation

@AkshayShah03

Copy link
Copy Markdown

Issue #, if available: N/A

Description of changes:

The base AIRHubEntity.refresh() describes the entity's own version. The DataSet.refresh() and Evaluator.refresh() overrides call describe_hub_content without a version, so DescribeHubContent returns the latest version, and they overwrite the object with it, including version, arn, source / reference and status.

As a result, refresh() on an older version (for example one returned by get_versions()) silently turns it into the latest version. wait(), which polls refresh(), waits on the latest version's status instead of its own.

This change passes hub_content_version=self.version in both overrides.

Testing:

  • New TestDataSetRefreshVersion and TestEvaluatorRefreshVersion. Both fail before this change.
  • sagemaker-train/tests/unit/ai_registry: 98 passed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

DataSet.refresh() and Evaluator.refresh() called describe_hub_content without
a version, unlike the base AIRHubEntity.refresh(), so DescribeHubContent
returned the latest version and overwrote the object with it. Calling
refresh() or wait() on an older version (e.g. one from get_versions())
silently turned it into the latest version, and wait() polled the latest
version's status instead of its own.

Pass self.version to describe_hub_content in both overrides.

This branch is waiting to be deployed

1 waiting deployment
manual-approval — a07a2e72 Waiting Oct 10, 2026 by AkshayShah03 via wait-for-approval #608
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant