Skip to content
New issue

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

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

Already on GitHub? # to your account

Missing site/src/figs directory and 2023-02-07-ppd-mp.pkl.gz file #14

Closed
janosh opened this issue Apr 28, 2023 · 1 comment · Fixed by #15
Closed

Missing site/src/figs directory and 2023-02-07-ppd-mp.pkl.gz file #14

janosh opened this issue Apr 28, 2023 · 1 comment · Fixed by #15
Labels
bug Something isn't working pkg PyPI package related

Comments

@janosh
Copy link
Owner

janosh commented Apr 28, 2023

          This particular problem seems to be solved. However, there are further issues:
n_too_stable = 502
n_too_unstable = 22
Traceback (most recent call last):
  File "/home/pbenner/Source/tmp/matbench-discovery/data/wbm/fetch_process_wbm_dataset.py", line 473, in <module>
    save_fig(fig, f"{img_path}.svelte")
  File "/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/site-packages/pymatviz/utils.py", line 308, in save_fig
    fig.write_html(path, **defaults)
  File "/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/site-packages/plotly/basedatatypes.py", line 3708, in write_html
    return pio.write_html(self, *args, **kwargs)
  File "/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/site-packages/plotly/io/_html.py", line 536, in write_html
    path.write_text(html_str)
  File "/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/pathlib.py", line 1154, in write_text
    with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f:
  File "/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/site-packages/site/src/figs/hist-wbm-e-form-per-atom.svelte'

After manually creating the [...]/src/figs directory, the next issue is the following:

Traceback (most recent call last):
  File "/home/pbenner/Source/tmp/matbench-discovery/data/wbm/fetch_process_wbm_dataset.py", line 538, in <module>
    with gzip.open(DATA_FILES.mp_patched_phase_diagram, "rb") as zip_file:
  File "/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/gzip.py", line 58, in open
    binary_file = GzipFile(filename, gz_mode, compresslevel)
  File "/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/gzip.py", line 174, in __init__
    fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/site-packages/data/mp/2023-02-07-ppd-mp.pkl.gz'

The [...]/data/mp directory exists, but the pkl file is missing.

Originally posted by @pbenner in #12 (comment)

janosh added a commit that referenced this issue Apr 29, 2023
* DATA_FILES prompt user to download if attempted file access is missing (closes #14 part 2)

* test_load_train_test_no_mock_wbm_summary check that df loaded from cache is the same as initial df using pd.testing.assert_frame_equal

* add test_load_train_test_no_mock_mp_refs

* pytest addopts -m 'not slow'

* del STATIC = f"{ROOT}/site/static/figs"

mv tmp/figures tmp/figs

* make sure site/src/figs exists to avoid FileNotFoundError when saving plots (closes #14)

* default answer download file y/n to y if in CI or other non-atty context
@janosh
Copy link
Owner Author

janosh commented Apr 29, 2023

@pbenner With #15 merged, could you again pip install the main branch and let me know how it goes? Thanks for all your error reporting. Very helpful!

@janosh janosh added bug Something isn't working pkg PyPI package related labels Apr 29, 2023
janosh added a commit that referenced this issue Jun 20, 2023
* DATA_FILES prompt user to download if attempted file access is missing (closes #14 part 2)

* test_load_train_test_no_mock_wbm_summary check that df loaded from cache is the same as initial df using pd.testing.assert_frame_equal

* add test_load_train_test_no_mock_mp_refs

* pytest addopts -m 'not slow'

* del STATIC = f"{ROOT}/site/static/figs"

mv tmp/figures tmp/figs

* make sure site/src/figs exists to avoid FileNotFoundError when saving plots (closes #14)

* default answer download file y/n to y if in CI or other non-atty context
janosh added a commit that referenced this issue Jun 20, 2023
* DATA_FILES prompt user to download if attempted file access is missing (closes #14 part 2)

* test_load_train_test_no_mock_wbm_summary check that df loaded from cache is the same as initial df using pd.testing.assert_frame_equal

* add test_load_train_test_no_mock_mp_refs

* pytest addopts -m 'not slow'

* del STATIC = f"{ROOT}/site/static/figs"

mv tmp/figures tmp/figs

* make sure site/src/figs exists to avoid FileNotFoundError when saving plots (closes #14)

* default answer download file y/n to y if in CI or other non-atty context
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working pkg PyPI package related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant