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 bug when copying images when input_dir = output_dir #2041

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

maturk
Copy link
Collaborator

@maturk maturk commented Jun 6, 2023

Two things in this bug fix:

  1. Remove the output_directory iff it is not the same as the input_directory containing images (we don't want to delete valuable user data accidentally).
  2. Bypass shutil.SameFileError when copying files with a simple try catch. Works fine when input_dir = output_dir.

For some reason my ns-dev-test reformatted some of the longer arguments. I have a recent version of nerfstudio so not sure why it did that.

@tancik
Copy link
Contributor

tancik commented Jun 6, 2023

Have you rerun pip install -e .[dev]?

@maturk
Copy link
Collaborator Author

maturk commented Jun 6, 2023

Have you rerun pip install -e .[dev]?

Yep. I think the problem was that I also had a format on save setting also applied to ruff in my vscode settings. I think this was messing with all the formatting and running ns-dev-test did not fix it for some reason. My local ruff was adding some more formatting it seems.

Copy link
Contributor

@tancik tancik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tancik tancik merged commit d4b0437 into nerfstudio-project:main Jun 7, 2023
4 checks passed
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

2 participants