suinleelab / treeexplainer-study

Code and documentation for experiments in the TreeExplainer paper
178 stars 44 forks source link

error: invalid path 'notebooks/timeseries/Explain LSTM->XGB.ipynb' #3

Open RossBoylan opened 5 months ago

RossBoylan commented 5 months ago

Problem

Attempting to clone the repository on MS-Windows results in the error message of the subject. Running git for Windows 2.44.0 on an NTFS file system. See at the bottom for a fuller transcript.

Desired Change

Can you change the name/path so that cloning to MS-Windows/NTFS just works? Caveats:

  1. I'm not sure exactly what the problem was, but I'd guess it's the > character.
  2. There may be additional files with similar issues.

Work-Around

This appears to be a common difficulty when using git on Windows. Most advice centers on using git config core.protectNTFS false. Following this advice I did

(pyshap) PS C:\Users\rdboylan\Documents\Joan\treeexplainer-study> git reset
error: invalid path 'notebooks/timeseries/Explain LSTM->XGB.ipynb'
fatal: make_cache_entry failed for path 'notebooks/timeseries/Explain LSTM->XGB.ipynb'
(pyshap) PS C:\Users\rdboylan\Documents\Joan\treeexplainer-study> git config core.protectNTFS false
(pyshap) PS C:\Users\rdboylan\Documents\Joan\treeexplainer-study> git reset
Unstaged changes after reset:
D       README.md
D       benchmark/corrgroups60/index.html
# and many more
(pyshap) PS C:\Users\rdboylan\Documents\Joan\treeexplainer-study> git checkout
# another long list of  deletions
Your branch is up to date with 'origin/master'.
(pyshap) PS C:\Users\rdboylan\Documents\Joan\treeexplainer-study> git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    README.md
        deleted:    benchmark/corrgroups60/index.html
# and 100's of blank lines

no changes added to commit (use "git add" and/or "git commit -a")
# at this point I had followed the recommended steps, but my working copy had nothing in it
(pyshap) PS C:\Users\rdboylan\Documents\Joan\treeexplainer-study> git restore .
error: unable to create file notebooks/timeseries/Explain LSTM->XGB.ipynb: Invalid argument
error: unable to create file notebooks/timeseries/Run LSTM->XGB.ipynb: Invalid argument
# and finally the files appeared.

The documentation on the core.protectNTFS option only mentions collisions with the 8.3 name, though all the problem reports I saw involved illegal characters. And the author of the advice I used said they had some stray files. The 2 files reported as invalid do not appear in my working copy.

Original Error Transcript

(pyshap) PS C:\Users\rdboylan\Documents\Joan> git clone https://github.com/suinleelab/treeexplainer-study.git
Cloning into 'treeexplainer-study'...
remote: Enumerating objects: 394, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 394 (delta 15), reused 24 (delta 12), pack-reused 366
Receiving objects: 100% (394/394), 39.96 MiB | 4.33 MiB/s, done.
Resolving deltas: 100% (232/232), done.
error: invalid path 'notebooks/timeseries/Explain LSTM->XGB.ipynb'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

git status shows a huge number of deleted files; I presume everything that would have come after the problem file.