Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Create Files Unit Test #1668

Merged
merged 3 commits into from
Jul 13, 2023
Merged

Fix Create Files Unit Test #1668

merged 3 commits into from
Jul 13, 2023

Conversation

Satrat
Copy link
Contributor

@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
10 checks passed
@Satrat Satrat deleted the fix-created-files-test branch July 13, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants