From b52de822664e34b18e7c39c205bda94f4ff0d2dc Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Fri, 5 Jan 2024 10:34:50 -0500 Subject: [PATCH 01/19] fixed some file transfer notebooks --- ..._transfers_for_workflows_from_remote.ipynb | 189 ------------------ .../file_transfers_for_workflows_local.ipynb | 37 ++-- .../coding/file_transfers_to_from_s3.ipynb | 4 +- 3 files changed, 21 insertions(+), 209 deletions(-) delete mode 100644 doc/source/how_to/coding/file_transfers_for_workflows_from_remote.ipynb diff --git a/doc/source/how_to/coding/file_transfers_for_workflows_from_remote.ipynb b/doc/source/how_to/coding/file_transfers_for_workflows_from_remote.ipynb deleted file mode 100644 index 35412ce95..000000000 --- a/doc/source/how_to/coding/file_transfers_for_workflows_from_remote.ipynb +++ /dev/null @@ -1,189 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "5120ef0f-8510-4ad7-a0ea-2e306aec0064", - "metadata": { - "tags": [] - }, - "source": [ - "## Transferring Files to and from an S3 Bucket\n", - "\n", - "Retrieve a file from a remote host's filesystem before executing a workflow using Rsync via SSH.\n", - "\n", - "### Prerequisites\n", - "\n", - "1. Define the read (source) file path. \n", - "2. Create a source file to transfer." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "a20575c4", - "metadata": {}, - "outputs": [], - "source": [ - "import covalent as ct \n", - "\n", - "from pathlib import Path\n", - "\n", - "# define source & destination filepaths \n", - "source_filepath = Path('./my_source_file').resolve()\n", - "\n", - "# create an example file\n", - "source_filepath.touch()" - ] - }, - { - "cell_type": "markdown", - "id": "57700440", - "metadata": {}, - "source": [ - "### Procedure\n", - "\n", - "Transfer a file from an S3 bucket to a local filesystem using the boto3 library. \n", - "\n", - "In the following example a zip file is downloaded from an S3 bucket before electron execution. The electron processes the files, then the processed files are uploaded back to the S3 bucket.\n", - "\n", - "1. Define two Covalent `FileTransfer` objects and a Covalent `S3` strategy object:" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "052ed080", - "metadata": {}, - "outputs": [], - "source": [ - "import covalent as ct\n", - "import zipfile\n", - "import os\n", - "\n", - "strategy = ct.fs_strategies.S3()\n", - "\n", - "ft_2 = ct.fs.FileTransfer('/home/ubuntu/tmp-dir/images.zip','s3://covalent-tmp/images.zip',strategy = strategy,order=ct.fs.Order.AFTER)\n", - "ft_1 = ct.fs.FileTransfer('s3://covalent-tmp/test_vids.zip','/home/ubuntu/tmp-dir/test_vids.zip',strategy = strategy)\n" - ] - }, - { - "cell_type": "markdown", - "id": "0a213bf5", - "metadata": {}, - "source": [ - "2. Define an electron to:\n", - " 1. Download a zip file from S3\n", - " 2. Unzip the file\n", - " 3. Perform some processing on the contents (omitted here as irrelevant to the demo)\n", - " 4. Zip the files\n", - " 5. Upload the zip file to S3:" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "4519a791", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[2023-07-25 15:52:15,882] [DEBUG] s3_strategy.py: Line 57 in download: Is dir: False\n", - "[2023-07-25 15:52:15,883] [DEBUG] s3_strategy.py: Line 66 in download: S3 download bucket: covalent-tmp, from_filepath: test_vids.zip, to_filepath /home/ubuntu/tmp-dir/test_vids.zip.\n", - "[2023-07-25 15:52:15,884] [DEBUG] s3_strategy.py: Line 133 in upload: S3 upload bucket: covalent-tmp, from_filepath: /home/ubuntu/tmp-dir/images.zip, to_filepath images.zip.\n" - ] - } - ], - "source": [ - "@ct.electron(files = [ft_1,ft_2])\n", - "def unzip_zip(files=[]):\n", - " path = \"/home/ubuntu/tmp-dir\"\n", - " # Unzip downloaded data\n", - " with zipfile.ZipFile(path + \"/test_vids.zip\", 'r') as zip_ref:\n", - " zip_ref.extractall(path)\n", - " \n", - " # Perform operations on the files\n", - " # ...\n", - " \n", - " # Zip files to upload \n", - " with zipfile.ZipFile(path + \"/images.zip\", 'w', zipfile.ZIP_DEFLATED) as ziph:\n", - " for root, dirs, files in os.walk(path + '/test_vids'):\n", - " for file in files:\n", - " ziph.write(os.path.join(root, file), \n", - " os.path.relpath(os.path.join(root, file), \n", - " os.path.join(path, '..')))" - ] - }, - { - "cell_type": "markdown", - "id": "f05a5759", - "metadata": {}, - "source": [ - "3. Create and dispatch a lattice to run the electron:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "1c2d3589", - "metadata": {}, - "outputs": [], - "source": [ - "@ct.lattice\n", - "def run_electrons():\n", - " return unzip_zip()\n", - "\n", - "dispatch_id = ct.dispatch(run_electrons)()" - ] - }, - { - "cell_type": "markdown", - "id": "eea96bae", - "metadata": {}, - "source": [ - "Notes:\n", - "- This example illustrates a typical pattern in which files are downloaded from remote storage, are processed, and the results are uploaded to the same remote storage. Other scenarios can of course be implemented with the Covalent components illustrated here (`FileTransfer`, `FileTransferStrategy`, `@electron`).\n", - "- The example puts everything in one electron. For a real-world scenario of any complexity, a better practice would be to break the task into small sub-tasks, each in its own electron." - ] - }, - { - "cell_type": "markdown", - "id": "244061a2", - "metadata": {}, - "source": [ - "### See Also\n", - "\n", - "[Transferring Local Files During Workflows](./file_transfers_for_workflows_local.ipynb)\n", - "\n", - "[Transferring Remote Files After a Workflow](./file_transfers_for_workflows_to_remote.ipynb)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.13" - }, - "vscode": { - "interpreter": { - "hash": "" - } - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/doc/source/how_to/coding/file_transfers_for_workflows_local.ipynb b/doc/source/how_to/coding/file_transfers_for_workflows_local.ipynb index 5fd90ae97..cd265428e 100644 --- a/doc/source/how_to/coding/file_transfers_for_workflows_local.ipynb +++ b/doc/source/how_to/coding/file_transfers_for_workflows_local.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 1, "id": "5a8139da", "metadata": {}, "outputs": [], @@ -40,7 +40,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 2, "id": "089aa573", "metadata": {}, "outputs": [], @@ -65,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 3, "id": "34e40034", "metadata": {}, "outputs": [], @@ -85,7 +85,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 4, "id": "279dc3fa", "metadata": {}, "outputs": [], @@ -103,7 +103,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 5, "id": "de6ed992", "metadata": {}, "outputs": [], @@ -129,7 +129,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 6, "id": "789a74ef", "metadata": {}, "outputs": [], @@ -157,7 +157,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 7, "id": "a30852d1-2fa4-4ffb-b01d-7e7cc9925182", "metadata": {}, "outputs": [], @@ -182,7 +182,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 8, "id": "0a6a94bf", "metadata": {}, "outputs": [ @@ -194,22 +194,23 @@ "Lattice Result\n", "==============\n", "status: COMPLETED\n", - "result: /Users/mini-me/agnostiq/covalent/doc/source/how_to/coding/my_dest_file\n", - "input args: []\n", - "input kwargs: {}\n", + "result: /Users/sankalpsanand/dev/covalent/doc/source/how_to/coding/my_dest_file\n", + "input args: \n", + "input kwargs: \n", "error: None\n", "\n", - "start_time: 2023-01-29 22:18:07.789282\n", - "end_time: 2023-01-29 22:18:07.914328\n", + "start_time: 2024-01-05 14:48:31.791928\n", + "end_time: 2024-01-05 14:48:32.501517\n", "\n", - "results_dir: /Users/mini-me/agnostiq/covalent/doc/source/how_to/coding/results\n", - "dispatch_id: 024088b9-6f74-4e5f-9757-9f088bd16b29\n", + "results_dir: /Users/sankalpsanand/.cache/covalent/results/bbd6f2b0-ecb4-4e05-ba63-6c10da81ceeb\n", + "dispatch_id: bbd6f2b0-ecb4-4e05-ba63-6c10da81ceeb\n", "\n", "Node Outputs\n", "------------\n", - "my_file_transfer_task(0): /Users/mini-me/agnostiq/covalent/doc/source/how_to/coding/my_dest_file\n", + "my_file_transfer_task(0): /Users/sankalpsanand/dev/covalent/doc/source/how_to/coding/my_dest_file\n", + ":postprocess:reconstruct(1): /Users/sankalpsanand/dev/covalent/doc/source/how_to/coding/my_dest_file\n", "\n", - "Reading from /Users/mini-me/agnostiq/covalent/doc/source/how_to/coding/my_dest_file \n", + "Reading from /Users/sankalpsanand/dev/covalent/doc/source/how_to/coding/my_dest_file \n", "\n", "Mares eat oats and does eat oats\n", "And little lambs eat ivy ...\n", @@ -265,7 +266,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.8.18" }, "vscode": { "interpreter": { diff --git a/doc/source/how_to/coding/file_transfers_to_from_s3.ipynb b/doc/source/how_to/coding/file_transfers_to_from_s3.ipynb index e50a2ca63..58710f911 100644 --- a/doc/source/how_to/coding/file_transfers_to_from_s3.ipynb +++ b/doc/source/how_to/coding/file_transfers_to_from_s3.ipynb @@ -94,7 +94,7 @@ "\n", " # Save the grayscale image to the upload file path\n", " gray_image_path = files[1][0] # source filepath of second file transfer, to be uploaded\n", - " io.imsave(gray_image_path, gray_img)\n" + " io.imsave(gray_image_path, gray_img, mode=\"L\")\n" ] }, { @@ -173,7 +173,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.8.18" }, "vscode": { "interpreter": { From c3cab22f546bd7f83bc42e87eb7144187366265a Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Fri, 5 Jan 2024 10:40:57 -0500 Subject: [PATCH 02/19] removing some more redundant notebooks --- ...le_transfers_for_workflows_to_remote.ipynb | 159 --------------- .../file_transfers_to_from_remote.ipynb | 2 +- .../coding/file_transfers_to_remote.ipynb | 182 ------------------ 3 files changed, 1 insertion(+), 342 deletions(-) delete mode 100644 doc/source/how_to/coding/file_transfers_for_workflows_to_remote.ipynb delete mode 100644 doc/source/how_to/coding/file_transfers_to_remote.ipynb diff --git a/doc/source/how_to/coding/file_transfers_for_workflows_to_remote.ipynb b/doc/source/how_to/coding/file_transfers_for_workflows_to_remote.ipynb deleted file mode 100644 index 1a44b623a..000000000 --- a/doc/source/how_to/coding/file_transfers_for_workflows_to_remote.ipynb +++ /dev/null @@ -1,159 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "5120ef0f-8510-4ad7-a0ea-2e306aec0064", - "metadata": { - "tags": [] - }, - "source": [ - "## Transferring Remote Files After a Workflow\n", - "\n", - "Transfer a local file to a remote host's filesystem using Rsync via SSH.\n", - "\n", - "### Prerequisites\n", - "\n", - "1. Define the read (source) file path. \n", - "2. Create a source file to transfer." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a20575c4", - "metadata": {}, - "outputs": [], - "source": [ - "import covalent as ct \n", - "\n", - "from pathlib import Path\n", - "\n", - "# define source & destination filepaths \n", - "source_filepath = Path('./my_source_file').resolve()\n", - "\n", - "# create an example file\n", - "source_filepath.touch()" - ] - }, - { - "cell_type": "markdown", - "id": "1616c355", - "metadata": {}, - "source": [ - "### Procedure\n", - "\n", - "Transfer a local file located in `source_filepath` to a remote host's filesystem located at `/home/ubuntu/my_dest_file` using Rsync via SSH.\n", - "\n", - "1. Define an `Rsync` strategy with the remote host and path:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "78667649", - "metadata": {}, - "outputs": [], - "source": [ - "strategy = ct.fs_strategies.Rsync(user='ubuntu', host='44.202.86.215', private_key_path='/path/to/private/key')" - ] - }, - { - "cell_type": "markdown", - "id": "1971b885", - "metadata": {}, - "source": [ - "2. Define an electron, passing a Covalent `TransferToRemote` object to the `files` keyword argument in the decorator:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4abc0a90", - "metadata": {}, - "outputs": [], - "source": [ - "@ct.electron(\n", - " files=[ct.fs.TransferToRemote('/home/ubuntu/my_dest_file', str(source_filepath), strategy=strategy)]\n", - ")\n", - "def my_remote_file_transfer_task(files=[]):\n", - " pass\n" - ] - }, - { - "cell_type": "markdown", - "id": "2886440f", - "metadata": {}, - "source": [ - "3. Define a lattice in which to dispatch the workflow:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "85e52654", - "metadata": {}, - "outputs": [], - "source": [ - "@ct.lattice()\n", - "def my_workflow():\n", - " return my_remote_file_transfer_task()\n", - "\n", - "ct.dispatch(my_workflow)()" - ] - }, - { - "cell_type": "markdown", - "id": "57700440", - "metadata": {}, - "source": [ - "The file located at `source_filepath` is transferred to the specified file path (`/home/ubuntu/my_dest_file`) on host `44.202.86.215`. The transfer operation occurs after the workflow completes. In a typical real-world scenario, the transfer is used to move data generated by the workflow.\n" - ] - }, - { - "cell_type": "markdown", - "id": "244061a2", - "metadata": {}, - "source": [ - "### See Also\n", - "\n", - "[Transferring Local Files During Workflows](./file_transfers_for_workflows_local.ipynb)\n", - "\n", - "[Transferring Files to and from an S3 Bucket](/file_transfers_for_workflows_to_from_s3.ipynb)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "492834f4", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.13" - }, - "vscode": { - "interpreter": { - "hash": "" - } - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/doc/source/how_to/coding/file_transfers_to_from_remote.ipynb b/doc/source/how_to/coding/file_transfers_to_from_remote.ipynb index acfbe7040..c40c5eeaa 100644 --- a/doc/source/how_to/coding/file_transfers_to_from_remote.ipynb +++ b/doc/source/how_to/coding/file_transfers_to_from_remote.ipynb @@ -112,7 +112,7 @@ "\n", " # Save the grayscale image to the upload file path\n", " gray_image_path = files[1][0] # source filepath of second file transfer, to be uploaded\n", - " io.imsave(gray_image_path, gray_img)\n" + " io.imsave(gray_image_path, gray_img, mode=\"L\")\n" ] }, { diff --git a/doc/source/how_to/coding/file_transfers_to_remote.ipynb b/doc/source/how_to/coding/file_transfers_to_remote.ipynb deleted file mode 100644 index 7978bce6f..000000000 --- a/doc/source/how_to/coding/file_transfers_to_remote.ipynb +++ /dev/null @@ -1,182 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "5120ef0f-8510-4ad7-a0ea-2e306aec0064", - "metadata": { - "tags": [] - }, - "source": [ - "## Transferring Remote Files After a Workflow\n", - "\n", - "Transfer a local file to a remote host's filesystem using Rsync via SSH.\n", - "\n", - "### Prerequisites\n", - "\n", - "1. Define the read (source) file path. \n" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "2febd9b7", - "metadata": {}, - "outputs": [], - "source": [ - "import covalent as ct \n", - "\n", - "from pathlib import Path\n", - "\n", - "# define a source filepath\n", - "source_filepath = Path('./my_source_file').resolve()\n" - ] - }, - { - "cell_type": "markdown", - "id": "94db0ac7", - "metadata": {}, - "source": [ - "2. Create a source file to transfer." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "a20575c4", - "metadata": {}, - "outputs": [], - "source": [ - "# create an example file\n", - "source_filepath.touch()" - ] - }, - { - "cell_type": "markdown", - "id": "1616c355", - "metadata": {}, - "source": [ - "### Procedure\n", - "\n", - "Transfer a local file located in `source_filepath` to a remote host's filesystem located at `/home/ubuntu/my_dest_file` using Rsync via SSH.\n", - "\n", - "1. Define an `Rsync` strategy with the remote host and path:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "78667649", - "metadata": {}, - "outputs": [], - "source": [ - "strategy = ct.fs_strategies.Rsync(user='ubuntu', host='44.202.86.215', private_key_path='/path/to/private/key')" - ] - }, - { - "cell_type": "markdown", - "id": "1971b885", - "metadata": {}, - "source": [ - "2. Define an electron, passing a Covalent `TransferToRemote` object to the `files` keyword argument in the decorator:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4abc0a90", - "metadata": {}, - "outputs": [], - "source": [ - "@ct.electron(\n", - " files=[ct.fs.TransferToRemote('/home/ubuntu/my_dest_file', str(source_filepath), strategy=strategy)]\n", - ")\n", - "def my_remote_file_transfer_task(files=[]):\n", - " pass\n" - ] - }, - { - "cell_type": "markdown", - "id": "2886440f", - "metadata": {}, - "source": [ - "3. Define a lattice in which to execute the workflow:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "85e52654", - "metadata": {}, - "outputs": [], - "source": [ - "@ct.lattice()\n", - "def my_workflow():\n", - " return my_remote_file_transfer_task()" - ] - }, - { - "cell_type": "markdown", - "id": "028c0fc4", - "metadata": {}, - "source": [ - "4. Dispatch the lattice:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0b123c74", - "metadata": {}, - "outputs": [], - "source": [ - "ct.dispatch(my_workflow)()" - ] - }, - { - "cell_type": "markdown", - "id": "57700440", - "metadata": {}, - "source": [ - "The file located at `source_filepath` is transferred to the specified file path (`/home/ubuntu/my_dest_file`) on host `44.202.86.215`. The transfer operation occurs after the workflow completes. In a typical real-world scenario, the transfer is used to move data generated by the workflow.\n" - ] - }, - { - "cell_type": "markdown", - "id": "244061a2", - "metadata": {}, - "source": [ - "### See Also\n", - "\n", - "[Transferring Local Files During Workflows](./file_transfers_for_workflows_local.ipynb)\n", - "\n", - "[Transferring Files to and from an S3 Bucket](./file_transfers_to_from_s3.ipynb)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.13" - }, - "vscode": { - "interpreter": { - "hash": "" - } - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} From f8811454cd2228158d264cd398537771c072cd83 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Fri, 5 Jan 2024 11:04:07 -0500 Subject: [PATCH 03/19] fixed to-from remote FT notebook --- .../file_transfers_to_from_remote.ipynb | 4 +++- doc/source/how_to/coding/processed_file.png | Bin 4190 -> 1288 bytes 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/source/how_to/coding/file_transfers_to_from_remote.ipynb b/doc/source/how_to/coding/file_transfers_to_from_remote.ipynb index c40c5eeaa..d07489b3c 100644 --- a/doc/source/how_to/coding/file_transfers_to_from_remote.ipynb +++ b/doc/source/how_to/coding/file_transfers_to_from_remote.ipynb @@ -25,6 +25,8 @@ "\n", "### Procedure\n", "\n", + "Make sure to swap the `private_key` and `remote_host` values with your own.\n", + "\n", "1. Define an `Rsync` strategy with the remote host and private key path to be used for SSH." ] }, @@ -191,7 +193,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.8.18" }, "vscode": { "interpreter": { diff --git a/doc/source/how_to/coding/processed_file.png b/doc/source/how_to/coding/processed_file.png index 72fcf858e2c2d0aa878ae6d87fdba642a5a6c96a..d8c5a7ab01fc17cbec69b4cddee173e3e0aaa4f3 100644 GIT binary patch literal 1288 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^#<6krh8)oj7Qz;fQx#WAE}&f80df(!}_ zM>g2^JiN~X_OcZgVA&_nhgebQSgiBYf}E&IrsO2 Oia1YKKbLh*2~7Z_R2^&p literal 4190 zcmb`LcU03^-o}3kQ38S_^d`-qBA_5G^f*J1P=})QUX%`_C>TmmS(*|NQKUH&5LCJh zQbI{Uh)5HW&>;wj^pb%P0%0@n``4cL?CyK^>^aZ5f82BX{oecB&rSWs`U*daN_p=$_T-$o8{k73$-DIpeFB4n@EEm~<(m;K_tZUN z5zuq0s7O9-5EKT1!sIwYafIUtxQqip_W%$W!V#3Ce^=oDS?pi6^AFuw{MLRZCs#AA zl65`&s_;ZIP}-Xice~GVnQ>>-0D=siowy&|`o--m3Y@R7#;tG(`XsnjhUl(n_r@jU z{Hw9!%yf@aiVCxxwA?CJ*D`az!yYSb5iBXtOz$E=ipvlVA8YG*ra+oZ-cS?aNiO1h z_BuG-EUMEFa{A)Z>~ z?{?=H&)2n>-i#?#JB=IwW(=bK)}M2X>bN#=^gCGw_JS_7)qmIbC}&Zk!X*71*yKHP zf`6c>J3|UD)u)vOWMUYRI?yw`o4qx%MhYlDq1yvz4=^)Tt0fjq!$?^eBxRu!+8@Y6 zsO#TOduA=K&P3a( z0Eq9CXo7)^$v4H=pL71VvijEit@}N=J`@fenGjt7$xU~MdtE+wJ~QFU|DKD2Lw83j zi2k+x86fr6y)TUs5+sPzDDQk}X?!xLQqme|f?LTo(U%iiBxs?kYBOMlJ7(TLe*Ywo zpqFiXX#$Tl7(pTwTkHENS3^M{@I#u!#l#_mxh{YpwVwp=8Iw9Z6N$hH!M1&d_lJoH zh*Qqzo#{M^xxbOpjArP4K)rkVGf%lG)wL>@MXU=&Soc{HkDGzfk>6k@pTEEVcCv$%z{*3f zhYct4yHY;~VX7{4jH$_?s(HIo=I)H{OgMTz*4eTj%DwTJ6CqlhVW$mk=-r>q_T(X& z7HM_wI_P`qTssd*v292WuVR`@nkfzoO>Wy&tZGS+KVJTZrZ(6&Ouy5ylt;~z@Q;S6 zIa;BIt}Pr=gr3O*H{ccLA!n@RFM4r6u@WRs?qui-W$ zEycV}RQ;jNjDM|U@T5yBKye2j#YRrcmW_HVD6B9>jHkHXkLE*=m2Aeqmzs6+9OTb% zXY6L@Sx@!RRS1#|-JOgSI3@(gpe01I`mW%PEwOio`@*AV%#3tbS461XqT0R*Y(k@TEho3){LfolpbN9A? z$DMC->%gA6GRwI8{nN(S69|%guqJT#zVvrU{cS~3>H`}#g(xQjRtXV^W*hh@!)V`D zT5g1eyn~$~-78K$T&_Q|yZ$qbhEz_LmhFjLWlc^!1}GDu1@%)JVHh(UI#r;R{?|!p zN0!EC;7f)~l#Cu@aK|v#t>KeX{_>VM^s&8d_c4jvi720Z842Ng0yp3Qb&T+1Kl=$FTEzlm zGaL?qnyMKUW=D!2x7X$Wg_~=lvihVvDNiGY@ij)udM@*R+m54boGA_xeG^xjuvBax zBZiFK+U}=b5Ag;!haRWc-<{Wdq}!JG*InTS@of1eiZCra;E};9y*3nZO2JKHHWv^$ zVr_p@$seDaAWFF&#o~c6E{{^i>XfFek%3+lYr#-k1LV=&#y3#Pjt`BdmRF99jy|N> zv@qAd1}59H6?b=+*=^fFa#)fwpMa;;(enos!C&hXz|H1!g<4rNwUpAY5@g4%Cbng~ zP3V1J6xgID`Yhz1+ZMq9DIZ0CHCrqzqxO~_k%R!dMQoK7@feeuw})l0C_j+`gBP2U z+ENpcl+{~$vzRq{WFkUT{y%ib6lO&6j8k%! z&`=c43*vjt!mA?7^Eo-yE)7ucQQRD3Zf-w6l9A4@*cj%4X$ZI66-;Vd1+(yd+^XOY zmRBNv92`D-ka{-WCHH!l0%wt~k#pvlQWSP_y`L3$pj;f1^1>_wf0!kZv425U=l1#t z6jsZ#IVIq|O}0uTa?K6OfP759AlcF9ln1m_d*o2Ux7W@%@{B`_4$lMXkaT)`1|V4XXQ9>>@6jJfhX zS}n1;fV#+{@vTEz*M`|i{c$Uf$w}Vp?+n%Np8X~LhBK{4q=sWG3PPr8CDjnj6<020 z=heDPpnj#r4~8e6(P9K?`Rf4DxS$h~(vGOqu&z3RMSN6vfQEt;CK>`Dr#%CUI|gfA zek7@Z`WFQEqUu*JQ0x^+G4n>oUwA--2Dkw`dsFOBwwB6IpK4)L2vqH!nEN+$|L98- zM}pW*ULo2+1*))sAG->&eM;N&deWi$iU&5fSheE0pY^I(^jDFeaP-cE+rn-tLqcar zOu>S~@+6?+AS z;w?_TSqq`+4eI`>vu)iehiXm$MvWMHx^COf6&vHHI ziG88jf5@LM*S+hpIg=drM7-5g-3pCc;IEF8{(hL#{pONJ`R_A$$Cqp;BFi}m=#io^ z=e*h2tA;T+mjsv>(LUP{tWtwW+fMk*r$H~8Ehq`Htz0F$M#`a7E}BMQ@OFnDbpgtp zaN>Rw-n`$zIs+oSj=Edg%9aA>zifMqY})eo@W1NNUAX0wKhdTM+SS)-Rr3xDJqH3= zZ~S(!-Q~DmE@H(8K^DwP6)U`XIW72u1XF*jDET39qhKoJ99U(1Qxld+`wnFF{GQ@) zXXF#Tx#;;?cDM}8i_9|4jG#TbM2LgG30GOJYpojRx=rjG*l9L?`Hov0o2tLht!h{A zL#+@rWc9Bs@5kEAKH+}dlI3l%AHy{mQ(xmq=pfN(4LixKRZzNQtHKjLO5>8>a{B&4 z^JhDUoLyGtfV!9Z6YtmP$;c`l*&QFazfN>|3ZQWTJmC()%2ns8z;p2xn_^ zhV{d~Af@+xo6Iu(x~sdmS{Vb|$4f0!nhue=)6&#JNBrX607Z%U*X!iM@PSoSF7uXU z#gLQ4LbR?P@6}E@(pczbp^*R4WCPZx;(hO>5d19t_6l7KobQb*4crxZuqZ|BdjfeK zUyH$MI}INKjO^Tkb`bWGHZ!Uf#Q9jW(0FwpAWSodE^Fq5`STWzuLsgG9}U zLF4S|1LFI%S?koD5vB5SL7E%HsiLdJ;NsagtHWjQAHOSqVO+mV^^m|nM;?c8K+Hn( zZ;N|_zij)W;I_&WH7g5rr=9FiyvGD-(ZoM@hBpx}l^4ps7rM`iCjpeQ5)Z8s=~m%21z4Slj0Fs4ODQE zV!N{%B!?m_I%ukjA!L?Tzw6BcI zK-EUvf4dRfDLlB<_mb*x8=d-9A$e@)34fx^+m{~ZzkE7biTrv7gua}VtZ=(sL7 V)Z6*F;IEGZ4BFbH@+Yr*e+S*iV<`Xt From 0ced1fb10b53d4bf66003682f7377eae4c681dfc Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Fri, 5 Jan 2024 11:32:51 -0500 Subject: [PATCH 04/19] fixed azure blob and gcp storage FT notebooks --- .../how_to/coding/file_transfers_to_from_azure_blob.ipynb | 2 +- .../how_to/coding/file_transfers_to_from_gcp_storage.ipynb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/how_to/coding/file_transfers_to_from_azure_blob.ipynb b/doc/source/how_to/coding/file_transfers_to_from_azure_blob.ipynb index a0f85e837..3771a6e76 100644 --- a/doc/source/how_to/coding/file_transfers_to_from_azure_blob.ipynb +++ b/doc/source/how_to/coding/file_transfers_to_from_azure_blob.ipynb @@ -102,7 +102,7 @@ "\n", " # Save the grayscale image to the upload file path\n", " gray_image_path = files[1][0] # source filepath of second file transfer, to be uploaded\n", - " io.imsave(gray_image_path, gray_img)" + " io.imsave(gray_image_path, gray_img, mode=\"L\")" ] }, { diff --git a/doc/source/how_to/coding/file_transfers_to_from_gcp_storage.ipynb b/doc/source/how_to/coding/file_transfers_to_from_gcp_storage.ipynb index 5e1c02a22..d3376eafe 100644 --- a/doc/source/how_to/coding/file_transfers_to_from_gcp_storage.ipynb +++ b/doc/source/how_to/coding/file_transfers_to_from_gcp_storage.ipynb @@ -52,8 +52,8 @@ "object_source_path = f\"gs://{storage_bucket}/remote_{unprocessed_filename}\"\n", "object_dest_path = f\"gs://{storage_bucket}/remote_{processed_filename}\"\n", "\n", - "ft_1 = ct.fs.TransferFromRemote(blob_source_path, unprocessed_filepath, strategy=strategy)\n", - "ft_2 = ct.fs.TransferToRemote(blob_dest_path, processed_filepath, strategy=strategy)" + "ft_1 = ct.fs.TransferFromRemote(object_source_path, unprocessed_filepath, strategy=strategy)\n", + "ft_2 = ct.fs.TransferToRemote(object_dest_path, processed_filepath, strategy=strategy)" ] }, { @@ -100,7 +100,7 @@ "\n", " # Save the grayscale image to the upload file path\n", " gray_image_path = files[1][0] # source filepath of second file transfer, to be uploaded\n", - " io.imsave(gray_image_path, gray_img)" + " io.imsave(gray_image_path, gray_img, mode=\"L\")" ] }, { From 73f90554928e23f1a567aea19ca57b4145208e90 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Fri, 5 Jan 2024 12:09:31 -0500 Subject: [PATCH 05/19] fixed and tested gcp storage FT notebook --- .../_file_transfer/strategies/gcloud_strategy.py | 2 +- .../coding/file_transfers_to_from_gcp_storage.ipynb | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/covalent/_file_transfer/strategies/gcloud_strategy.py b/covalent/_file_transfer/strategies/gcloud_strategy.py index 22884d73b..24c3e4e51 100644 --- a/covalent/_file_transfer/strategies/gcloud_strategy.py +++ b/covalent/_file_transfer/strategies/gcloud_strategy.py @@ -41,7 +41,7 @@ class GCloud(FileTransferStrategy): def __init__(self, credentials: str = None, project_id: str = None): if credentials is not None: - credentials_json = Path(credentials).resolve() + credentials_json = Path(credentials).expanduser().resolve() if not credentials_json.is_file(): raise ValueError("Cloud not locate credentials for GCloud file transfers.") diff --git a/doc/source/how_to/coding/file_transfers_to_from_gcp_storage.ipynb b/doc/source/how_to/coding/file_transfers_to_from_gcp_storage.ipynb index d3376eafe..83b08f2dc 100644 --- a/doc/source/how_to/coding/file_transfers_to_from_gcp_storage.ipynb +++ b/doc/source/how_to/coding/file_transfers_to_from_gcp_storage.ipynb @@ -116,7 +116,15 @@ "execution_count": 3, "id": "5831c062", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "COMPLETED\n" + ] + } + ], "source": [ "@ct.lattice\n", "def process_blob_data():\n", @@ -160,7 +168,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.8.18" } }, "nbformat": 4, From eb4e748f62a84d1d821b2a7f83757c942e5a3b71 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Fri, 5 Jan 2024 12:12:28 -0500 Subject: [PATCH 06/19] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11dc5690d..f24948d00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Reduced number of assets to upload when submitting a dispatch. - Handled RecursionError on get results for a long running workflow. - Fixed functional tests. +- Fixed file transfer how to guides. ### Operations From 769405f7386813eff8b14845db788d7512751832 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Sun, 7 Jan 2024 11:08:06 -0500 Subject: [PATCH 07/19] made sure DirTrigger is working as expected --- doc/source/how_to/execution/trigger_dir.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/source/how_to/execution/trigger_dir.ipynb b/doc/source/how_to/execution/trigger_dir.ipynb index ae764a907..15dffc437 100644 --- a/doc/source/how_to/execution/trigger_dir.ipynb +++ b/doc/source/how_to/execution/trigger_dir.ipynb @@ -15,7 +15,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -33,7 +33,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -53,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -69,7 +69,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -88,14 +88,14 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "656213bc-ebd3-444b-9c48-1542c497061a\n" + "6e3a3e60-f105-48b9-95ad-fdff968a3f2f\n" ] } ], @@ -168,7 +168,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.8.18" }, "vscode": { "interpreter": { From 80df4e567a45894cb70b4c5f0ebaf27ce072a47c Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Sun, 7 Jan 2024 12:37:45 -0500 Subject: [PATCH 08/19] fixed database trigger notebook --- .../how_to/execution/trigger_database.ipynb | 85 ++++++++----------- doc/source/how_to/execution/trigger_dir.ipynb | 7 -- 2 files changed, 36 insertions(+), 56 deletions(-) diff --git a/doc/source/how_to/execution/trigger_database.ipynb b/doc/source/how_to/execution/trigger_database.ipynb index bce8da792..629c77486 100644 --- a/doc/source/how_to/execution/trigger_database.ipynb +++ b/doc/source/how_to/execution/trigger_database.ipynb @@ -10,14 +10,11 @@ "\n", "## Prerequisites\n", " \n", - "1. Install the recommended SQL drivers that support SQLAlchemy. \n", - "2. Create an environment variable named `COVALENT_DATABASE_URL` and set the desired database file or URL. For the PostgreSQL instance, the database connection URL will be similar to the below code snippet,\n", - "```\n", - " export COVALENT_DATABASE_URL=postgresql+pg8000://:@:/\n", - "```\n", - "3. To migrate tables, use `covalent db migrate` to create the required tables in the mentioned database.\n", - "4. Then start covalent using `covalent start`. Now, the covalent server points to the new database.\n", - "5. Import the Covalent and the trigger." + "1. Install the recommended SQL drivers that support SQLAlchemy.\n", + "2. Make sure a user with the name `postgres` exists in your PostgreSQL database (you can run `createuser postgres` command for that).\n", + "3. Create a database called `aqdb` (you can run `createdb aqdb` command for this).\n", + "(both the commands mentioned above come installed as part of PostgreSQL installation as tested in macOS `postgres` installation using homebrew)\n", + "5. Import the Covalent and the DatabaseTrigger." ] }, { @@ -48,24 +45,24 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-04 08:34:30,374 INFO sqlalchemy.engine.Engine select pg_catalog.version()\n", - "2023-10-04 08:34:30,377 INFO sqlalchemy.engine.Engine [raw sql] ()\n", - "2023-10-04 08:34:30,385 INFO sqlalchemy.engine.Engine select current_schema()\n", - "2023-10-04 08:34:30,389 INFO sqlalchemy.engine.Engine [raw sql] ()\n", - "2023-10-04 08:34:30,391 INFO sqlalchemy.engine.Engine show standard_conforming_strings\n", - "2023-10-04 08:34:30,392 INFO sqlalchemy.engine.Engine [raw sql] ()\n", - "2023-10-04 08:34:30,397 INFO sqlalchemy.engine.Engine BEGIN (implicit)\n", - "2023-10-04 08:34:30,405 INFO sqlalchemy.engine.Engine select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%s\n", - "2023-10-04 08:34:30,406 INFO sqlalchemy.engine.Engine [generated in 0.00120s] ('test_db_trigger',)\n", - "2023-10-04 08:34:30,410 INFO sqlalchemy.engine.Engine \n", + "2024-01-07 17:34:25,040 INFO sqlalchemy.engine.Engine select pg_catalog.version()\n", + "2024-01-07 17:34:25,041 INFO sqlalchemy.engine.Engine [raw sql] ()\n", + "2024-01-07 17:34:25,042 INFO sqlalchemy.engine.Engine select current_schema()\n", + "2024-01-07 17:34:25,042 INFO sqlalchemy.engine.Engine [raw sql] ()\n", + "2024-01-07 17:34:25,043 INFO sqlalchemy.engine.Engine show standard_conforming_strings\n", + "2024-01-07 17:34:25,043 INFO sqlalchemy.engine.Engine [raw sql] ()\n", + "2024-01-07 17:34:25,044 INFO sqlalchemy.engine.Engine BEGIN (implicit)\n", + "2024-01-07 17:34:25,044 INFO sqlalchemy.engine.Engine select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%s\n", + "2024-01-07 17:34:25,045 INFO sqlalchemy.engine.Engine [generated in 0.00025s] ('test_db_trigger',)\n", + "2024-01-07 17:34:25,046 INFO sqlalchemy.engine.Engine \n", "CREATE TABLE test_db_trigger (\n", "\ttrigger_at TIMESTAMP WITHOUT TIME ZONE NOT NULL, \n", "\tPRIMARY KEY (trigger_at)\n", ")\n", "\n", "\n", - "2023-10-04 08:34:30,411 INFO sqlalchemy.engine.Engine [no key 0.00107s] ()\n", - "2023-10-04 08:34:30,448 INFO sqlalchemy.engine.Engine COMMIT\n" + "2024-01-07 17:34:25,046 INFO sqlalchemy.engine.Engine [no key 0.00021s] ()\n", + "2024-01-07 17:34:25,049 INFO sqlalchemy.engine.Engine COMMIT\n" ] } ], @@ -102,17 +99,17 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-04 08:34:33,407 INFO sqlalchemy.engine.Engine INSERT INTO test_db_trigger (trigger_at) VALUES (%s)\n", - "2023-10-04 08:34:33,409 INFO sqlalchemy.engine.Engine [generated in 0.00208s] ((datetime.datetime(2023, 10, 4, 14, 4, 33, 406624),), (datetime.datetime(2023, 10, 4, 14, 4, 33, 406636),), (datetime.datetime(2023, 10, 4, 14, 4, 33, 406638),), (datetime.datetime(2023, 10, 4, 14, 4, 33, 406639),), (datetime.datetime(2023, 10, 4, 14, 4, 33, 406641),), (datetime.datetime(2023, 10, 4, 14, 4, 33, 406643),), (datetime.datetime(2023, 10, 4, 14, 4, 33, 406645),), (datetime.datetime(2023, 10, 4, 14, 4, 33, 406646),), (datetime.datetime(2023, 10, 4, 14, 4, 33, 406648),), (datetime.datetime(2023, 10, 4, 14, 4, 33, 406650),))\n", - "2023-10-04 08:34:33,423 INFO sqlalchemy.engine.Engine COMMIT\n" + "2024-01-07 17:34:28,071 INFO sqlalchemy.engine.Engine INSERT INTO test_db_trigger (trigger_at) VALUES (%s)\n", + "2024-01-07 17:34:28,071 INFO sqlalchemy.engine.Engine [generated in 0.00094s] ((datetime.datetime(2024, 1, 7, 12, 34, 27, 33553),), (datetime.datetime(2024, 1, 7, 12, 34, 27, 138484),), (datetime.datetime(2024, 1, 7, 12, 34, 27, 243426),), (datetime.datetime(2024, 1, 7, 12, 34, 27, 348190),), (datetime.datetime(2024, 1, 7, 12, 34, 27, 453000),), (datetime.datetime(2024, 1, 7, 12, 34, 27, 555778),), (datetime.datetime(2024, 1, 7, 12, 34, 27, 655854),), (datetime.datetime(2024, 1, 7, 12, 34, 27, 760891),), (datetime.datetime(2024, 1, 7, 12, 34, 27, 862814),), (datetime.datetime(2024, 1, 7, 12, 34, 27, 965930),))\n", + "2024-01-07 17:34:28,079 INFO sqlalchemy.engine.Engine COMMIT\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "/tmp/ipykernel_146652/3174457459.py:6: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to \"sqlalchemy<2.0\". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)\n", - " result = conn.execute(insert(test_db_trigger),[*values])#{\"trigger_at\": trigger_at}\n" + "/var/folders/1z/64_91wwj46ng1xjffddgz_n40000gn/T/ipykernel_2625/3058673604.py:11: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to \"sqlalchemy<2.0\". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)\n", + " result = conn.execute(insert(test_db_trigger),[*values])\n" ] } ], @@ -120,8 +117,13 @@ "# load sample data.\n", "from sqlalchemy import insert\n", "from datetime import datetime\n", + "import time\n", + "\n", "with engine.connect() as conn:\n", - " values = [{\"trigger_at\": datetime.now()} for _ in range(10)]\n", + " values = []\n", + " for _ in range(10):\n", + " values.append({\"trigger_at\": datetime.now()})\n", + " time.sleep(0.1)\n", " result = conn.execute(insert(test_db_trigger),[*values])" ] }, @@ -179,7 +181,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "de35492d-4f51-473e-b814-ad203939f85a\n" + "a7a74b5e-e865-430e-9a6c-258e8c51d0ed\n" ] } ], @@ -227,21 +229,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "[2023-10-04 08:36:10,622] [DEBUG] local.py: Line 334 in stop_triggers: Triggers for following dispatch_ids have stopped observing:\n", - "[2023-10-04 08:36:10,627] [DEBUG] local.py: Line 336 in stop_triggers: de35492d-4f51-473e-b814-ad203939f85a\n", - "2023-10-04 08:36:10,630 INFO sqlalchemy.engine.Engine BEGIN (implicit)\n", - "2023-10-04 08:36:10,633 INFO sqlalchemy.engine.Engine select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%s\n", - "2023-10-04 08:36:10,637 INFO sqlalchemy.engine.Engine [cached since 100.2s ago] ('test_db_trigger',)\n", - "2023-10-04 08:36:10,643 INFO sqlalchemy.engine.Engine \n", + "2024-01-07 17:35:51,633 INFO sqlalchemy.engine.Engine BEGIN (implicit)\n", + "2024-01-07 17:35:51,633 INFO sqlalchemy.engine.Engine select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%s\n", + "2024-01-07 17:35:51,634 INFO sqlalchemy.engine.Engine [cached since 86.59s ago] ('test_db_trigger',)\n", + "2024-01-07 17:35:51,635 INFO sqlalchemy.engine.Engine \n", "DROP TABLE test_db_trigger\n", - "2023-10-04 08:36:10,645 INFO sqlalchemy.engine.Engine [no key 0.00186s] ()\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-04 08:36:11,073 INFO sqlalchemy.engine.Engine COMMIT\n" + "2024-01-07 17:35:51,635 INFO sqlalchemy.engine.Engine [no key 0.00026s] ()\n", + "2024-01-07 17:35:51,698 INFO sqlalchemy.engine.Engine COMMIT\n" ] } ], @@ -271,13 +265,6 @@ "source": [ "###### " ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -296,7 +283,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.17" + "version": "3.8.18" }, "vscode": { "interpreter": { diff --git a/doc/source/how_to/execution/trigger_dir.ipynb b/doc/source/how_to/execution/trigger_dir.ipynb index 15dffc437..f01af9b54 100644 --- a/doc/source/how_to/execution/trigger_dir.ipynb +++ b/doc/source/how_to/execution/trigger_dir.ipynb @@ -143,13 +143,6 @@ "\n", "[Adding a SQLite Trigger to a Lattice](./trigger_sqlite.ipynb)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { From d8fefaf3b42444a59f5c1f33530e9111ee50ec18 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Sun, 7 Jan 2024 13:23:30 -0500 Subject: [PATCH 09/19] updated changelog --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3dd56fd9..bcc6047fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] +### Changed + +- Updated RTD notebooks to fix their behavior + +### Removed + +- Removed unused file transfer how to guides + ## [0.233.0-rc.0] - 2024-01-07 ### Authors @@ -43,7 +51,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Reduced number of assets to upload when submitting a dispatch. - Handled RecursionError on get results for a long running workflow. - Fixed functional tests. -- Fixed file transfer how to guides. ### Operations From 8683e6843c9554e3059f1e96647447366c0ddad4 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Sun, 7 Jan 2024 13:49:34 -0500 Subject: [PATCH 10/19] updated dynamic quantum chemistry tutorial --- .../requirements.txt | 2 +- .../dynamic_quantum_chemistry/source.ipynb | 519 +++++++++--------- 2 files changed, 261 insertions(+), 260 deletions(-) diff --git a/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/requirements.txt b/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/requirements.txt index dafc1665c..6a986e5b3 100644 --- a/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/requirements.txt +++ b/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/requirements.txt @@ -1,2 +1,2 @@ covalent -pymatgen[relaxation]==2023.5.10 +pymatgen[relaxation]==2023.9.25 diff --git a/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/source.ipynb b/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/source.ipynb index 34af156e9..e0722a5ff 100644 --- a/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/source.ipynb +++ b/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/source.ipynb @@ -7,6 +7,8 @@ "source": [ "# Dynamic Quantum Chemistry Workflow \n", "\n", + "NOTE: Make sure to use Python 3.9 or higher for this, `pymatgen` package does not support Python 3.8 or lower.\n", + "\n", "In this tutorial, we discuss how _covalent_ can be used to construct and manage dynamic workflows that are common in quantum-chemical simulations. In this example, given a crystal structure, we seek to do the following:\n", "\n", "1. Relax the atomic positions and cell volume for the structure (i.e. find the local minimum energy configuration).\n", @@ -34,7 +36,7 @@ "output_type": "stream", "text": [ "covalent\n", - "pymatgen[relaxation]==2023.5.10\n" + "pymatgen[relaxation]==2023.9.25\n" ] } ], @@ -60,7 +62,6 @@ "source": [ "import covalent as ct\n", "\n", - "from subprocess import Popen\n", "from pymatgen.core import Structure\n", "from pymatgen.core.surface import generate_all_slabs" ] @@ -82,12 +83,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "Covalent server has started at http://localhost:48008\n" + "Covalent server is already running.\n" ] } ], "source": [ - "sts = Popen(\"covalent start\", shell=True).wait()" + "ct.covalent_start()" ] }, { @@ -168,7 +169,7 @@ "metadata": {}, "outputs": [], "source": [ - "@ct.lattice(executor=\"local\")\n", + "@ct.lattice\n", "def workflow(structure):\n", " relaxed_structure = relax_structure(structure)\n", " slabs = carve_slabs(relaxed_structure)\n", @@ -258,96 +259,96 @@ "status: COMPLETED\n", "result: [Structure Summary\n", "Lattice\n", - " abc : 3.012274887854692 3.0122748878546917 30.122748878546922\n", - " angles : 120.00000000000001 120.00000000000001 60.00000000000001\n", - " volume : 193.27193999999986\n", - " A : 2.6087065760640837 0.0 -1.5061374439273467\n", - " B : 0.8695688586880268 2.459512146747805 -1.5061374439273467\n", + " abc : 3.012274887854692 3.012274887854692 30.122748878546922\n", + " angles : 120.00000000000001 120.00000000000001 59.99999999999999\n", + " volume : 193.27193999999994\n", + " A : 2.608706576064084 0.0 -1.5061374439273467\n", + " B : 0.8695688586880276 2.4595121467478056 -1.5061374439273467\n", " C : 0.0 0.0 30.122748878546922\n", " pbc : True True True\n", - "PeriodicSite: Mg (-0.0808, -0.0571, 2.1193) [-0.0232, -0.0232, 0.0680]\n", - "PeriodicSite: O (1.8010, 1.2735, -0.6459) [0.5178, 0.5178, 0.0303]\n", - "PeriodicSite: Mg (-0.0401, -0.0284, 5.2020) [-0.0115, -0.0115, 0.1715]\n", - "PeriodicSite: O (1.7790, 1.2579, 2.3282) [0.5114, 0.5114, 0.1284]\n", - "PeriodicSite: Mg (-0.0392, -0.0277, 8.2159) [-0.0113, -0.0113, 0.2716]\n", - "PeriodicSite: O (1.7778, 1.2571, 5.3384) [0.5111, 0.5111, 0.2283]\n", - "PeriodicSite: Mg (-0.0320, -0.0226, 11.2406) [-0.0092, -0.0092, 0.3722]\n", - "PeriodicSite: O (1.7829, 1.2607, 8.3596) [0.5126, 0.5126, 0.3288]\n", - "PeriodicSite: Mg (-0.0059, -0.0042, 14.2980) [-0.0017, -0.0017, 0.4745]\n", - "PeriodicSite: O (1.7529, 1.2395, 11.3199) [0.5040, 0.5040, 0.4262], Structure Summary\n", + "PeriodicSite: Mg (-0.06335, -0.04479, 2.149) [-0.01821, -0.01821, 0.06954]\n", + "PeriodicSite: O (1.804, 1.275, -0.6412) [0.5186, 0.5186, 0.03057]\n", + "PeriodicSite: Mg (-0.04308, -0.03047, 5.197) [-0.01239, -0.01239, 0.1713]\n", + "PeriodicSite: O (1.762, 1.246, 2.298) [0.5064, 0.5064, 0.1269]\n", + "PeriodicSite: Mg (-0.03833, -0.0271, 8.217) [-0.01102, -0.01102, 0.2717]\n", + "PeriodicSite: O (1.776, 1.255, 5.335) [0.5105, 0.5105, 0.2281]\n", + "PeriodicSite: Mg (-0.03796, -0.02684, 11.23) [-0.01091, -0.01091, 0.3717]\n", + "PeriodicSite: O (1.788, 1.265, 8.369) [0.5141, 0.5141, 0.3292]\n", + "PeriodicSite: Mg (-0.01275, -0.009017, 14.29) [-0.003666, -0.003666, 0.4739]\n", + "PeriodicSite: O (1.762, 1.246, 11.34) [0.5066, 0.5066, 0.427], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 3.012274887854692 30.122748878546922\n", - " angles : 120.00000000000001 60.00000000000001 90.0\n", + " angles : 120.00000000000001 59.99999999999999 90.0\n", " volume : 193.2719399999999\n", - " A : 2.6087065760640846 0.0 1.5061374439273456\n", - " B : 0.8695688586880286 2.4595121467478047 -1.5061374439273467\n", + " A : 2.608706576064084 0.0 1.5061374439273465\n", + " B : 0.8695688586880287 2.459512146747805 -1.5061374439273467\n", " C : 0.0 0.0 30.122748878546922\n", " pbc : True True True\n", - "PeriodicSite: Mg (-0.0015, 0.0021, 1.5088) [-0.0009, 0.0009, 0.0502]\n", - "PeriodicSite: O (1.7403, 1.2281, 1.5042) [0.5007, 0.4993, 0.0499]\n", - "PeriodicSite: Mg (0.0016, -0.0022, 4.5157) [0.0009, -0.0009, 0.1498]\n", - "PeriodicSite: O (1.7373, 1.2323, 4.5215) [0.4990, 0.5010, 0.1502]\n", - "PeriodicSite: Mg (0.0000, -0.0000, 7.5307) [0.0000, -0.0000, 0.2500]\n", - "PeriodicSite: O (1.7391, 1.2298, 7.5307) [0.5000, 0.5000, 0.2500]\n", - "PeriodicSite: Mg (-0.0016, 0.0022, 10.5457) [-0.0009, 0.0009, 0.3502]\n", - "PeriodicSite: O (1.7409, 1.2272, 10.5399) [0.5010, 0.4990, 0.3498]\n", - "PeriodicSite: Mg (0.0015, -0.0021, 13.5526) [0.0009, -0.0009, 0.4498]\n", - "PeriodicSite: O (1.7380, 1.2314, 13.5572) [0.4993, 0.5007, 0.4501], Structure Summary\n", + "PeriodicSite: Mg (-0.003667, 0.005186, 1.512) [-0.002108, 0.002108, 0.05042]\n", + "PeriodicSite: O (1.742, 1.226, 1.502) [0.5015, 0.4985, 0.0497]\n", + "PeriodicSite: Mg (0.004204, -0.005944, 4.511) [0.002417, -0.002417, 0.1495]\n", + "PeriodicSite: O (1.737, 1.233, 4.523) [0.4985, 0.5015, 0.1503]\n", + "PeriodicSite: Mg (-2.373e-07, 1.452e-07, 7.531) [-1.106e-07, 5.904e-08, 0.25]\n", + "PeriodicSite: O (1.739, 1.23, 7.531) [0.5, 0.5, 0.25]\n", + "PeriodicSite: Mg (-0.004206, 0.005949, 10.55) [-0.002419, 0.002419, 0.3505]\n", + "PeriodicSite: O (1.742, 1.226, 10.54) [0.5015, 0.4985, 0.3497]\n", + "PeriodicSite: Mg (0.003665, -0.005183, 13.55) [0.002107, -0.002107, 0.4496]\n", + "PeriodicSite: O (1.737, 1.233, 13.56) [0.4985, 0.5015, 0.4503], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 5.217413152128169 48.196398205675074\n", - " angles : 30.000000000000014 60.00000000000002 73.22134511903965\n", + " angles : 30.000000000000014 59.99999999999999 73.22134511903964\n", " volume : 309.2351039999999\n", - " A : 2.6087065760640846 0.0 1.5061374439273456\n", + " A : 2.608706576064084 0.0 1.5061374439273465\n", " B : -0.869568858688028 2.4595121467478056 4.518412331782038\n", " C : 0.0 0.0 48.196398205675074\n", " pbc : True True True\n", - "PeriodicSite: Mg (0.0262, 0.0105, 2.2139) [0.0114, 0.0042, 0.0452]\n", - "PeriodicSite: O (0.9825, 1.0539, 3.5697) [0.5195, 0.4285, 0.0177]\n", - "PeriodicSite: Mg (0.0662, 0.2336, 5.1568) [0.0571, 0.0950, 0.0963]\n", - "PeriodicSite: O (0.8459, 1.1867, 6.8186) [0.4851, 0.4825, 0.0811]\n", - "PeriodicSite: Mg (0.0133, 0.0507, 8.2607) [0.0120, 0.0206, 0.1691]\n", - "PeriodicSite: O (0.8496, 1.1727, 9.8246) [0.4846, 0.4768, 0.1440]\n", - "PeriodicSite: Mg (0.0086, 0.0959, 11.2811) [0.0163, 0.0390, 0.2299]\n", - "PeriodicSite: O (0.8389, 1.1668, 12.8553) [0.4797, 0.4744, 0.2073]\n", - "PeriodicSite: Mg (0.0091, 0.0613, 14.2926) [0.0118, 0.0249, 0.2938]\n", - "PeriodicSite: O (0.8384, 1.1314, 15.8685) [0.4747, 0.4600, 0.2713]\n", - "PeriodicSite: Mg (0.0019, 0.0338, 17.3173) [0.0053, 0.0137, 0.3579]\n", - "PeriodicSite: O (0.8477, 1.1616, 18.8647) [0.4824, 0.4723, 0.3321]\n", - "PeriodicSite: Mg (0.0237, 0.0330, 20.2919) [0.0135, 0.0134, 0.4193]\n", - "PeriodicSite: O (0.8368, 1.0796, 21.8957) [0.4671, 0.4390, 0.3986]\n", - "PeriodicSite: Mg (-0.0806, 0.1485, 23.4847) [-0.0108, 0.0604, 0.4819]\n", - "PeriodicSite: O (0.8484, 1.2181, 24.8879) [0.4903, 0.4953, 0.4546], Structure Summary\n", + "PeriodicSite: Mg (0.1339, -0.01997, 2.027) [0.04861, -0.008121, 0.04131]\n", + "PeriodicSite: O (1.084, 1.0, 3.395) [0.5509, 0.4068, 0.01508]\n", + "PeriodicSite: Mg (0.1856, 0.2225, 4.95) [0.1013, 0.09047, 0.09106]\n", + "PeriodicSite: O (0.9559, 1.166, 6.628) [0.5245, 0.4742, 0.07668]\n", + "PeriodicSite: Mg (0.09665, 0.08853, 8.116) [0.04905, 0.036, 0.1635]\n", + "PeriodicSite: O (0.9216, 1.175, 9.7) [0.5125, 0.4777, 0.1405]\n", + "PeriodicSite: Mg (0.04673, 0.1156, 11.22) [0.03359, 0.04702, 0.2272]\n", + "PeriodicSite: O (0.8436, 1.125, 12.85) [0.4758, 0.4574, 0.2088]\n", + "PeriodicSite: Mg (-0.005373, 0.07126, 14.32) [0.007599, 0.02897, 0.2941]\n", + "PeriodicSite: O (0.7974, 1.125, 15.94) [0.4581, 0.4574, 0.2735]\n", + "PeriodicSite: Mg (-0.06382, 0.06227, 17.43) [-0.01603, 0.02532, 0.3598]\n", + "PeriodicSite: O (0.7609, 1.136, 19.01) [0.4456, 0.4618, 0.3373]\n", + "PeriodicSite: Mg (-0.07782, 0.05423, 20.47) [-0.02248, 0.02205, 0.4233]\n", + "PeriodicSite: O (0.7283, 1.092, 22.08) [0.4271, 0.4439, 0.4032]\n", + "PeriodicSite: Mg (-0.1775, 0.196, 23.65) [-0.04147, 0.07969, 0.4846]\n", + "PeriodicSite: O (0.727, 1.229, 25.1) [0.4452, 0.4996, 0.46], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 5.217413152128169 42.17184842996569\n", - " angles : 29.999999999999964 59.999999999999986 54.735610317245346\n", + " angles : 29.99999999999997 59.999999999999986 54.735610317245346\n", " volume : 270.58071599999977\n", " A : 2.608706576064084 0.0 1.5061374439273465\n", " B : 0.8695688586880266 2.4595121467478043 4.51841233178204\n", " C : 0.0 0.0 42.17184842996569\n", " pbc : True True True\n", - "PeriodicSite: Mg (-0.0254, -0.0718, 1.5501) [0.0000, -0.0292, 0.0399]\n", - "PeriodicSite: O (1.7306, 1.2057, 4.5332) [0.5000, 0.4902, 0.0371]\n", - "PeriodicSite: Mg (0.0279, 0.0790, 4.4700) [0.0000, 0.0321, 0.1026]\n", - "PeriodicSite: O (1.7433, 1.2415, 7.5235) [0.5000, 0.5048, 0.1065]\n", - "PeriodicSite: Mg (-0.0041, -0.0115, 7.5377) [0.0000, -0.0047, 0.1792]\n", - "PeriodicSite: O (1.7393, 1.2301, 10.5427) [0.5000, 0.5002, 0.1785]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 10.5430) [0.0000, 0.0000, 0.2500]\n", - "PeriodicSite: O (1.7391, 1.2298, 13.5552) [0.5000, 0.5000, 0.2500]\n", - "PeriodicSite: Mg (0.0041, 0.0115, 13.5482) [0.0000, 0.0047, 0.3208]\n", - "PeriodicSite: O (1.7390, 1.2294, 16.5678) [0.5000, 0.4998, 0.3215]\n", - "PeriodicSite: Mg (-0.0279, -0.0790, 16.6159) [0.0000, -0.0321, 0.3974]\n", - "PeriodicSite: O (1.7350, 1.2180, 19.5870) [0.5000, 0.4952, 0.3935]\n", - "PeriodicSite: Mg (0.0254, 0.0718, 19.5358) [-0.0000, 0.0292, 0.4601]\n", - "PeriodicSite: O (1.7477, 1.2539, 22.5773) [0.5000, 0.5098, 0.4629]]\n", - "input args: ['Full Formula (Mg1 O1)\\nReduced Formula: MgO\\nabc : 3.012275 3.012275 3.012275\\nangles: 60.000000 60.000000 60.000000\\npbc : True True True\\nSites (2)\\n # SP a b c\\n--- ---- --- --- ---\\n 0 Mg 0 0 0\\n 1 O 0.5 0.5 0.5']\n", - "input kwargs: {}\n", + "PeriodicSite: Mg (-0.02746, -0.07768, 1.554) [2.276e-07, -0.03158, 0.04023]\n", + "PeriodicSite: O (1.734, 1.216, 4.527) [0.5, 0.4945, 0.0365]\n", + "PeriodicSite: Mg (0.02554, 0.07223, 4.474) [1.088e-06, 0.02937, 0.1029]\n", + "PeriodicSite: O (1.746, 1.25, 7.518) [0.5, 0.5081, 0.106]\n", + "PeriodicSite: Mg (0.004413, 0.01248, 7.523) [1.247e-07, 0.005074, 0.1778]\n", + "PeriodicSite: O (1.736, 1.22, 10.55) [0.5, 0.4962, 0.1791]\n", + "PeriodicSite: Mg (5.245e-07, 2.488e-06, 10.54) [-1.362e-07, 1.012e-06, 0.25]\n", + "PeriodicSite: O (1.739, 1.23, 13.56) [0.5, 0.5, 0.25]\n", + "PeriodicSite: Mg (-0.004412, -0.01248, 13.56) [-5.311e-08, -0.005073, 0.3222]\n", + "PeriodicSite: O (1.742, 1.239, 16.56) [0.5, 0.5038, 0.3209]\n", + "PeriodicSite: Mg (-0.02554, -0.07224, 16.61) [-3.741e-08, -0.02937, 0.3971]\n", + "PeriodicSite: O (1.732, 1.21, 19.59) [0.5, 0.4919, 0.394]\n", + "PeriodicSite: Mg (0.02746, 0.07767, 19.53) [-2.13e-08, 0.03158, 0.4598]\n", + "PeriodicSite: O (1.744, 1.243, 22.58) [0.5, 0.5055, 0.4635]]\n", + "input args: None\n", + "input kwargs: None\n", "error: None\n", "\n", - "start_time: 2023-05-15 22:45:11.634086\n", - "end_time: 2023-05-15 22:46:21.630720\n", + "start_time: 2024-01-07 18:47:40.318085\n", + "end_time: 2024-01-07 18:47:50.077092\n", "\n", - "results_dir: /home/rosen/.local/share/covalent/data\n", - "dispatch_id: 190be75f-a9b0-431d-a7de-fea489b3b5d2\n", + "results_dir: /Users/neptune/.cache/covalent/results/0de284ad-fecb-4c76-ba03-c4dd8d8b3103\n", + "dispatch_id: 0de284ad-fecb-4c76-ba03-c4dd8d8b3103\n", "\n", "Node Outputs\n", "------------\n", @@ -382,255 +383,255 @@ " 1 O 0.5 0.5 0.5\n", "carve_slabs(2): [Structure Summary\n", "Lattice\n", - " abc : 3.012274887854692 3.0122748878546917 30.122748878546922\n", - " angles : 120.00000000000001 120.00000000000001 60.00000000000001\n", - " volume : 193.27193999999986\n", - " A : 2.6087065760640837 0.0 -1.5061374439273467\n", - " B : 0.8695688586880268 2.459512146747805 -1.5061374439273467\n", + " abc : 3.012274887854692 3.012274887854692 30.122748878546922\n", + " angles : 120.00000000000001 120.00000000000001 59.99999999999999\n", + " volume : 193.27193999999994\n", + " A : 2.608706576064084 0.0 -1.5061374439273467\n", + " B : 0.8695688586880276 2.4595121467478056 -1.5061374439273467\n", " C : 0.0 0.0 30.122748878546922\n", " pbc : True True True\n", - "PeriodicSite: Mg (0.0000, 0.0000, 2.2592) [0.0000, 0.0000, 0.0750]\n", - "PeriodicSite: O (1.7391, 1.2298, -0.7531) [0.5000, 0.5000, 0.0250]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 5.2715) [0.0000, 0.0000, 0.1750]\n", - "PeriodicSite: O (1.7391, 1.2298, 2.2592) [0.5000, 0.5000, 0.1250]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 8.2838) [0.0000, 0.0000, 0.2750]\n", - "PeriodicSite: O (1.7391, 1.2298, 5.2715) [0.5000, 0.5000, 0.2250]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 11.2960) [0.0000, 0.0000, 0.3750]\n", - "PeriodicSite: O (1.7391, 1.2298, 8.2838) [0.5000, 0.5000, 0.3250]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 14.3083) [0.0000, 0.0000, 0.4750]\n", - "PeriodicSite: O (1.7391, 1.2298, 11.2960) [0.5000, 0.5000, 0.4250], Structure Summary\n", + "PeriodicSite: Mg (0.0, 0.0, 2.259) [0.0, 0.0, 0.075]\n", + "PeriodicSite: O (1.739, 1.23, -0.7531) [0.5, 0.5, 0.025]\n", + "PeriodicSite: Mg (0.0, 0.0, 5.271) [0.0, 0.0, 0.175]\n", + "PeriodicSite: O (1.739, 1.23, 2.259) [0.5, 0.5, 0.125]\n", + "PeriodicSite: Mg (0.0, 0.0, 8.284) [0.0, 0.0, 0.275]\n", + "PeriodicSite: O (1.739, 1.23, 5.271) [0.5, 0.5, 0.225]\n", + "PeriodicSite: Mg (0.0, 0.0, 11.3) [0.0, 0.0, 0.375]\n", + "PeriodicSite: O (1.739, 1.23, 8.284) [0.5, 0.5, 0.325]\n", + "PeriodicSite: Mg (0.0, 0.0, 14.31) [0.0, 0.0, 0.475]\n", + "PeriodicSite: O (1.739, 1.23, 11.3) [0.5, 0.5, 0.425], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 3.012274887854692 30.122748878546922\n", - " angles : 120.00000000000001 60.00000000000001 90.0\n", + " angles : 120.00000000000001 59.99999999999999 90.0\n", " volume : 193.2719399999999\n", - " A : 2.6087065760640846 0.0 1.5061374439273456\n", - " B : 0.8695688586880286 2.4595121467478047 -1.5061374439273467\n", + " A : 2.608706576064084 0.0 1.5061374439273465\n", + " B : 0.8695688586880287 2.459512146747805 -1.5061374439273467\n", " C : 0.0 0.0 30.122748878546922\n", " pbc : True True True\n", - "PeriodicSite: Mg (0.0000, 0.0000, 1.5061) [0.0000, 0.0000, 0.0500]\n", - "PeriodicSite: O (1.7391, 1.2298, 1.5061) [0.5000, 0.5000, 0.0500]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 4.5184) [0.0000, 0.0000, 0.1500]\n", - "PeriodicSite: O (1.7391, 1.2298, 4.5184) [0.5000, 0.5000, 0.1500]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 7.5307) [0.0000, 0.0000, 0.2500]\n", - "PeriodicSite: O (1.7391, 1.2298, 7.5307) [0.5000, 0.5000, 0.2500]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 10.5430) [0.0000, 0.0000, 0.3500]\n", - "PeriodicSite: O (1.7391, 1.2298, 10.5430) [0.5000, 0.5000, 0.3500]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 13.5552) [0.0000, 0.0000, 0.4500]\n", - "PeriodicSite: O (1.7391, 1.2298, 13.5552) [0.5000, 0.5000, 0.4500], Structure Summary\n", + "PeriodicSite: Mg (0.0, 0.0, 1.506) [0.0, 0.0, 0.05]\n", + "PeriodicSite: O (1.739, 1.23, 1.506) [0.5, 0.5, 0.05]\n", + "PeriodicSite: Mg (0.0, 0.0, 4.518) [0.0, 0.0, 0.15]\n", + "PeriodicSite: O (1.739, 1.23, 4.518) [0.5, 0.5, 0.15]\n", + "PeriodicSite: Mg (0.0, 0.0, 7.531) [0.0, 0.0, 0.25]\n", + "PeriodicSite: O (1.739, 1.23, 7.531) [0.5, 0.5, 0.25]\n", + "PeriodicSite: Mg (0.0, 0.0, 10.54) [0.0, 0.0, 0.35]\n", + "PeriodicSite: O (1.739, 1.23, 10.54) [0.5, 0.5, 0.35]\n", + "PeriodicSite: Mg (0.0, 0.0, 13.56) [0.0, 0.0, 0.45]\n", + "PeriodicSite: O (1.739, 1.23, 13.56) [0.5, 0.5, 0.45], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 5.217413152128169 48.196398205675074\n", - " angles : 30.000000000000014 60.00000000000002 73.22134511903965\n", + " angles : 30.000000000000014 59.99999999999999 73.22134511903964\n", " volume : 309.2351039999999\n", - " A : 2.6087065760640846 0.0 1.5061374439273456\n", + " A : 2.608706576064084 0.0 1.5061374439273465\n", " B : -0.869568858688028 2.4595121467478056 4.518412331782038\n", " C : 0.0 0.0 48.196398205675074\n", " pbc : True True True\n", - "PeriodicSite: Mg (0.0000, 0.0000, 2.2592) [0.0000, 0.0000, 0.0469]\n", - "PeriodicSite: O (0.8696, 1.2298, 3.7653) [0.5000, 0.5000, 0.0156]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 5.2715) [0.0000, 0.0000, 0.1094]\n", - "PeriodicSite: O (0.8696, 1.2298, 6.7776) [0.5000, 0.5000, 0.0781]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 8.2838) [0.0000, 0.0000, 0.1719]\n", - "PeriodicSite: O (0.8696, 1.2298, 9.7899) [0.5000, 0.5000, 0.1406]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 11.2960) [0.0000, 0.0000, 0.2344]\n", - "PeriodicSite: O (0.8696, 1.2298, 12.8022) [0.5000, 0.5000, 0.2031]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 14.3083) [0.0000, 0.0000, 0.2969]\n", - "PeriodicSite: O (0.8696, 1.2298, 15.8144) [0.5000, 0.5000, 0.2656]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 17.3206) [0.0000, 0.0000, 0.3594]\n", - "PeriodicSite: O (0.8696, 1.2298, 18.8267) [0.5000, 0.5000, 0.3281]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 20.3329) [0.0000, 0.0000, 0.4219]\n", - "PeriodicSite: O (0.8696, 1.2298, 21.8390) [0.5000, 0.5000, 0.3906]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 23.3451) [0.0000, 0.0000, 0.4844]\n", - "PeriodicSite: O (0.8696, 1.2298, 24.8513) [0.5000, 0.5000, 0.4531], Structure Summary\n", + "PeriodicSite: Mg (0.0, 0.0, 2.259) [0.0, 0.0, 0.04688]\n", + "PeriodicSite: O (0.8696, 1.23, 3.765) [0.5, 0.5, 0.01562]\n", + "PeriodicSite: Mg (0.0, 0.0, 5.271) [0.0, 0.0, 0.1094]\n", + "PeriodicSite: O (0.8696, 1.23, 6.778) [0.5, 0.5, 0.07812]\n", + "PeriodicSite: Mg (0.0, 0.0, 8.284) [0.0, 0.0, 0.1719]\n", + "PeriodicSite: O (0.8696, 1.23, 9.79) [0.5, 0.5, 0.1406]\n", + "PeriodicSite: Mg (0.0, 0.0, 11.3) [0.0, 0.0, 0.2344]\n", + "PeriodicSite: O (0.8696, 1.23, 12.8) [0.5, 0.5, 0.2031]\n", + "PeriodicSite: Mg (0.0, 0.0, 14.31) [0.0, 0.0, 0.2969]\n", + "PeriodicSite: O (0.8696, 1.23, 15.81) [0.5, 0.5, 0.2656]\n", + "PeriodicSite: Mg (0.0, 0.0, 17.32) [0.0, 0.0, 0.3594]\n", + "PeriodicSite: O (0.8696, 1.23, 18.83) [0.5, 0.5, 0.3281]\n", + "PeriodicSite: Mg (0.0, 0.0, 20.33) [0.0, 0.0, 0.4219]\n", + "PeriodicSite: O (0.8696, 1.23, 21.84) [0.5, 0.5, 0.3906]\n", + "PeriodicSite: Mg (0.0, 0.0, 23.35) [0.0, 0.0, 0.4844]\n", + "PeriodicSite: O (0.8696, 1.23, 24.85) [0.5, 0.5, 0.4531], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 5.217413152128169 42.17184842996569\n", - " angles : 29.999999999999964 59.999999999999986 54.735610317245346\n", + " angles : 29.99999999999997 59.999999999999986 54.735610317245346\n", " volume : 270.58071599999977\n", " A : 2.608706576064084 0.0 1.5061374439273465\n", " B : 0.8695688586880266 2.4595121467478043 4.51841233178204\n", " C : 0.0 0.0 42.17184842996569\n", " pbc : True True True\n", - "PeriodicSite: Mg (0.0000, 0.0000, 1.5061) [0.0000, 0.0000, 0.0357]\n", - "PeriodicSite: O (1.7391, 1.2298, 4.5184) [0.5000, 0.5000, 0.0357]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 4.5184) [0.0000, 0.0000, 0.1071]\n", - "PeriodicSite: O (1.7391, 1.2298, 7.5307) [0.5000, 0.5000, 0.1071]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 7.5307) [0.0000, 0.0000, 0.1786]\n", - "PeriodicSite: O (1.7391, 1.2298, 10.5430) [0.5000, 0.5000, 0.1786]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 10.5430) [0.0000, 0.0000, 0.2500]\n", - "PeriodicSite: O (1.7391, 1.2298, 13.5552) [0.5000, 0.5000, 0.2500]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 13.5552) [0.0000, 0.0000, 0.3214]\n", - "PeriodicSite: O (1.7391, 1.2298, 16.5675) [0.5000, 0.5000, 0.3214]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 16.5675) [0.0000, 0.0000, 0.3929]\n", - "PeriodicSite: O (1.7391, 1.2298, 19.5798) [0.5000, 0.5000, 0.3929]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 19.5798) [0.0000, 0.0000, 0.4643]\n", - "PeriodicSite: O (1.7391, 1.2298, 22.5921) [0.5000, 0.5000, 0.4643]]\n", + "PeriodicSite: Mg (0.0, 0.0, 1.506) [0.0, 0.0, 0.03571]\n", + "PeriodicSite: O (1.739, 1.23, 4.518) [0.5, 0.5, 0.03571]\n", + "PeriodicSite: Mg (0.0, 0.0, 4.518) [0.0, 0.0, 0.1071]\n", + "PeriodicSite: O (1.739, 1.23, 7.531) [0.5, 0.5, 0.1071]\n", + "PeriodicSite: Mg (0.0, 0.0, 7.531) [0.0, 0.0, 0.1786]\n", + "PeriodicSite: O (1.739, 1.23, 10.54) [0.5, 0.5, 0.1786]\n", + "PeriodicSite: Mg (0.0, 0.0, 10.54) [0.0, 0.0, 0.25]\n", + "PeriodicSite: O (1.739, 1.23, 13.56) [0.5, 0.5, 0.25]\n", + "PeriodicSite: Mg (0.0, 0.0, 13.56) [0.0, 0.0, 0.3214]\n", + "PeriodicSite: O (1.739, 1.23, 16.57) [0.5, 0.5, 0.3214]\n", + "PeriodicSite: Mg (0.0, 0.0, 16.57) [0.0, 0.0, 0.3929]\n", + "PeriodicSite: O (1.739, 1.23, 19.58) [0.5, 0.5, 0.3929]\n", + "PeriodicSite: Mg (0.0, 0.0, 19.58) [0.0, 0.0, 0.4643]\n", + "PeriodicSite: O (1.739, 1.23, 22.59) [0.5, 0.5, 0.4643]]\n", ":sublattice:relax_slabs(3): [Structure Summary\n", "Lattice\n", - " abc : 3.012274887854692 3.0122748878546917 30.122748878546922\n", - " angles : 120.00000000000001 120.00000000000001 60.00000000000001\n", - " volume : 193.27193999999986\n", - " A : 2.6087065760640837 0.0 -1.5061374439273467\n", - " B : 0.8695688586880268 2.459512146747805 -1.5061374439273467\n", + " abc : 3.012274887854692 3.012274887854692 30.122748878546922\n", + " angles : 120.00000000000001 120.00000000000001 59.99999999999999\n", + " volume : 193.27193999999994\n", + " A : 2.608706576064084 0.0 -1.5061374439273467\n", + " B : 0.8695688586880276 2.4595121467478056 -1.5061374439273467\n", " C : 0.0 0.0 30.122748878546922\n", " pbc : True True True\n", - "PeriodicSite: Mg (-0.0808, -0.0571, 2.1193) [-0.0232, -0.0232, 0.0680]\n", - "PeriodicSite: O (1.8010, 1.2735, -0.6459) [0.5178, 0.5178, 0.0303]\n", - "PeriodicSite: Mg (-0.0401, -0.0284, 5.2020) [-0.0115, -0.0115, 0.1715]\n", - "PeriodicSite: O (1.7790, 1.2579, 2.3282) [0.5114, 0.5114, 0.1284]\n", - "PeriodicSite: Mg (-0.0392, -0.0277, 8.2159) [-0.0113, -0.0113, 0.2716]\n", - "PeriodicSite: O (1.7778, 1.2571, 5.3384) [0.5111, 0.5111, 0.2283]\n", - "PeriodicSite: Mg (-0.0320, -0.0226, 11.2406) [-0.0092, -0.0092, 0.3722]\n", - "PeriodicSite: O (1.7829, 1.2607, 8.3596) [0.5126, 0.5126, 0.3288]\n", - "PeriodicSite: Mg (-0.0059, -0.0042, 14.2980) [-0.0017, -0.0017, 0.4745]\n", - "PeriodicSite: O (1.7529, 1.2395, 11.3199) [0.5040, 0.5040, 0.4262], Structure Summary\n", + "PeriodicSite: Mg (-0.06335, -0.04479, 2.149) [-0.01821, -0.01821, 0.06954]\n", + "PeriodicSite: O (1.804, 1.275, -0.6412) [0.5186, 0.5186, 0.03057]\n", + "PeriodicSite: Mg (-0.04308, -0.03047, 5.197) [-0.01239, -0.01239, 0.1713]\n", + "PeriodicSite: O (1.762, 1.246, 2.298) [0.5064, 0.5064, 0.1269]\n", + "PeriodicSite: Mg (-0.03833, -0.0271, 8.217) [-0.01102, -0.01102, 0.2717]\n", + "PeriodicSite: O (1.776, 1.255, 5.335) [0.5105, 0.5105, 0.2281]\n", + "PeriodicSite: Mg (-0.03796, -0.02684, 11.23) [-0.01091, -0.01091, 0.3717]\n", + "PeriodicSite: O (1.788, 1.265, 8.369) [0.5141, 0.5141, 0.3292]\n", + "PeriodicSite: Mg (-0.01275, -0.009017, 14.29) [-0.003666, -0.003666, 0.4739]\n", + "PeriodicSite: O (1.762, 1.246, 11.34) [0.5066, 0.5066, 0.427], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 3.012274887854692 30.122748878546922\n", - " angles : 120.00000000000001 60.00000000000001 90.0\n", + " angles : 120.00000000000001 59.99999999999999 90.0\n", " volume : 193.2719399999999\n", - " A : 2.6087065760640846 0.0 1.5061374439273456\n", - " B : 0.8695688586880286 2.4595121467478047 -1.5061374439273467\n", + " A : 2.608706576064084 0.0 1.5061374439273465\n", + " B : 0.8695688586880287 2.459512146747805 -1.5061374439273467\n", " C : 0.0 0.0 30.122748878546922\n", " pbc : True True True\n", - "PeriodicSite: Mg (-0.0015, 0.0021, 1.5088) [-0.0009, 0.0009, 0.0502]\n", - "PeriodicSite: O (1.7403, 1.2281, 1.5042) [0.5007, 0.4993, 0.0499]\n", - "PeriodicSite: Mg (0.0016, -0.0022, 4.5157) [0.0009, -0.0009, 0.1498]\n", - "PeriodicSite: O (1.7373, 1.2323, 4.5215) [0.4990, 0.5010, 0.1502]\n", - "PeriodicSite: Mg (0.0000, -0.0000, 7.5307) [0.0000, -0.0000, 0.2500]\n", - "PeriodicSite: O (1.7391, 1.2298, 7.5307) [0.5000, 0.5000, 0.2500]\n", - "PeriodicSite: Mg (-0.0016, 0.0022, 10.5457) [-0.0009, 0.0009, 0.3502]\n", - "PeriodicSite: O (1.7409, 1.2272, 10.5399) [0.5010, 0.4990, 0.3498]\n", - "PeriodicSite: Mg (0.0015, -0.0021, 13.5526) [0.0009, -0.0009, 0.4498]\n", - "PeriodicSite: O (1.7380, 1.2314, 13.5572) [0.4993, 0.5007, 0.4501], Structure Summary\n", + "PeriodicSite: Mg (-0.003667, 0.005186, 1.512) [-0.002108, 0.002108, 0.05042]\n", + "PeriodicSite: O (1.742, 1.226, 1.502) [0.5015, 0.4985, 0.0497]\n", + "PeriodicSite: Mg (0.004204, -0.005944, 4.511) [0.002417, -0.002417, 0.1495]\n", + "PeriodicSite: O (1.737, 1.233, 4.523) [0.4985, 0.5015, 0.1503]\n", + "PeriodicSite: Mg (-2.373e-07, 1.452e-07, 7.531) [-1.106e-07, 5.904e-08, 0.25]\n", + "PeriodicSite: O (1.739, 1.23, 7.531) [0.5, 0.5, 0.25]\n", + "PeriodicSite: Mg (-0.004206, 0.005949, 10.55) [-0.002419, 0.002419, 0.3505]\n", + "PeriodicSite: O (1.742, 1.226, 10.54) [0.5015, 0.4985, 0.3497]\n", + "PeriodicSite: Mg (0.003665, -0.005183, 13.55) [0.002107, -0.002107, 0.4496]\n", + "PeriodicSite: O (1.737, 1.233, 13.56) [0.4985, 0.5015, 0.4503], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 5.217413152128169 48.196398205675074\n", - " angles : 30.000000000000014 60.00000000000002 73.22134511903965\n", + " angles : 30.000000000000014 59.99999999999999 73.22134511903964\n", " volume : 309.2351039999999\n", - " A : 2.6087065760640846 0.0 1.5061374439273456\n", + " A : 2.608706576064084 0.0 1.5061374439273465\n", " B : -0.869568858688028 2.4595121467478056 4.518412331782038\n", " C : 0.0 0.0 48.196398205675074\n", " pbc : True True True\n", - "PeriodicSite: Mg (0.0262, 0.0105, 2.2139) [0.0114, 0.0042, 0.0452]\n", - "PeriodicSite: O (0.9825, 1.0539, 3.5697) [0.5195, 0.4285, 0.0177]\n", - "PeriodicSite: Mg (0.0662, 0.2336, 5.1568) [0.0571, 0.0950, 0.0963]\n", - "PeriodicSite: O (0.8459, 1.1867, 6.8186) [0.4851, 0.4825, 0.0811]\n", - "PeriodicSite: Mg (0.0133, 0.0507, 8.2607) [0.0120, 0.0206, 0.1691]\n", - "PeriodicSite: O (0.8496, 1.1727, 9.8246) [0.4846, 0.4768, 0.1440]\n", - "PeriodicSite: Mg (0.0086, 0.0959, 11.2811) [0.0163, 0.0390, 0.2299]\n", - "PeriodicSite: O (0.8389, 1.1668, 12.8553) [0.4797, 0.4744, 0.2073]\n", - "PeriodicSite: Mg (0.0091, 0.0613, 14.2926) [0.0118, 0.0249, 0.2938]\n", - "PeriodicSite: O (0.8384, 1.1314, 15.8685) [0.4747, 0.4600, 0.2713]\n", - "PeriodicSite: Mg (0.0019, 0.0338, 17.3173) [0.0053, 0.0137, 0.3579]\n", - "PeriodicSite: O (0.8477, 1.1616, 18.8647) [0.4824, 0.4723, 0.3321]\n", - "PeriodicSite: Mg (0.0237, 0.0330, 20.2919) [0.0135, 0.0134, 0.4193]\n", - "PeriodicSite: O (0.8368, 1.0796, 21.8957) [0.4671, 0.4390, 0.3986]\n", - "PeriodicSite: Mg (-0.0806, 0.1485, 23.4847) [-0.0108, 0.0604, 0.4819]\n", - "PeriodicSite: O (0.8484, 1.2181, 24.8879) [0.4903, 0.4953, 0.4546], Structure Summary\n", + "PeriodicSite: Mg (0.1339, -0.01997, 2.027) [0.04861, -0.008121, 0.04131]\n", + "PeriodicSite: O (1.084, 1.0, 3.395) [0.5509, 0.4068, 0.01508]\n", + "PeriodicSite: Mg (0.1856, 0.2225, 4.95) [0.1013, 0.09047, 0.09106]\n", + "PeriodicSite: O (0.9559, 1.166, 6.628) [0.5245, 0.4742, 0.07668]\n", + "PeriodicSite: Mg (0.09665, 0.08853, 8.116) [0.04905, 0.036, 0.1635]\n", + "PeriodicSite: O (0.9216, 1.175, 9.7) [0.5125, 0.4777, 0.1405]\n", + "PeriodicSite: Mg (0.04673, 0.1156, 11.22) [0.03359, 0.04702, 0.2272]\n", + "PeriodicSite: O (0.8436, 1.125, 12.85) [0.4758, 0.4574, 0.2088]\n", + "PeriodicSite: Mg (-0.005373, 0.07126, 14.32) [0.007599, 0.02897, 0.2941]\n", + "PeriodicSite: O (0.7974, 1.125, 15.94) [0.4581, 0.4574, 0.2735]\n", + "PeriodicSite: Mg (-0.06382, 0.06227, 17.43) [-0.01603, 0.02532, 0.3598]\n", + "PeriodicSite: O (0.7609, 1.136, 19.01) [0.4456, 0.4618, 0.3373]\n", + "PeriodicSite: Mg (-0.07782, 0.05423, 20.47) [-0.02248, 0.02205, 0.4233]\n", + "PeriodicSite: O (0.7283, 1.092, 22.08) [0.4271, 0.4439, 0.4032]\n", + "PeriodicSite: Mg (-0.1775, 0.196, 23.65) [-0.04147, 0.07969, 0.4846]\n", + "PeriodicSite: O (0.727, 1.229, 25.1) [0.4452, 0.4996, 0.46], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 5.217413152128169 42.17184842996569\n", - " angles : 29.999999999999964 59.999999999999986 54.735610317245346\n", + " angles : 29.99999999999997 59.999999999999986 54.735610317245346\n", " volume : 270.58071599999977\n", " A : 2.608706576064084 0.0 1.5061374439273465\n", " B : 0.8695688586880266 2.4595121467478043 4.51841233178204\n", " C : 0.0 0.0 42.17184842996569\n", " pbc : True True True\n", - "PeriodicSite: Mg (-0.0254, -0.0718, 1.5501) [0.0000, -0.0292, 0.0399]\n", - "PeriodicSite: O (1.7306, 1.2057, 4.5332) [0.5000, 0.4902, 0.0371]\n", - "PeriodicSite: Mg (0.0279, 0.0790, 4.4700) [0.0000, 0.0321, 0.1026]\n", - "PeriodicSite: O (1.7433, 1.2415, 7.5235) [0.5000, 0.5048, 0.1065]\n", - "PeriodicSite: Mg (-0.0041, -0.0115, 7.5377) [0.0000, -0.0047, 0.1792]\n", - "PeriodicSite: O (1.7393, 1.2301, 10.5427) [0.5000, 0.5002, 0.1785]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 10.5430) [0.0000, 0.0000, 0.2500]\n", - "PeriodicSite: O (1.7391, 1.2298, 13.5552) [0.5000, 0.5000, 0.2500]\n", - "PeriodicSite: Mg (0.0041, 0.0115, 13.5482) [0.0000, 0.0047, 0.3208]\n", - "PeriodicSite: O (1.7390, 1.2294, 16.5678) [0.5000, 0.4998, 0.3215]\n", - "PeriodicSite: Mg (-0.0279, -0.0790, 16.6159) [0.0000, -0.0321, 0.3974]\n", - "PeriodicSite: O (1.7350, 1.2180, 19.5870) [0.5000, 0.4952, 0.3935]\n", - "PeriodicSite: Mg (0.0254, 0.0718, 19.5358) [-0.0000, 0.0292, 0.4601]\n", - "PeriodicSite: O (1.7477, 1.2539, 22.5773) [0.5000, 0.5098, 0.4629]]\n", - ":parameter:(4): \n", - ":parameter:{\"executor\": \"local\", \"workflow_executor\": \"dask\", \"deps\": {}, \"call_before\": [], \"call_after\": [], \"triggers\": null, \"executor_data\": {}, \"workflow_executor_data\": {}}(5): {\"executor\": \"local\", \"workflow_executor\": \"dask\", \"deps\": {}, \"call_before\": [], \"call_after\": [], \"triggers\": null, \"executor_data\": {}, \"workflow_executor_data\": {}}\n", - ":postprocess:(6): [Structure Summary\n", + "PeriodicSite: Mg (-0.02746, -0.07768, 1.554) [2.276e-07, -0.03158, 0.04023]\n", + "PeriodicSite: O (1.734, 1.216, 4.527) [0.5, 0.4945, 0.0365]\n", + "PeriodicSite: Mg (0.02554, 0.07223, 4.474) [1.088e-06, 0.02937, 0.1029]\n", + "PeriodicSite: O (1.746, 1.25, 7.518) [0.5, 0.5081, 0.106]\n", + "PeriodicSite: Mg (0.004413, 0.01248, 7.523) [1.247e-07, 0.005074, 0.1778]\n", + "PeriodicSite: O (1.736, 1.22, 10.55) [0.5, 0.4962, 0.1791]\n", + "PeriodicSite: Mg (5.245e-07, 2.488e-06, 10.54) [-1.362e-07, 1.012e-06, 0.25]\n", + "PeriodicSite: O (1.739, 1.23, 13.56) [0.5, 0.5, 0.25]\n", + "PeriodicSite: Mg (-0.004412, -0.01248, 13.56) [-5.311e-08, -0.005073, 0.3222]\n", + "PeriodicSite: O (1.742, 1.239, 16.56) [0.5, 0.5038, 0.3209]\n", + "PeriodicSite: Mg (-0.02554, -0.07224, 16.61) [-3.741e-08, -0.02937, 0.3971]\n", + "PeriodicSite: O (1.732, 1.21, 19.59) [0.5, 0.4919, 0.394]\n", + "PeriodicSite: Mg (0.02746, 0.07767, 19.53) [-2.13e-08, 0.03158, 0.4598]\n", + "PeriodicSite: O (1.744, 1.243, 22.58) [0.5, 0.5055, 0.4635]]\n", + ":parameter:(4): \n", + ":parameter:{\"executor\": \"dask\", \"workflow_executor\": \"dask\", \"hooks\": {}, \"executor_data\": {}, \"workflow_executor_data\": {}, \"qelectron_data_exists\": false}(5): {\"executor\": \"dask\", \"workflow_executor\": \"dask\", \"hooks\": {}, \"executor_data\": {}, \"workflow_executor_data\": {}, \"qelectron_data_exists\": false}\n", + ":postprocess:reconstruct(6): [Structure Summary\n", "Lattice\n", - " abc : 3.012274887854692 3.0122748878546917 30.122748878546922\n", - " angles : 120.00000000000001 120.00000000000001 60.00000000000001\n", - " volume : 193.27193999999986\n", - " A : 2.6087065760640837 0.0 -1.5061374439273467\n", - " B : 0.8695688586880268 2.459512146747805 -1.5061374439273467\n", + " abc : 3.012274887854692 3.012274887854692 30.122748878546922\n", + " angles : 120.00000000000001 120.00000000000001 59.99999999999999\n", + " volume : 193.27193999999994\n", + " A : 2.608706576064084 0.0 -1.5061374439273467\n", + " B : 0.8695688586880276 2.4595121467478056 -1.5061374439273467\n", " C : 0.0 0.0 30.122748878546922\n", " pbc : True True True\n", - "PeriodicSite: Mg (-0.0808, -0.0571, 2.1193) [-0.0232, -0.0232, 0.0680]\n", - "PeriodicSite: O (1.8010, 1.2735, -0.6459) [0.5178, 0.5178, 0.0303]\n", - "PeriodicSite: Mg (-0.0401, -0.0284, 5.2020) [-0.0115, -0.0115, 0.1715]\n", - "PeriodicSite: O (1.7790, 1.2579, 2.3282) [0.5114, 0.5114, 0.1284]\n", - "PeriodicSite: Mg (-0.0392, -0.0277, 8.2159) [-0.0113, -0.0113, 0.2716]\n", - "PeriodicSite: O (1.7778, 1.2571, 5.3384) [0.5111, 0.5111, 0.2283]\n", - "PeriodicSite: Mg (-0.0320, -0.0226, 11.2406) [-0.0092, -0.0092, 0.3722]\n", - "PeriodicSite: O (1.7829, 1.2607, 8.3596) [0.5126, 0.5126, 0.3288]\n", - "PeriodicSite: Mg (-0.0059, -0.0042, 14.2980) [-0.0017, -0.0017, 0.4745]\n", - "PeriodicSite: O (1.7529, 1.2395, 11.3199) [0.5040, 0.5040, 0.4262], Structure Summary\n", + "PeriodicSite: Mg (-0.06335, -0.04479, 2.149) [-0.01821, -0.01821, 0.06954]\n", + "PeriodicSite: O (1.804, 1.275, -0.6412) [0.5186, 0.5186, 0.03057]\n", + "PeriodicSite: Mg (-0.04308, -0.03047, 5.197) [-0.01239, -0.01239, 0.1713]\n", + "PeriodicSite: O (1.762, 1.246, 2.298) [0.5064, 0.5064, 0.1269]\n", + "PeriodicSite: Mg (-0.03833, -0.0271, 8.217) [-0.01102, -0.01102, 0.2717]\n", + "PeriodicSite: O (1.776, 1.255, 5.335) [0.5105, 0.5105, 0.2281]\n", + "PeriodicSite: Mg (-0.03796, -0.02684, 11.23) [-0.01091, -0.01091, 0.3717]\n", + "PeriodicSite: O (1.788, 1.265, 8.369) [0.5141, 0.5141, 0.3292]\n", + "PeriodicSite: Mg (-0.01275, -0.009017, 14.29) [-0.003666, -0.003666, 0.4739]\n", + "PeriodicSite: O (1.762, 1.246, 11.34) [0.5066, 0.5066, 0.427], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 3.012274887854692 30.122748878546922\n", - " angles : 120.00000000000001 60.00000000000001 90.0\n", + " angles : 120.00000000000001 59.99999999999999 90.0\n", " volume : 193.2719399999999\n", - " A : 2.6087065760640846 0.0 1.5061374439273456\n", - " B : 0.8695688586880286 2.4595121467478047 -1.5061374439273467\n", + " A : 2.608706576064084 0.0 1.5061374439273465\n", + " B : 0.8695688586880287 2.459512146747805 -1.5061374439273467\n", " C : 0.0 0.0 30.122748878546922\n", " pbc : True True True\n", - "PeriodicSite: Mg (-0.0015, 0.0021, 1.5088) [-0.0009, 0.0009, 0.0502]\n", - "PeriodicSite: O (1.7403, 1.2281, 1.5042) [0.5007, 0.4993, 0.0499]\n", - "PeriodicSite: Mg (0.0016, -0.0022, 4.5157) [0.0009, -0.0009, 0.1498]\n", - "PeriodicSite: O (1.7373, 1.2323, 4.5215) [0.4990, 0.5010, 0.1502]\n", - "PeriodicSite: Mg (0.0000, -0.0000, 7.5307) [0.0000, -0.0000, 0.2500]\n", - "PeriodicSite: O (1.7391, 1.2298, 7.5307) [0.5000, 0.5000, 0.2500]\n", - "PeriodicSite: Mg (-0.0016, 0.0022, 10.5457) [-0.0009, 0.0009, 0.3502]\n", - "PeriodicSite: O (1.7409, 1.2272, 10.5399) [0.5010, 0.4990, 0.3498]\n", - "PeriodicSite: Mg (0.0015, -0.0021, 13.5526) [0.0009, -0.0009, 0.4498]\n", - "PeriodicSite: O (1.7380, 1.2314, 13.5572) [0.4993, 0.5007, 0.4501], Structure Summary\n", + "PeriodicSite: Mg (-0.003667, 0.005186, 1.512) [-0.002108, 0.002108, 0.05042]\n", + "PeriodicSite: O (1.742, 1.226, 1.502) [0.5015, 0.4985, 0.0497]\n", + "PeriodicSite: Mg (0.004204, -0.005944, 4.511) [0.002417, -0.002417, 0.1495]\n", + "PeriodicSite: O (1.737, 1.233, 4.523) [0.4985, 0.5015, 0.1503]\n", + "PeriodicSite: Mg (-2.373e-07, 1.452e-07, 7.531) [-1.106e-07, 5.904e-08, 0.25]\n", + "PeriodicSite: O (1.739, 1.23, 7.531) [0.5, 0.5, 0.25]\n", + "PeriodicSite: Mg (-0.004206, 0.005949, 10.55) [-0.002419, 0.002419, 0.3505]\n", + "PeriodicSite: O (1.742, 1.226, 10.54) [0.5015, 0.4985, 0.3497]\n", + "PeriodicSite: Mg (0.003665, -0.005183, 13.55) [0.002107, -0.002107, 0.4496]\n", + "PeriodicSite: O (1.737, 1.233, 13.56) [0.4985, 0.5015, 0.4503], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 5.217413152128169 48.196398205675074\n", - " angles : 30.000000000000014 60.00000000000002 73.22134511903965\n", + " angles : 30.000000000000014 59.99999999999999 73.22134511903964\n", " volume : 309.2351039999999\n", - " A : 2.6087065760640846 0.0 1.5061374439273456\n", + " A : 2.608706576064084 0.0 1.5061374439273465\n", " B : -0.869568858688028 2.4595121467478056 4.518412331782038\n", " C : 0.0 0.0 48.196398205675074\n", " pbc : True True True\n", - "PeriodicSite: Mg (0.0262, 0.0105, 2.2139) [0.0114, 0.0042, 0.0452]\n", - "PeriodicSite: O (0.9825, 1.0539, 3.5697) [0.5195, 0.4285, 0.0177]\n", - "PeriodicSite: Mg (0.0662, 0.2336, 5.1568) [0.0571, 0.0950, 0.0963]\n", - "PeriodicSite: O (0.8459, 1.1867, 6.8186) [0.4851, 0.4825, 0.0811]\n", - "PeriodicSite: Mg (0.0133, 0.0507, 8.2607) [0.0120, 0.0206, 0.1691]\n", - "PeriodicSite: O (0.8496, 1.1727, 9.8246) [0.4846, 0.4768, 0.1440]\n", - "PeriodicSite: Mg (0.0086, 0.0959, 11.2811) [0.0163, 0.0390, 0.2299]\n", - "PeriodicSite: O (0.8389, 1.1668, 12.8553) [0.4797, 0.4744, 0.2073]\n", - "PeriodicSite: Mg (0.0091, 0.0613, 14.2926) [0.0118, 0.0249, 0.2938]\n", - "PeriodicSite: O (0.8384, 1.1314, 15.8685) [0.4747, 0.4600, 0.2713]\n", - "PeriodicSite: Mg (0.0019, 0.0338, 17.3173) [0.0053, 0.0137, 0.3579]\n", - "PeriodicSite: O (0.8477, 1.1616, 18.8647) [0.4824, 0.4723, 0.3321]\n", - "PeriodicSite: Mg (0.0237, 0.0330, 20.2919) [0.0135, 0.0134, 0.4193]\n", - "PeriodicSite: O (0.8368, 1.0796, 21.8957) [0.4671, 0.4390, 0.3986]\n", - "PeriodicSite: Mg (-0.0806, 0.1485, 23.4847) [-0.0108, 0.0604, 0.4819]\n", - "PeriodicSite: O (0.8484, 1.2181, 24.8879) [0.4903, 0.4953, 0.4546], Structure Summary\n", + "PeriodicSite: Mg (0.1339, -0.01997, 2.027) [0.04861, -0.008121, 0.04131]\n", + "PeriodicSite: O (1.084, 1.0, 3.395) [0.5509, 0.4068, 0.01508]\n", + "PeriodicSite: Mg (0.1856, 0.2225, 4.95) [0.1013, 0.09047, 0.09106]\n", + "PeriodicSite: O (0.9559, 1.166, 6.628) [0.5245, 0.4742, 0.07668]\n", + "PeriodicSite: Mg (0.09665, 0.08853, 8.116) [0.04905, 0.036, 0.1635]\n", + "PeriodicSite: O (0.9216, 1.175, 9.7) [0.5125, 0.4777, 0.1405]\n", + "PeriodicSite: Mg (0.04673, 0.1156, 11.22) [0.03359, 0.04702, 0.2272]\n", + "PeriodicSite: O (0.8436, 1.125, 12.85) [0.4758, 0.4574, 0.2088]\n", + "PeriodicSite: Mg (-0.005373, 0.07126, 14.32) [0.007599, 0.02897, 0.2941]\n", + "PeriodicSite: O (0.7974, 1.125, 15.94) [0.4581, 0.4574, 0.2735]\n", + "PeriodicSite: Mg (-0.06382, 0.06227, 17.43) [-0.01603, 0.02532, 0.3598]\n", + "PeriodicSite: O (0.7609, 1.136, 19.01) [0.4456, 0.4618, 0.3373]\n", + "PeriodicSite: Mg (-0.07782, 0.05423, 20.47) [-0.02248, 0.02205, 0.4233]\n", + "PeriodicSite: O (0.7283, 1.092, 22.08) [0.4271, 0.4439, 0.4032]\n", + "PeriodicSite: Mg (-0.1775, 0.196, 23.65) [-0.04147, 0.07969, 0.4846]\n", + "PeriodicSite: O (0.727, 1.229, 25.1) [0.4452, 0.4996, 0.46], Structure Summary\n", "Lattice\n", " abc : 3.012274887854692 5.217413152128169 42.17184842996569\n", - " angles : 29.999999999999964 59.999999999999986 54.735610317245346\n", + " angles : 29.99999999999997 59.999999999999986 54.735610317245346\n", " volume : 270.58071599999977\n", " A : 2.608706576064084 0.0 1.5061374439273465\n", " B : 0.8695688586880266 2.4595121467478043 4.51841233178204\n", " C : 0.0 0.0 42.17184842996569\n", " pbc : True True True\n", - "PeriodicSite: Mg (-0.0254, -0.0718, 1.5501) [0.0000, -0.0292, 0.0399]\n", - "PeriodicSite: O (1.7306, 1.2057, 4.5332) [0.5000, 0.4902, 0.0371]\n", - "PeriodicSite: Mg (0.0279, 0.0790, 4.4700) [0.0000, 0.0321, 0.1026]\n", - "PeriodicSite: O (1.7433, 1.2415, 7.5235) [0.5000, 0.5048, 0.1065]\n", - "PeriodicSite: Mg (-0.0041, -0.0115, 7.5377) [0.0000, -0.0047, 0.1792]\n", - "PeriodicSite: O (1.7393, 1.2301, 10.5427) [0.5000, 0.5002, 0.1785]\n", - "PeriodicSite: Mg (0.0000, 0.0000, 10.5430) [0.0000, 0.0000, 0.2500]\n", - "PeriodicSite: O (1.7391, 1.2298, 13.5552) [0.5000, 0.5000, 0.2500]\n", - "PeriodicSite: Mg (0.0041, 0.0115, 13.5482) [0.0000, 0.0047, 0.3208]\n", - "PeriodicSite: O (1.7390, 1.2294, 16.5678) [0.5000, 0.4998, 0.3215]\n", - "PeriodicSite: Mg (-0.0279, -0.0790, 16.6159) [0.0000, -0.0321, 0.3974]\n", - "PeriodicSite: O (1.7350, 1.2180, 19.5870) [0.5000, 0.4952, 0.3935]\n", - "PeriodicSite: Mg (0.0254, 0.0718, 19.5358) [-0.0000, 0.0292, 0.4601]\n", - "PeriodicSite: O (1.7477, 1.2539, 22.5773) [0.5000, 0.5098, 0.4629]]\n", + "PeriodicSite: Mg (-0.02746, -0.07768, 1.554) [2.276e-07, -0.03158, 0.04023]\n", + "PeriodicSite: O (1.734, 1.216, 4.527) [0.5, 0.4945, 0.0365]\n", + "PeriodicSite: Mg (0.02554, 0.07223, 4.474) [1.088e-06, 0.02937, 0.1029]\n", + "PeriodicSite: O (1.746, 1.25, 7.518) [0.5, 0.5081, 0.106]\n", + "PeriodicSite: Mg (0.004413, 0.01248, 7.523) [1.247e-07, 0.005074, 0.1778]\n", + "PeriodicSite: O (1.736, 1.22, 10.55) [0.5, 0.4962, 0.1791]\n", + "PeriodicSite: Mg (5.245e-07, 2.488e-06, 10.54) [-1.362e-07, 1.012e-06, 0.25]\n", + "PeriodicSite: O (1.739, 1.23, 13.56) [0.5, 0.5, 0.25]\n", + "PeriodicSite: Mg (-0.004412, -0.01248, 13.56) [-5.311e-08, -0.005073, 0.3222]\n", + "PeriodicSite: O (1.742, 1.239, 16.56) [0.5, 0.5038, 0.3209]\n", + "PeriodicSite: Mg (-0.02554, -0.07224, 16.61) [-3.741e-08, -0.02937, 0.3971]\n", + "PeriodicSite: O (1.732, 1.21, 19.59) [0.5, 0.4919, 0.394]\n", + "PeriodicSite: Mg (0.02746, 0.07767, 19.53) [-2.13e-08, 0.03158, 0.4598]\n", + "PeriodicSite: O (1.744, 1.243, 22.58) [0.5, 0.5055, 0.4635]]\n", "\n" ] } @@ -656,7 +657,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.16" + "version": "3.9.18" }, "vscode": { "interpreter": { From f9eb1ccf0ff19e08df50950903b0c2c0be324ed1 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Sun, 7 Jan 2024 13:55:02 -0500 Subject: [PATCH 11/19] updated mac requirements to the tutorial --- .../dynamic_quantum_chemistry/source.ipynb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/source.ipynb b/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/source.ipynb index e0722a5ff..71ab685eb 100644 --- a/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/source.ipynb +++ b/doc/source/tutorials/3_QuantumChemistry/dynamic_quantum_chemistry/source.ipynb @@ -46,6 +46,17 @@ " print(line.rstrip())" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you're using mac then you might also have to install the following packages with homebrew as:\n", + "\n", + "```\n", + "brew install freetype pkg-config libpng\n", + "``````" + ] + }, { "attachments": {}, "cell_type": "markdown", From 2b1c29e348e0666756156926471672e304fe8e41 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Sun, 7 Jan 2024 15:19:22 -0500 Subject: [PATCH 12/19] fixed draw method and verified notebook --- covalent_dispatcher/_db/dispatchdb.py | 15 +++++++++------ .../nitrogen_copper_interaction/source.ipynb | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/covalent_dispatcher/_db/dispatchdb.py b/covalent_dispatcher/_db/dispatchdb.py index 9fcb4d2dd..7eee94e6d 100644 --- a/covalent_dispatcher/_db/dispatchdb.py +++ b/covalent_dispatcher/_db/dispatchdb.py @@ -65,6 +65,9 @@ def extract_graph_node(node): def extract_metadata(metadata: dict): + + # TODO: This is an outdated method + try: # avoid mutating original metadata metadata = copy.deepcopy(metadata) @@ -81,20 +84,20 @@ def extract_metadata(metadata: dict): else: metadata["executor_name"] = f"<{executor.__class__.__name__}>" - metadata["deps"] = encode_dict(metadata["deps"]) - call_before = metadata["call_before"] - call_after = metadata["call_after"] + metadata["hooks"]["deps"] = encode_dict(metadata["hooks"]["deps"]) + call_before = metadata["hooks"]["call_before"] + call_after = metadata["hooks"]["call_after"] for i, dep in enumerate(call_before): call_before[i] = str(dep) for i, dep in enumerate(call_after): call_after[i] = str(dep) - metadata["call_before"] = call_before - metadata["call_after"] = call_after + metadata["hooks"]["call_before"] = call_before + metadata["hooks"]["call_after"] = call_after except (KeyError, AttributeError) as ex: - app_log.error(f"Exception when trying to extract metadata: {ex}") + app_log.debug(f"Exception when trying to extract metadata: {ex}") return metadata diff --git a/doc/source/tutorials/3_QuantumChemistry/nitrogen_copper_interaction/source.ipynb b/doc/source/tutorials/3_QuantumChemistry/nitrogen_copper_interaction/source.ipynb index 2f5b2c20c..fea596bda 100644 --- a/doc/source/tutorials/3_QuantumChemistry/nitrogen_copper_interaction/source.ipynb +++ b/doc/source/tutorials/3_QuantumChemistry/nitrogen_copper_interaction/source.ipynb @@ -559,7 +559,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" }, "vscode": { "interpreter": { From 954abe907554058227f772c54b1e67f623d35f7c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 7 Jan 2024 20:19:50 +0000 Subject: [PATCH 13/19] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- covalent_dispatcher/_db/dispatchdb.py | 1 - 1 file changed, 1 deletion(-) diff --git a/covalent_dispatcher/_db/dispatchdb.py b/covalent_dispatcher/_db/dispatchdb.py index 7eee94e6d..621022777 100644 --- a/covalent_dispatcher/_db/dispatchdb.py +++ b/covalent_dispatcher/_db/dispatchdb.py @@ -65,7 +65,6 @@ def extract_graph_node(node): def extract_metadata(metadata: dict): - # TODO: This is an outdated method try: From f57cfc87daad43ca11bae5a06c8f41dfdb32e397 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Sun, 7 Jan 2024 15:25:08 -0500 Subject: [PATCH 14/19] added instruction to nitrogen-cu notebook for numpy --- .../nitrogen_copper_interaction/source.ipynb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/source/tutorials/3_QuantumChemistry/nitrogen_copper_interaction/source.ipynb b/doc/source/tutorials/3_QuantumChemistry/nitrogen_copper_interaction/source.ipynb index fea596bda..aedff5159 100644 --- a/doc/source/tutorials/3_QuantumChemistry/nitrogen_copper_interaction/source.ipynb +++ b/doc/source/tutorials/3_QuantumChemistry/nitrogen_copper_interaction/source.ipynb @@ -36,6 +36,13 @@ " print(line.rstrip())\n" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You might have to install `numpy==1.23` again manually due to a conflict with `ase-notebook` package." + ] + }, { "cell_type": "code", "execution_count": 2, From c3f5158d10c254f3f613bf2a6eec23e7f669ec27 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Sun, 7 Jan 2024 15:46:41 -0500 Subject: [PATCH 15/19] removed pennylane from requirements of the tutorials --- .../pennylane_ensemble_classification/assets/requirements.txt | 1 - .../1_QuantumMachineLearning/pennylane_hybrid/requirements.txt | 1 - .../pennylane_iris_classification/requirements.txt | 1 - .../1_QuantumMachineLearning/pennylane_kernel/requirements.txt | 1 - .../pennylane_parity_classifier/requirements.txt | 1 - .../1_QuantumMachineLearning/qaoa_maxcut/requirements.txt | 1 - .../quantum_embedding_kernel/requirements.txt | 1 - 7 files changed, 7 deletions(-) diff --git a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_ensemble_classification/assets/requirements.txt b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_ensemble_classification/assets/requirements.txt index 67e90aa15..872846975 100644 --- a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_ensemble_classification/assets/requirements.txt +++ b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_ensemble_classification/assets/requirements.txt @@ -1,5 +1,4 @@ covalent matplotlib==3.6.3 -pennylane==0.25.1 scikit-learn==1.0.2 torch==1.13.1 diff --git a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_hybrid/requirements.txt b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_hybrid/requirements.txt index b789655ae..a2af84b92 100644 --- a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_hybrid/requirements.txt +++ b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_hybrid/requirements.txt @@ -1,4 +1,3 @@ covalent matplotlib==3.4.3 -pennylane==0.25.1 pennylane-sf==0.20.1 diff --git a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_iris_classification/requirements.txt b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_iris_classification/requirements.txt index b789655ae..a2af84b92 100644 --- a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_iris_classification/requirements.txt +++ b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_iris_classification/requirements.txt @@ -1,4 +1,3 @@ covalent matplotlib==3.4.3 -pennylane==0.25.1 pennylane-sf==0.20.1 diff --git a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_kernel/requirements.txt b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_kernel/requirements.txt index 2d9f9b9bc..c167e5c1a 100644 --- a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_kernel/requirements.txt +++ b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_kernel/requirements.txt @@ -1,7 +1,6 @@ covalent matplotlib==3.5.1 numpy==1.24.2 -pennylane==0.25.1 pennylane-sf==0.20.1 scikit-learn==1.0.2 torch==2.0.0 diff --git a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_parity_classifier/requirements.txt b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_parity_classifier/requirements.txt index 1b91aa61e..8eb2fbc39 100644 --- a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_parity_classifier/requirements.txt +++ b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_parity_classifier/requirements.txt @@ -1,3 +1,2 @@ covalent matplotlib==3.4.3 -pennylane==0.25.1 diff --git a/doc/source/tutorials/1_QuantumMachineLearning/qaoa_maxcut/requirements.txt b/doc/source/tutorials/1_QuantumMachineLearning/qaoa_maxcut/requirements.txt index 7222681ea..8eb2fbc39 100644 --- a/doc/source/tutorials/1_QuantumMachineLearning/qaoa_maxcut/requirements.txt +++ b/doc/source/tutorials/1_QuantumMachineLearning/qaoa_maxcut/requirements.txt @@ -1,3 +1,2 @@ covalent matplotlib==3.4.3 -pennylane==0.26.0 diff --git a/doc/source/tutorials/1_QuantumMachineLearning/quantum_embedding_kernel/requirements.txt b/doc/source/tutorials/1_QuantumMachineLearning/quantum_embedding_kernel/requirements.txt index 1eba2fa34..f11dad26f 100644 --- a/doc/source/tutorials/1_QuantumMachineLearning/quantum_embedding_kernel/requirements.txt +++ b/doc/source/tutorials/1_QuantumMachineLearning/quantum_embedding_kernel/requirements.txt @@ -1,4 +1,3 @@ covalent matplotlib==3.5.1 -pennylane==0.23.1 scikit-learn==1.1.1 From 3361f291eaad4345b052e0c8ee224ba9736902e4 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Sun, 7 Jan 2024 16:19:05 -0500 Subject: [PATCH 16/19] removed unneeded notebook --- ...9-76f027265d183c7f2d69-2f7c-43b9-9202-d5b51c50bb22.ipynb | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 doc/source/tutorials/1_QuantumMachineLearning/pennylane_ensemble_classification/source-jvsc-b1861ceb-413c-44fd-9049-76f027265d183c7f2d69-2f7c-43b9-9202-d5b51c50bb22.ipynb diff --git a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_ensemble_classification/source-jvsc-b1861ceb-413c-44fd-9049-76f027265d183c7f2d69-2f7c-43b9-9202-d5b51c50bb22.ipynb b/doc/source/tutorials/1_QuantumMachineLearning/pennylane_ensemble_classification/source-jvsc-b1861ceb-413c-44fd-9049-76f027265d183c7f2d69-2f7c-43b9-9202-d5b51c50bb22.ipynb deleted file mode 100644 index 363fcab7e..000000000 --- a/doc/source/tutorials/1_QuantumMachineLearning/pennylane_ensemble_classification/source-jvsc-b1861ceb-413c-44fd-9049-76f027265d183c7f2d69-2f7c-43b9-9202-d5b51c50bb22.ipynb +++ /dev/null @@ -1,6 +0,0 @@ -{ - "cells": [], - "metadata": {}, - "nbformat": 4, - "nbformat_minor": 5 -} From a627c04450e94e1c2001f631956270268b3d5a72 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Mon, 8 Jan 2024 02:29:54 -0500 Subject: [PATCH 17/19] updated cloudpickle since 3 is not compatible with 2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 886884819..bdffc7147 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ aiohttp>=3.8.1 alembic>=1.8.0 boto3>=1.26.110 click>=8.1.3 -cloudpickle>=2.0.0 +cloudpickle>=2.0.0,<3 dask[distributed]>=2022.6.0 fastapi>=0.100.0 filelock>=3.12.2 From fee78f0f9d589d19a72ae3d6e571e94141b7d152 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Mon, 8 Jan 2024 04:07:58 -0500 Subject: [PATCH 18/19] removed cloudpickle upperbound --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index bdffc7147..886884819 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ aiohttp>=3.8.1 alembic>=1.8.0 boto3>=1.26.110 click>=8.1.3 -cloudpickle>=2.0.0,<3 +cloudpickle>=2.0.0 dask[distributed]>=2022.6.0 fastapi>=0.100.0 filelock>=3.12.2 From 19d48b550aa6b7d3939aa3dfad31397c50c91ee0 Mon Sep 17 00:00:00 2001 From: Sankalp Sanand Date: Mon, 8 Jan 2024 06:32:18 -0500 Subject: [PATCH 19/19] updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcc6047fb..0441aed0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Updated RTD notebooks to fix their behavior +- Changed the error being shown when drawing the transport graph of a lattice to a debug message instead ### Removed - Removed unused file transfer how to guides +- Removed `pennylane` as a requirement from notebooks' requirements.txt as it comes with `covalent` ## [0.233.0-rc.0] - 2024-01-07