Sagemaker-python-sdk: Support Python 3 for TensorFlow scripts

Created on 13 Dec 2017  路  27Comments  路  Source: aws/sagemaker-python-sdk

Is there any reason not to do this? Python 2 is an officially outdated language and will retire in 2 years.

in progress

Most helpful comment

Hello, my organization is considering using Sagemaker. It fits our usecase very well - but support for Python 3 is needed. Is there any timeline for supporting it? Thanks!

All 27 comments

Hi @meownoid

Thanks for your interest in Sagemaker! Support for python3 is definitively important! it just didn't make the cut for launch. This is on our backlog, and we'll give you an update when we have an ETA.

@iquintero Is there somewhere public-facing for Sagemaker users to track progress? 馃憤 to this issue.

+1 Python2.7 is old and the inconsistency is annoying,

Traceback (most recent call last):
  File "/opt/amazon/bin/entry.py", line 32, in <module>
    modes[mode]()
  File "/opt/amazon/lib/python2.7/site-packages/container_support/training.py", line 21, in start
    raise e
  File "/opt/ml/code/lstm-trainer.py", line 55
    logging.info(f'[Epoch {epoch}] Training: {name}={acc}')
                                                         ^
SyntaxError: invalid syntax

+1: Given the lack of backwards compatibility, I wouldn't want to start using a tool that locks me into Python 2.x for new projects

Hi @iquintero
Can we get an estimate for python3 compatibility?

Hi @adogyf

We don't have an estimate for this right now, but it's on our roadmap, and we're continuously updating our priorities based on community feedback. Thanks!

@andremoeller Is there an open Dockerfile for the default container? If so, I'd happily submit a PR.

Hi @aidan-plenert-macdonald ,

We're actively working on open-sourcing our Dockerfiles, but we don't have one open-sourced yet. Thanks!

@andremoeller I found https://github.com/aws/sagemaker-mxnet-containers. Is this it?

Yes, @aidan-plenert-macdonald, we open sourced both https://github.com/aws/sagemaker-mxnet-containers and https://github.com/aws/sagemaker-tensorflow-containers .

We hope it is helpful.

Hi @iquintero Any further update since early March for python3 compatibility? Thanks.

Hello, my organization is considering using Sagemaker. It fits our usecase very well - but support for Python 3 is needed. Is there any timeline for supporting it? Thanks!

+1 for Python3 support

+1

+1 for Python 3 support

+1

+1 for Python 3 support

+1

+1

+1

+1

+1
Someone with AWS has at least started working on this here @ranman

+1

+1

Hi all, thanks for letting us know how important this feature is to you! We've released Python 3 support for TF in #475 - though it does require a new training script format. Documentation is on its way, but I wanted to post an update here letting you know that you can now use our Python 3 TF images

I am still getting an ERROR ClientError: Cannot pull algorithm container
when I was trying to run the following code

...
estimator = TensorFlow(
    entry_point='endpoint.py',
    source_dir=source_dir,
    role=role,
    output_path=model_artifacts_location,
    code_location=custom_code_upload_location,
    train_instance_count=1,
    train_volume_size=30,  # GB
    framework_version='1.8.0',
    train_instance_type=train_instance_type,
    py_version='py3',
    hyperparameters=HYPERPARAMETERS)

estimator.fit(data_location, run_tensorboard_locally=False)

Closing this issue now that we have official support for python 3.

馃帀 馃巿

Was this page helpful?
0 / 5 - 0 ratings