diff --git a/NEWS.md b/NEWS.md index 6f0bfdf..a028783 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,7 @@ ## NEWS -### V2.1.2 +### V2.1.3 - update build process for PyPI diff --git a/data/NKCMAS_Raman.hdf5 b/data/NKCMAS_Raman.hdf5 deleted file mode 100644 index 52e5557..0000000 Binary files a/data/NKCMAS_Raman.hdf5 and /dev/null differ diff --git a/data/NKCMAS_abbe.hdf5 b/data/NKCMAS_abbe.hdf5 deleted file mode 100644 index d560b15..0000000 Binary files a/data/NKCMAS_abbe.hdf5 and /dev/null differ diff --git a/data/NKCMAS_cp.hdf5 b/data/NKCMAS_cp.hdf5 deleted file mode 100644 index 5567c0d..0000000 Binary files a/data/NKCMAS_cp.hdf5 and /dev/null differ diff --git a/data/NKCMAS_cte.hdf5 b/data/NKCMAS_cte.hdf5 deleted file mode 100644 index 7a57400..0000000 Binary files a/data/NKCMAS_cte.hdf5 and /dev/null differ diff --git a/data/NKCMAS_density.hdf5 b/data/NKCMAS_density.hdf5 deleted file mode 100644 index 6cb51bb..0000000 Binary files a/data/NKCMAS_density.hdf5 and /dev/null differ diff --git a/data/NKCMAS_em.hdf5 b/data/NKCMAS_em.hdf5 deleted file mode 100644 index 4ed8c4c..0000000 Binary files a/data/NKCMAS_em.hdf5 and /dev/null differ diff --git a/data/NKCMAS_optical.hdf5 b/data/NKCMAS_optical.hdf5 deleted file mode 100644 index 22ef3f4..0000000 Binary files a/data/NKCMAS_optical.hdf5 and /dev/null differ diff --git a/data/NKCMAS_tl.hdf5 b/data/NKCMAS_tl.hdf5 deleted file mode 100644 index a241dd1..0000000 Binary files a/data/NKCMAS_tl.hdf5 and /dev/null differ diff --git a/data/NKCMAS_viscosity.hdf5 b/data/NKCMAS_viscosity.hdf5 deleted file mode 100644 index a4b4290..0000000 Binary files a/data/NKCMAS_viscosity.hdf5 and /dev/null differ diff --git a/docs/source/conf.py b/docs/source/conf.py index cffcec3..fb9f2ee 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ author = 'Charles Le Losq, Barbara Baldoni, Andrew P. Valentine' # The full version, including alpha/beta/rc tags -release = '2.1.2' +release = '2.1.3' # -- General configuration --------------------------------------------------- diff --git a/examples/Predict_given_property.ipynb b/examples/Predict_given_property.ipynb index 65468c8..5eca55f 100644 --- a/examples/Predict_given_property.ipynb +++ b/examples/Predict_given_property.ipynb @@ -21,13 +21,89 @@ "execution_count": 1, "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "A module that was compiled using NumPy 1.x cannot be run in\n", + "NumPy 2.1.1 as it may crash. To support both 1.x and 2.x\n", + "versions of NumPy, modules must be compiled with NumPy 2.0.\n", + "Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.\n", + "\n", + "If you are a user of the module, the easiest solution will be to\n", + "downgrade to 'numpy<2' or try to upgrade the affected module.\n", + "We expect that some modules will need time to support NumPy 2.\n", + "\n", + "Traceback (most recent call last): File \"\", line 198, in _run_module_as_main\n", + " File \"\", line 88, in _run_code\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/ipykernel_launcher.py\", line 18, in \n", + " app.launch_new_instance()\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/traitlets/config/application.py\", line 1075, in launch_instance\n", + " app.start()\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/ipykernel/kernelapp.py\", line 739, in start\n", + " self.io_loop.start()\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/tornado/platform/asyncio.py\", line 205, in start\n", + " self.asyncio_loop.run_forever()\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/asyncio/base_events.py\", line 608, in run_forever\n", + " self._run_once()\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/asyncio/base_events.py\", line 1936, in _run_once\n", + " handle._run()\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/asyncio/events.py\", line 84, in _run\n", + " self._context.run(self._callback, *self._args)\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/ipykernel/kernelbase.py\", line 545, in dispatch_queue\n", + " await self.process_one()\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/ipykernel/kernelbase.py\", line 534, in process_one\n", + " await dispatch(*args)\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/ipykernel/kernelbase.py\", line 437, in dispatch_shell\n", + " await result\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/ipykernel/ipkernel.py\", line 362, in execute_request\n", + " await super().execute_request(stream, ident, parent)\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/ipykernel/kernelbase.py\", line 778, in execute_request\n", + " reply_content = await reply_content\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/ipykernel/ipkernel.py\", line 449, in do_execute\n", + " res = shell.run_cell(\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/ipykernel/zmqshell.py\", line 549, in run_cell\n", + " return super().run_cell(*args, **kwargs)\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/IPython/core/interactiveshell.py\", line 3075, in run_cell\n", + " result = self._run_cell(\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/IPython/core/interactiveshell.py\", line 3130, in _run_cell\n", + " result = runner(coro)\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/IPython/core/async_helpers.py\", line 128, in _pseudo_sync_runner\n", + " coro.send(None)\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/IPython/core/interactiveshell.py\", line 3334, in run_cell_async\n", + " has_raised = await self.run_ast_nodes(code_ast.body, cell_name,\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/IPython/core/interactiveshell.py\", line 3517, in run_ast_nodes\n", + " if await self.run_code(code, result, async_=asy):\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/IPython/core/interactiveshell.py\", line 3577, in run_code\n", + " exec(code_obj, self.user_global_ns, self.user_ns)\n", + " File \"/var/folders/23/p99d2kmd0vlg5qrqb4vq2q840000gn/T/ipykernel_10699/207192867.py\", line 12, in \n", + " import imelt\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/imelt/__init__.py\", line 1, in \n", + " from .model import *\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/imelt/model.py\", line 6, in \n", + " import torch, time\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/torch/__init__.py\", line 1477, in \n", + " from .functional import * # noqa: F403\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/torch/functional.py\", line 9, in \n", + " import torch.nn.functional as F\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/torch/nn/__init__.py\", line 1, in \n", + " from .modules import * # noqa: F403\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/torch/nn/modules/__init__.py\", line 35, in \n", + " from .transformer import TransformerEncoder, TransformerDecoder, \\\n", + " File \"/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/torch/nn/modules/transformer.py\", line 20, in \n", + " device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),\n", + "/Users/charleslelosq/anaconda3/envs/ml/lib/python3.11/site-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/utils/tensor_numpy.cpp:84.)\n", + " device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),\n" + ] + }, { "name": "stdout", "output_type": "stream", "text": [ "CUDA AVAILABLE? \n", - "Yes, setting device to cuda\n", - "cuda\n" + "No, setting device to cpu\n", + "cpu\n" ] } ], @@ -86,10 +162,15 @@ "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "The configurational entropy at Tg is 1424.1 J/mol/K\n" + "ename": "RuntimeError", + "evalue": "Numpy is not available", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[3], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m X_SiO2 \u001b[38;5;241m=\u001b[39m imelt\u001b[38;5;241m.\u001b[39mgenerate_query_single(sio2\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m100.0\u001b[39m)\n\u001b[0;32m----> 2\u001b[0m sctg_SiO2 \u001b[38;5;241m=\u001b[39m \u001b[43mneuralmodel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mpredict\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtg\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mX_SiO2\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThe configurational entropy at Tg is \u001b[39m\u001b[38;5;132;01m{:.1f}\u001b[39;00m\u001b[38;5;124m J/mol/K\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(sctg_SiO2[\u001b[38;5;241m0\u001b[39m]))\n", + "File \u001b[0;32m~/anaconda3/envs/ml/lib/python3.11/site-packages/imelt/model.py:2121\u001b[0m, in \u001b[0;36mbagging_models.predict\u001b[0;34m(self, method, X, T, lbd, sampling, n_sample)\u001b[0m\n\u001b[1;32m 2115\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 2116\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m i \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mn_models):\n\u001b[1;32m 2117\u001b[0m out[:, i] \u001b[38;5;241m=\u001b[39m (\n\u001b[1;32m 2118\u001b[0m \u001b[38;5;28;43mgetattr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmodels\u001b[49m\u001b[43m[\u001b[49m\u001b[43mi\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmethod\u001b[49m\u001b[43m)\u001b[49m\u001b[43m(\u001b[49m\u001b[43mX\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 2119\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcpu\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 2120\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdetach\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m-> 2121\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mnumpy\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 2122\u001b[0m \u001b[38;5;241m.\u001b[39mreshape(\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m)\n\u001b[1;32m 2123\u001b[0m )\n\u001b[1;32m 2125\u001b[0m \u001b[38;5;66;03m# Before leaving this function, we make sure we freeze again the dropout\u001b[39;00m\n\u001b[1;32m 2126\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m i \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mn_models):\n", + "\u001b[0;31mRuntimeError\u001b[0m: Numpy is not available" ] } ], @@ -424,7 +505,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.9" + "version": "3.11.10" }, "vscode": { "interpreter": { diff --git a/pyproject.toml b/pyproject.toml index 446a8b8..a603556 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "imelt" -version = "2.1.2" +version = "2.1.3" dependencies = [ "matplotlib", "numpy", diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e2b97b0..0000000 --- a/requirements.txt +++ /dev/null @@ -1,20 +0,0 @@ -imelt -matplotlib -numpy -scipy -rampy -tqdm -h5py -torch -scikit-learn -pandas -ax-platform -seaborn -mpltern >= 0.4 -uncertainties -jupyter -openpyxl -corner -heatmapz -torchvision -aws-fortuna \ No newline at end of file