Skip to content

bug fix for "_bmark_cache.npz file stores at program path"#19

Open
diphosphane wants to merge 1 commit into
stefanch:masterfrom
diphosphane:master
Open

bug fix for "_bmark_cache.npz file stores at program path"#19
diphosphane wants to merge 1 commit into
stefanch:masterfrom
diphosphane:master

Conversation

@diphosphane

Copy link
Copy Markdown

_bmark_cache.npz file stores at program path will result several problem:

  1. if user install sgdml with system python (/usr/bin/python3), then the path /usr/lib/python3.*/site-packages/sgdml is not writable, which will results problem.
  2. if users install sgdml in a cluster/workstation, and execute multiple tasks simultaneously, then _bmark_cache.npz will be overwrite multiple times. It will result verify fail or output error when one task read the wrong _bmark_cache.npz which is written by other task. This problem will also happened in cluster, when sgdml is installed in cluster software path, and calculation node uses this software path.

In my fix, I modify the _bmark_cache.npz path into current task execution path, it would solve this bug.

I only test it in my task, I'm not sure whether this modification will introduce other bug or not.

Because this modification related with file path, I also checked the python code os.chdir (which may conflict with my modification) , and not found the usage, so I think it may not introduce bug.

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.

1 participant