Skip to content

doc: correct two parameter docstrings that disagree with their signatures - #6586

Open
VenishPaneliya wants to merge 1 commit into
aws:masterfrom
VenishPaneliya:doc-signature-mismatch
Open

VenishPaneliya wants to merge 1 commit into
aws:masterfrom
VenishPaneliya:doc-signature-mismatch

Conversation

@VenishPaneliya

Copy link
Copy Markdown

Two rendered docstrings disagree with the signature they describe.

NotebookJobStep.__init__ documents a sagemaker_session argument. It is not in the signature — self.sagemaker_session is assigned from the step compilation context in to_request() — so passing the keyword raises TypeError. Removed the entry.

ModelBuilder.optimize documents model_name as (Default: None) with "a unique name will be generated". The signature default is "optimize_model", and the model_name or f"model-{uuid}" fallback only fires when model_name is falsy, so neither half holds for a default call. Corrected the stated default and kept the generated-name behaviour documented for an explicit None.

Docstrings only; no behaviour change. Both classes are exported from their packages and rendered by the automodule ... :members: blocks in docs/api/.

I also looked at ModelBuilder.register, where approval_status is documented as defaulting to "PendingManualApproval" against a None signature default. That one is correct as written — get_model_package_args drops the None and create_model_package_from_containers applies that value — so I left it alone.

…ures

NotebookJobStep documents a sagemaker_session constructor argument it does
not accept; the attribute is assigned from the step compilation context in
to_request(), so passing the keyword raises TypeError.

ModelBuilder.optimize documents model_name as defaulting to None with a
unique name generated, but the signature defaults to "optimize_model", and
the unique-name fallback only runs when model_name is falsy.

This branch is waiting to be deployed

1 waiting deployment
manual-approval — 06d3d90a Waiting Nov 14, 2026 by VenishPaneliya via wait-for-approval #2238
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