Skip to content

kwargs not passed through to model constructor #3050

Open
@CreateRandom

Description

@CreateRandom

Hi,

The method documentation of the create_model method in the RLEstimator states:

**kwargs: Additional kwargs passed to the :class:`~sagemaker.model.FrameworkModel`

However, the actual implementation doesn't pass the kwargs through, instead only reading pre-defined keys from them while building a new dict of args passed through the model constructor.

base_args["name"] = self._get_or_create_name(kwargs.get("name"))
if not entry_point and (source_dir or dependencies):
raise AttributeError("Please provide an `entry_point`.")
entry_point = entry_point or self._model_entry_point()
source_dir = source_dir or self._model_source_dir()
dependencies = dependencies or self.dependencies
extended_args = dict(
entry_point=entry_point,
source_dir=source_dir,
code_location=self.code_location,
dependencies=dependencies,
)
extended_args.update(base_args)
if self.image_uri:
return FrameworkModel(**extended_args)

I think the expected behaviour here should be to pass through all values in the kwargs. Thanks for looking into this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions