def save_to_s3()

in Example-Project/src/tune_gpt.py [0:0]


def save_to_s3(txt, bucket, path, out_file):
    
    # say hello to cloudwatch
    print (txt)

    with open(outfile, 'w') as f:
        f.write(txt)        

    # could also save the trained model to s3 here
#     os.environ.get('SM_MODEL_DIR')
        
    os.system('aws s3 cp {} s3://{}/{}/output/'.format(outfile, bucket, path))