From 2fbcecd0038ec0ad4641dfa782617d62ae07a5a0 Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Mon, 25 Jul 2022 16:17:18 +0200 Subject: [PATCH] update deps --- .../10_antizeno_engine/poetry.lock | 32 +++++- .../10_antizeno_engine/pyproject.toml | 1 + .../ho_analytic_zero_temperature.org | 104 +++++++++++++++++- 3 files changed, 131 insertions(+), 6 deletions(-) diff --git a/python/energy_flow_proper/10_antizeno_engine/poetry.lock b/python/energy_flow_proper/10_antizeno_engine/poetry.lock index c716658..b554182 100644 --- a/python/energy_flow_proper/10_antizeno_engine/poetry.lock +++ b/python/energy_flow_proper/10_antizeno_engine/poetry.lock @@ -1530,6 +1530,20 @@ tornado = ">=6.1.0" [package.extras] test = ["pre-commit", "pytest-timeout", "pytest (>=6.0)"] +[[package]] +name = "tikzplotlib" +version = "0.10.1" +description = "Convert matplotlib figures into TikZ/PGFPlots" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +matplotlib = ">=1.4.0" +numpy = "*" +Pillow = "*" +webcolors = "*" + [[package]] name = "tinycss2" version = "1.1.1" @@ -1670,6 +1684,14 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "webcolors" +version = "1.12" +description = "A library for working with color names and color values formats defined by HTML and CSS." +category = "main" +optional = false +python-versions = ">=3.7" + [[package]] name = "webencodings" version = "0.5.1" @@ -1692,7 +1714,7 @@ notebook = ">=4.4.1" [metadata] lock-version = "1.1" python-versions = ">=3.9,<3.11" -content-hash = "9607f8fb913cf9aad27f1a425d1e82d72f652c7d908bb6566c929b66586c394a" +content-hash = "7be6f6b3cb3b948e49d1daa7ba89def726afeb68ba1128f1b0ba6f4344f85fe3" [metadata.files] aiosignal = [ @@ -2895,6 +2917,10 @@ terminado = [ {file = "terminado-0.15.0-py3-none-any.whl", hash = "sha256:0d5f126fbfdb5887b25ae7d9d07b0d716b1cc0ccaacc71c1f3c14d228e065197"}, {file = "terminado-0.15.0.tar.gz", hash = "sha256:ab4eeedccfcc1e6134bfee86106af90852c69d602884ea3a1e8ca6d4486e9bfe"}, ] +tikzplotlib = [ + {file = "tikzplotlib-0.10.1-py3-none-any.whl", hash = "sha256:bf0451b86fe4db40aa742f7e5a180dfaaadf57c746ddb2ab7e58a5163d8be75f"}, + {file = "tikzplotlib-0.10.1.tar.gz", hash = "sha256:93d141342d143804fc1dfabe03e6d4e38e547cf72803bdf124615affdd56f59d"}, +] tinycss2 = [ {file = "tinycss2-1.1.1-py3-none-any.whl", hash = "sha256:fe794ceaadfe3cf3e686b22155d0da5780dd0e273471a51846d0a02bc204fec8"}, {file = "tinycss2-1.1.1.tar.gz", hash = "sha256:b2e44dd8883c360c35dd0d1b5aad0b610e5156c2cb3b33434634e539ead9d8bf"}, @@ -2948,6 +2974,10 @@ wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, ] +webcolors = [ + {file = "webcolors-1.12-py3-none-any.whl", hash = "sha256:d98743d81d498a2d3eaf165196e65481f0d2ea85281463d856b1e51b09f62dce"}, + {file = "webcolors-1.12.tar.gz", hash = "sha256:16d043d3a08fd6a1b1b7e3e9e62640d09790dce80d2bdd4792a175b35fe794a9"}, +] webencodings = [ {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, diff --git a/python/energy_flow_proper/10_antizeno_engine/pyproject.toml b/python/energy_flow_proper/10_antizeno_engine/pyproject.toml index c05e5b0..2250a6b 100644 --- a/python/energy_flow_proper/10_antizeno_engine/pyproject.toml +++ b/python/energy_flow_proper/10_antizeno_engine/pyproject.toml @@ -19,6 +19,7 @@ Cython = "^0.29.30" statsmodels = "^0.13.2" protobuf = "==3.20.1" tabulate = "^0.8.9" +tikzplotlib = "^0.10.1" [tool.poetry.dev-dependencies] black = "^21.12b0" diff --git a/python/energy_flow_proper/11_new_ho_comparison/ho_analytic_zero_temperature.org b/python/energy_flow_proper/11_new_ho_comparison/ho_analytic_zero_temperature.org index d6f0040..0e7fbe2 100644 --- a/python/energy_flow_proper/11_new_ho_comparison/ho_analytic_zero_temperature.org +++ b/python/energy_flow_proper/11_new_ho_comparison/ho_analytic_zero_temperature.org @@ -106,7 +106,7 @@ #+end_src #+RESULTS: -: RayContext(dashboard_url='', python_version='3.9.13', ray_version='1.13.0', ray_commit='e4ce38d001dbbe09cd21c497fedd03d692b2be3e', address_info={'node_ip_address': '141.30.17.225', 'raylet_ip_address': '141.30.17.225', 'redis_address': None, 'object_store_address': '/tmp/ray/session_2022-07-25_10-06-10_321700_2896957/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-07-25_10-06-10_321700_2896957/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-07-25_10-06-10_321700_2896957', 'metrics_export_port': 62937, 'gcs_address': '141.30.17.225:61225', 'address': '141.30.17.225:61225', 'node_id': '33637dfe594aa8dfbe572b47f0dfa94fad6f32191ef2d5f269609c0d'}) +: RayContext(dashboard_url='', python_version='3.9.13', ray_version='1.13.0', ray_commit='e4ce38d001dbbe09cd21c497fedd03d692b2be3e', address_info={'node_ip_address': '141.30.17.225', 'raylet_ip_address': '141.30.17.225', 'redis_address': None, 'object_store_address': '/tmp/ray/session_2022-07-25_15-58-15_167539_2941624/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-07-25_15-58-15_167539_2941624/sockets/raylet', 'webui_url': '', 'session_dir': '/tmp/ray/session_2022-07-25_15-58-15_167539_2941624', 'metrics_export_port': 48616, 'gcs_address': '141.30.17.225:64543', 'address': '141.30.17.225:64543', 'node_id': '59156e19ccf152f9b6c218e104c8ee997f882e9ac2ede555e0cebbc0'}) #+begin_src jupyter-python @@ -119,7 +119,7 @@ data_name="zero_t", ) print(supervisor.get_data(True).hdf5_name) - supervisor.integrate() + #supervisor.integrate() supervisors.append(supervisor) #+end_src @@ -128,8 +128,8 @@ : ho_data/zero_t/_e/zero_t_e5bb719aebf17ce48e7338370309f454_1.h5 : ho_data/zero_t/_7/zero_t_716813e927dc901d29acbdbbac7d5148_1.h5 : ho_data/zero_t/_5/zero_t_56871e76eaf4e301c1938ea4a855cfdf_1.h5 -: ho_data/zero_t/_7/zero_t_716813e927dc901d29acbdbbac7d5148_1.h5 : ho_data/zero_t/_1/zero_t_1bc1f6d01789a17e0081e545ecadbb29_1.h5 +: ho_data/zero_t/_0/zero_t_03786afe10c6c708b87cc332607b1b48_1.h5 * Flow #+begin_src jupyter-python :results none @@ -152,6 +152,100 @@ #+end_src #+RESULTS: +:RESULTS: +: Loading: 0% 2/417 [00:02<09:53, 1.43s/it] +# [goto error] +#+begin_example + --------------------------------------------------------------------------- + KeyboardInterrupt Traceback (most recent call last) + Input In [17], in () +  2 for supervisor in supervisors: +  3 hf_sys = hopsflow.SystemParams.from_hi_params(supervisor.params) +  4 flow_hops.append( + ----> 5 hopsflow.heat_flow_from_data( +  6  supervisor.get_data(True), +  7  hf_sys, +  8  every=1000, +  9  save=f"flow_zero", +  10  ) +  11 ) + + File ~/src/hopsflow/hopsflow/hopsflow.py:556, in heat_flow_from_data(data, thermal_params, *args, **kwargs) +  550 if thermal_params is not None: +  551 kwargs["thermal_params"] = ( +  552 d.valid_sample_iterator(d.rng_seed), +  553 thermal_params, +  554 ) + --> 556 return heat_flow_ensemble( +  557  d.valid_sample_iterator(d.stoc_traj), +  558  d.valid_sample_iterator(d.aux_states), +  559  *args, +  560  **(dict(N=data.samples) | kwargs), +  561 ) + + File ~/src/hopsflow/hopsflow/hopsflow.py:520, in heat_flow_ensemble(ψ_0s, ψ_1s, params, therm_args, only_therm, **kwargs) +  516 flow += flow_trajectory_therm(run, therm_run) +  518 return flow + --> 520 return util.ensemble_mean( +  521  iter(zip(ψ_0s, ψ_1s, therm_args[0])) +  522  if therm_args +  523  else iter(zip(ψ_0s, ψ_1s, itertools.repeat(0))), +  524  flow_worker, +  525  **kwargs, +  526 ) + + File ~/src/hopsflow/hopsflow/util.py:778, in ensemble_mean(arg_iter, function, N, every, save, overwrite_cache, chunk_size, in_flight, gc_sleep) +  776 while True: +  777 try: + --> 778 next_val = next(chunk_iterator) +  779 except StopIteration: +  780 next_val = None + + File /nix/store/akzgacnj2l97sldws5cnxjlgv27317xd-python3-3.9.13-env/lib/python3.9/site-packages/tqdm/std.py:1195, in tqdm.__iter__(self) +  1192 time = self._time +  1194 try: + -> 1195 for obj in iterable: +  1196 yield obj +  1197 # Update and possibly print the progressbar. +  1198 # Note: does not call self.update(1) for speed optimisation. + + File ~/src/hopsflow/hopsflow/util.py:693, in _grouper(n, iterable) +  690 """Groups the iteartor into tuples of at most length ``n``.""" +  692 while True: + --> 693 chunk = tuple(itertools.islice(iterable, n)) +  694 if not chunk: +  695 return + + File ~/src/hops/hops/core/hierarchy_data.py:1240, in HIData.valid_sample_iterator(self, iterator) +  1233 def valid_sample_iterator(self, iterator: Iterator[T]) -> Iterator[T]: +  1234 """ +  1235  Takes an ``iterator`` that yields a sequence of items related to +  1236  the sequence of samples and yields them if the sample is +  1237  actually present in the data. +  1238  """ + -> 1240 for i, item in enumerate(iterator): +  1241 if self.has_sample(i): +  1242 yield item + + File /nix/store/akzgacnj2l97sldws5cnxjlgv27317xd-python3-3.9.13-env/lib/python3.9/site-packages/h5py/_hl/dataset.py:695, in Dataset.__iter__(self) +  693 raise TypeError("Can't iterate over a scalar dataset") +  694 for i in range(shape[0]): + --> 695 yield self[i] + + File h5py/_objects.pyx:54, in h5py._objects.with_phil.wrapper() + + File h5py/_objects.pyx:55, in h5py._objects.with_phil.wrapper() + + File /nix/store/akzgacnj2l97sldws5cnxjlgv27317xd-python3-3.9.13-env/lib/python3.9/site-packages/h5py/_hl/dataset.py:824, in Dataset.__getitem__(self, args, new_dtype) +  822 mspace = h5s.create_simple(selection.mshape) +  823 fspace = selection.id + --> 824 self.id.read(mspace, fspace, arr, mtype, dxpl=self._dxpl) +  826 # Patch up the output for NumPy +  827 if arr.shape == (): + + KeyboardInterrupt: +#+end_example +:END: #+begin_src jupyter-python fig, ax = plt.subplots() @@ -168,8 +262,8 @@ #+RESULTS: :RESULTS: : WARNING:matplotlib.legend:No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when legend() is called with no argument. -: -[[file:./.ob-jupyter/89ae9af00f7aa3e773df6d7875eeff5e91d76f4e.svg]] +: +[[file:./.ob-jupyter/f3f1da415527bff6b99872e7c62dfdf0f63fbc24.svg]] :END: * Analytic