Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Conversation

Satrat
Copy link

@Satrat Satrat commented Jul 12, 2023

This is a very similar fix to deepsparse PR 1117. check_for_created_files() is intended to insure large extraneous files(i.e from LLMs) aren't left in the root directory when running tests. This test case was failing due to __pycache__ files. These files are small so it should be fine that they are created. To fix the test I filtered out the __pycache__ directories files from the added files check.

Testing Instructions

Run make clean then make test

Previous Output

E       AssertionError: 18 files created in current working directory during pytest run. Created files: {'/home/sadkins/sparseml/src/sparseml/deepsparse/sparsification/__pycache__/info.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/tensorflow_v1/framework/__pycache__/__init__.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/tensorflow_v1/__pycache__/base.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/tensorflow_v1/sparsification/__pycache__/__init__.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/tensorflow_v1/__pycache__/__init__.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/keras/framework/__pycache__/info.cpython-38.pyc',
'/home/sadkins/sparseml/src/sparseml/keras/__pycache__/__init__.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/deepsparse/sparsification/__pycache__/__init__.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/deepsparse/framework/__pycache__/info.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/keras/sparsification/__pycache__/info.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/keras/__pycache__/base.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/tensorflow_v1/sparsification/__pycache__/info.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/keras/sparsification/__pycache__/__init__.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/tensorflow_v1/framework/__pycache__/info.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/deepsparse/framework/__pycache__/__init__.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/keras/framework/__pycache__/__init__.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/deepsparse/__pycache__/__init__.cpython-38.pyc', 
'/home/sadkins/sparseml/src/sparseml/deepsparse/__pycache__/base.cpython-38.pyc'

Updated Output

No assertion thrown

@Satrat Satrat merged commit 6d836ed into main Jul 13, 2023
@Satrat Satrat deleted the fix-created-files-test branch July 13, 2023 13:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants