训练Tensorflow作业时是否可以使用g4dn实例类型?

时间:2020-05-21 13:22:36

标签: python tensorflow amazon-sagemaker

在训练张量流作业时是否可以使用g4dn实例类型?

我正在尝试使用加速实例类型在SageMaker中训练模型。在完成工作后,我收到以下错误:

import plotly.express as px
import pandas as pd

rows=[['501-600','15','122.58333','45.36667'],
      ['till 500','4','12.5','27.5'],
      ['more 1001','41','-115.53333','38.08'],
      ]

colmns=['bins','data','longitude','latitude']
df=pd.DataFrame(data=rows, columns=colmns)
df = df.astype({"data": int})

# def SetColor(x):
#         if(x == '501-600'):
#             return "steelblue"
#         elif(x == 'till 500'):
#             return "mintcream"
#         elif(x == 'more 1001'):
#             return "palegoldenrod"

fig=px.scatter_geo(df,lon='longitude', lat='latitude',color='bins',
                      opacity=0.5,size='data',
                      projection="natural earth", color_discrete_sequence=['steelblue', 'mintcream', 'palegoldenrod'])

fig.update_traces(marker=dict(symbol='octagon',
                                line=dict(width=0)))

fig.show()

使用非加速实例类型时,训练作业可以工作,但需要花费一定时间才能完成。我不明白为什么我不能利用这种实例类型。我认为可能是因为实例类型在我所在的地区不可用,但是基于pricing page,它看起来可以用于培训工作(我在加拿大中部)。

这是代码段

botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the CreateTrainingJob operation: Instance type ml.g4dn.xlarge is not supported by algorithm tensorflow-training.

0 个答案:

没有答案
相关问题