Skip to content
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

Docs suggest role is optional in local mode #704

Closed
stevehawley opened this issue Mar 18, 2019 · 3 comments
Closed

Docs suggest role is optional in local mode #704

stevehawley opened this issue Mar 18, 2019 · 3 comments

Comments

@stevehawley
Copy link

stevehawley commented Mar 18, 2019

Please fill out the form below.

System Information

  • Framework (e.g. TensorFlow) / Algorithm (e.g. KMeans):
    TensorFlow

  • Framework Version:
    1.12

  • Python Version:
    3.7

  • CPU or GPU:
    NA

  • Python SDK Version:

  • Are you using a custom image:
    No

Describe the problem

Documentation at https://sagemaker.readthedocs.io/en/stable/overview.html#local-mode shows creating estimator without passing role, when doing this locally I get an error that role is a required positional parameter.

specifically this code:

from sagemaker.mxnet import MXNet

mxnet_estimator = MXNet('train.py',
                        train_instance_type='local',
                        train_instance_count=1,
                        framework_version='1.2.1')

mxnet_estimator.fit('file:///tmp/my_training_data')

And why would an IAM role be required for local mode anyway?

Minimal repro / logs

from sagemaker.tensorflow import TensorFlow

mnist_estimator = TensorFlow(entry_point='mnist.py',
                             training_steps=10, 
                             evaluation_steps=10,
                             train_instance_count=1,
                             train_instance_type='local')

logs:

Traceback (most recent call last):
  File "sm_driver.py", line 8, in <module>
    train_instance_type='local')
  File "/home/sdhawley/work/cohereum/mnist/.venv/lib/python3.7/site-packages/sagemaker/tensorflow/estimator.py", line 235, in __init__
    super(TensorFlow, self).__init__(image_name=image_name, **kwargs)
  File "/home/sdhawley/work/cohereum/mnist/.venv/lib/python3.7/site-packages/sagemaker/estimator.py", line 805, in __init__
    super(Framework, self).__init__(**kwargs)
TypeError: __init__() missing 1 required positional argument: 'role'
  • Exact command to reproduce:
@mvsusp
Copy link
Contributor

mvsusp commented Mar 19, 2019

Hi @stevehawley

Thanks for your observation. Although role is not necessary in local mode, it allows a smoother transition to other SageMaker services, which is why we keep the parameter.

I updated the documentation as suggested.

Thanks for using SageMaker

@zhijinl
Copy link

zhijinl commented May 21, 2019

Sorry to bring this up again. @mvsusp Thanks for giving an answer to it, but I still don't get it: "Although role is not necessary in local mode ...", so we do agree that "role" needs to be an optional parameter, not a required one right?

Making it "required" means that you need to have an AWS account, which many people don't, and won't prefer to be forced to have one.

@janhurst
Copy link

Making it "required" means that you need to have an AWS account, which many people don't, and won't prefer to be forced to have one.

This is a pain point for me too... it seems local mode isn't really local.

I have to specify a role and that role is being validated before I can run the training job locally. I was expecting this could be done completely separately from AWS without needing any credentials.

Unfortunately, for my use case, I can't have an AWS account and a role being defined as a dependency.

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

No branches or pull requests

4 participants