Skip to content

Remote function functionality broken in latest v2 (2.256.0) #5484

@pdifranc

Description

@pdifranc

PySDK Version

  • PySDK V2 (2.x)
  • PySDK V3 (3.x)

Describe the bug
The remote function functionality is broken in version 2.256.0

To reproduce
Run any function as a remote function via the RemoteExecutor or the @remote decorator and it will fail

Expected behavior
The remote function execution is successful

Screenshots or logs

File "/opt/conda/lib/python3.12/site-packages/sagemaker/remote_function/core/serialization.py", line 404, in _compute_hash
    return hmac.new(secret_key.encode(), msg=buffer, digestmod=hashlib.sha256).hexdigest()
                    ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'encode'

System information
A description of your system. Please provide:

  • SageMaker Python SDK version: 2.256.0
  • Framework name (eg. PyTorch) or algorithm (eg. KMeans):
  • Framework version:
  • Python version: 3.12
  • CPU or GPU: CPU
  • Custom Docker image (Y/N):

Additional context
Add any other context about the problem here.

This issue was introduced by the latest release of SageMaker SDK 2.256.0 because of the removal of REMOTE_FUNCTION_SECRET_KEY which does not get passed any longer. In 2.255.0 everything works as intended

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions