aws / aws/sagemaker-python-sdk

Something like a .sagemakerignore file option to allow for skipping of certain directories when creating source tar

オープン
#4,187 コメント 4 件 リアクション 10 件 担当者 0 名 GitHub で見る
component: pysdk-team type: feature request
主要言語
Python
スター
2.3k
フォーク
1.3k
平均マージ
1日 22時間
マージ済み PR(30日)
35

説明

**Describe the feature you'd like**
Similar to how in Docker there is a .dockerignore file which works like a .gitignore file, It would be great if there was a .sagemakerignore file so that any directories listed in that file would be skipped when making the tar file. I believe it would be a simple change here: https://github.com/aws/sagemaker-python-sdk/blob/744724b01bcdc3f451c9b73c34c947e12d6a8e2a/src/sagemaker/fw_utils.py#L486
Basically adding a few lines that check for the existence of a .sagemakerignore file in the directory of the `directory` variable, if it exists, and then skipping anything listed out in that file.

**How would this feature be used? Please describe.**
This would be useful to reduce the size of the source tar file which would allow a person to speed up sagemaker build creation without the need to restructure their code, if they have big files in the source directory that they don't commit to other things like git and docker, so they don't want it put into the sagemaker tarball

**Describe alternatives you've considered**
An alternative is not doing it

**Additional context**
I don't mind writing the code to do this but wanted to check in that this was something that would be accepted if I make a PR for it?

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

src/sagemaker/fw_utils.py の486行目付近にある、ソース tar が作成される箇所から始め、ディレクトリの内容がどのように選択されるかを調べてください。issue に記載された .sagemakerignore の期待される動作を確認し、一覧にあるディレクトリが生成された tar から除外される一方で、その他のソースファイルは含まれたままになることを検証してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system, machine-learning
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
62/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。