Repository navigation
fix(core): restore the Session hub methods used by the JumpStart Hub class - #6429
Open
AkshayShah03 wants to merge 1 commit into
Open
AkshayShah03 wants to merge 1 commit into
AkshayShah03 wants to merge 1 commit into
Conversation
…class sagemaker.core.jumpstart.hub.hub.Hub calls create_hub, describe_hub, delete_hub, create_hub_content_reference and delete_hub_content_reference on its Session, but only list_hub_contents/describe_hub_content were ported to the v3 Session. Hub.create(), describe(), delete(), create_model_reference() and delete_model_reference() therefore all failed with AttributeError: 'Session' object has no attribute ... Port those five thin wrappers from the v2 Session. Also resolve Hub.region after falling back to the default JumpStart session, so Hub(name, sagemaker_session=None) no longer fails on None.boto_region_name.
AkshayShah03
requested a deployment
to
manual-approval
October 10, 2026 15:29 — with
GitHub Actions
Waiting
AkshayShah03
requested a deployment
to
manual-approval
October 10, 2026 15:29 — with
GitHub Actions
Waiting
AkshayShah03
requested a deployment
to
manual-approval
October 10, 2026 15:29 — with
GitHub Actions
Waiting
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: N/A
Description of changes:
sagemaker.core.jumpstart.hub.hub.Hubcalls these methods on itsSession:create_hubdescribe_hubdelete_hubcreate_hub_content_referencedelete_hub_content_referenceOnly
list_hub_contentsanddescribe_hub_contentwere ported to the v3Session. SoHub.create(),describe(),delete(),create_model_reference()anddelete_model_reference()all fail:This change:
Session, with the same request building. For example,HubDisplayNamedefaults to the hub name;Hub.regionafter the fallback to the default JumpStart session. Previously it readsagemaker_session.boto_region_namefirst, soHub(name, sagemaker_session=None)failed with'NoneType' object has no attribute 'boto_region_name'.Testing:
test_hub.pytests drive eachHubmethod through a realSessionwith a mockedsagemaker_clientand check the API request.Hub(..., sagemaker_session=None).tests/unit/jumpstart: 349 passed.sagemaker-core/tests/unit: no new failures. The one failure,test_generate_compose_file_sets_timeout_env, also fails on master when run on its own.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.