aws / aws/sagemaker-python-sdk
Something like a .sagemakerignore file option to allow for skipping of certain directories when creating source tar
- Lenguaje dominante
- Python
- Estrellas
- 2.3k
- Forks
- 1.3k
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 35
Descripción
**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?
Guía de contribución
Línea de trabajo
Comienza en src/sagemaker/fw_utils.py alrededor de la línea 486, donde se crea el tar de origen, e inspecciona cómo se selecciona el contenido del directorio. Confirma el comportamiento esperado de .sagemakerignore según el issue y verifica que los directorios listados se omitan del tar resultante, mientras que los demás archivos de origen sigan incluidos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- build-system, machine-learning
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 62/100