謝謝你在社區磚貼出你的問題。
下麵的步驟節省Keras模型從一個Python筆記本在AWS S3 bucket磚:
#設置憑證和S3創建客戶端導入boto3導入操作係統aws_access_key_id = dbutils.secrets。get(範圍= " < scope-name >”,關鍵=“<鍵名>”)aws_secret_access_key = dbutils.secrets。get(範圍= " < scope-name >”,關鍵=“<鍵名>”)操作係統。環境[' AWS_ACCESS_KEY_ID '] = AWS_ACCESS_KEY_ID操作係統。環境[' AWS_SECRET_ACCESS_KEY '] = AWS_SECRET_ACCESS_KEY s3_client = boto3.client (s3) #上傳保存的模型從本地文件係統s3 bucket s3_bucket =“< bucket名>”s3_prefix = model_path =“< bucket-prefix > / dbfs /模型/模型。h5 " s3_key = " {} / model.h5”.format s3_client (s3_prefix)。upload_file (model_path s3_bucket s3_key)
謝謝你在社區磚貼出你的問題。
下麵的步驟節省Keras模型從一個Python筆記本在AWS S3 bucket磚:
#設置憑證和S3創建客戶端導入boto3導入操作係統aws_access_key_id = dbutils.secrets。get(範圍= " < scope-name >”,關鍵=“<鍵名>”)aws_secret_access_key = dbutils.secrets。get(範圍= " < scope-name >”,關鍵=“<鍵名>”)操作係統。環境[' AWS_ACCESS_KEY_ID '] = AWS_ACCESS_KEY_ID操作係統。環境[' AWS_SECRET_ACCESS_KEY '] = AWS_SECRET_ACCESS_KEY s3_client = boto3.client (s3) #上傳保存的模型從本地文件係統s3 bucket s3_bucket =“< bucket名>”s3_prefix = model_path =“< bucket-prefix > / dbfs /模型/模型。h5 " s3_key = " {} / model.h5”.format s3_client (s3_prefix)。upload_file (model_path s3_bucket s3_key)