Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fixing notebooks #1900

Merged
merged 21 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b52de82
fixed some file transfer notebooks
kessler-frost Jan 5, 2024
c3cab22
removing some more redundant notebooks
kessler-frost Jan 5, 2024
f881145
fixed to-from remote FT notebook
kessler-frost Jan 5, 2024
0ced1fb
fixed azure blob and gcp storage FT notebooks
kessler-frost Jan 5, 2024
73f9055
fixed and tested gcp storage FT notebook
kessler-frost Jan 5, 2024
eb4e748
updated changelog
kessler-frost Jan 5, 2024
769405f
made sure DirTrigger is working as expected
kessler-frost Jan 7, 2024
80df4e5
fixed database trigger notebook
kessler-frost Jan 7, 2024
c4faa5a
Merge branch 'develop' into fixing-notebooks
kessler-frost Jan 7, 2024
d8fefaf
updated changelog
kessler-frost Jan 7, 2024
8683e68
updated dynamic quantum chemistry tutorial
kessler-frost Jan 7, 2024
f9eb1cc
updated mac requirements to the tutorial
kessler-frost Jan 7, 2024
2b1c29e
fixed draw method and verified notebook
kessler-frost Jan 7, 2024
954abe9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 7, 2024
f57cfc8
added instruction to nitrogen-cu notebook for numpy
kessler-frost Jan 7, 2024
c358557
Merge branch 'fixing-notebooks' of github.com:AgnostiqHQ/covalent int…
kessler-frost Jan 7, 2024
c3f5158
removed pennylane from requirements of the tutorials
kessler-frost Jan 7, 2024
3361f29
removed unneeded notebook
kessler-frost Jan 7, 2024
a627c04
updated cloudpickle since 3 is not compatible with 2
kessler-frost Jan 8, 2024
fee78f0
removed cloudpickle upperbound
kessler-frost Jan 8, 2024
19d48b5
updated changelog
kessler-frost Jan 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

### 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

### Authors
Expand Down
2 changes: 1 addition & 1 deletion covalent/_file_transfer/strategies/gcloud_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
14 changes: 8 additions & 6 deletions covalent_dispatcher/_db/dispatchdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@


def extract_metadata(metadata: dict):
# TODO: This is an outdated method

try:
# avoid mutating original metadata
metadata = copy.deepcopy(metadata)
Expand All @@ -81,20 +83,20 @@
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"]

Check warning on line 88 in covalent_dispatcher/_db/dispatchdb.py

View check run for this annotation

Codecov / codecov/patch

covalent_dispatcher/_db/dispatchdb.py#L86-L88

Added lines #L86 - L88 were not covered by tests
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

Check warning on line 96 in covalent_dispatcher/_db/dispatchdb.py

View check run for this annotation

Codecov / codecov/patch

covalent_dispatcher/_db/dispatchdb.py#L95-L96

Added lines #L95 - L96 were not covered by tests

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}")

Check warning on line 99 in covalent_dispatcher/_db/dispatchdb.py

View check run for this annotation

Codecov / codecov/patch

covalent_dispatcher/_db/dispatchdb.py#L99

Added line #L99 was not covered by tests

return metadata

Expand Down

This file was deleted.

37 changes: 19 additions & 18 deletions doc/source/how_to/coding/file_transfers_for_workflows_local.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 1,
"id": "5a8139da",
"metadata": {},
"outputs": [],
Expand All @@ -40,7 +40,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 2,
"id": "089aa573",
"metadata": {},
"outputs": [],
Expand All @@ -65,7 +65,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 3,
"id": "34e40034",
"metadata": {},
"outputs": [],
Expand All @@ -85,7 +85,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 4,
"id": "279dc3fa",
"metadata": {},
"outputs": [],
Expand All @@ -103,7 +103,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 5,
"id": "de6ed992",
"metadata": {},
"outputs": [],
Expand All @@ -129,7 +129,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 6,
"id": "789a74ef",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -157,7 +157,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 7,
"id": "a30852d1-2fa4-4ffb-b01d-7e7cc9925182",
"metadata": {},
"outputs": [],
Expand All @@ -182,7 +182,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 8,
"id": "0a6a94bf",
"metadata": {},
"outputs": [
Expand All @@ -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",
Expand Down Expand Up @@ -265,7 +266,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
"version": "3.8.18"
},
"vscode": {
"interpreter": {
Expand Down
Loading
Loading