Skip to content

AttributeError in sagemaker.local.image #554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tyrion opened this issue Dec 13, 2018 · 5 comments
Closed

AttributeError in sagemaker.local.image #554

tyrion opened this issue Dec 13, 2018 · 5 comments
Labels
status: pending release The fix have been merged but not yet released to PyPI type: bug

Comments

@tyrion
Copy link

tyrion commented Dec 13, 2018

On line 316 of sagemaker.local.image there is a reference to sagemaker.rl.estimator but the module is not imported. Therefore we get an error:

AttributeError: module 'sagemaker' has no attribute 'rl'

The fix is also not trivial, because if you try adding the needed import at the top of the file you incur in an import loop.

To trigger this code I created an estimator, passing to it an output_path starting with "file://" and then called its fit method.

@ChoiByungWook
Copy link
Contributor

Hello @tyrion,

Can you please provide a minimal repro for us to try?

The image or dataset doesn't have to be provided.

Thanks!

@tyrion
Copy link
Author

tyrion commented Dec 14, 2018

Hello @ChoiByungWook,
here you go:

from sagemaker import get_execution_role
from sagemaker.estimator import Estimator
from sagemaker.local import LocalSession

role = get_execution_role()

session = LocalSession()
session.config = {'local': {'local_code': True,}}

est = Estimator(
    image_name='nope',
    output_path="file:///anything",
    train_instance_type='local',
    train_instance_count=1,
    role=role,
    sagemaker_session=session,
)

est.fit()

@ChoiByungWook
Copy link
Contributor

@tyrion,

Thank you so much.

I will begin by reproducing this issue.

For now, I will reference the pull request that added in the code path that caused this error: #524

@ChoiByungWook
Copy link
Contributor

@tyrion,

Thank you so much for bringing this to our attention. We made our fix here: #560

Please let us know if this solves your issue.

@ChoiByungWook ChoiByungWook added the status: pending release The fix have been merged but not yet released to PyPI label Dec 14, 2018
@tyrion
Copy link
Author

tyrion commented Dec 17, 2018

The issue seems fixed to me

Thank you @ChoiByungWook

@tyrion tyrion closed this as completed Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending release The fix have been merged but not yet released to PyPI type: bug
Projects
None yet
Development

No branches or pull requests

2 participants