はじめに
この記事は2022年2月にまとめていた「細かいつまずいたことをメモしておく(2月編)をそれぞれ投稿した内容になります
解決方法が最新でない可能性もありますのでご了承ください
問題
SageMakerでCSVファイルをPandasで出力する以下のコードで権限エラーが発生した
try:
os.makedirs('/opt/ml/processing/output/data')
except:
pass
df_processing.to_csv('/opt/ml/processing/output/data/df_processing.csv')
解決方法
原因はコンテナのユーザーがrootになっていることだった
ユーザーを変更することで解決した