Skip to content

Commit

Permalink
Merge pull request #26 from XanaduAI/datasets-v2
Browse files Browse the repository at this point in the history
Merge V2 working branch
  • Loading branch information
brownj85 authored Oct 31, 2024
2 parents db7c3e6 + a093efb commit d5dd6bc
Show file tree
Hide file tree
Showing 191 changed files with 5,884 additions and 3,748 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
PYTHONPATH: "lib/:${PYTHONPATH}"
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
BUCKET_PUBLIC_DOMAIN: ${{ secrets.BUCKET_PUBLIC_DOMAIN }}
DATASETS_ADMIN_API_URL: ${{ secrets.DATASETS_ADMIN_API_URL }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -58,5 +59,4 @@ jobs:
run: .venv/bin/python3 -m dsets upload-assets

- name: Deploy build
run: .venv/bin/python3 -m dsets deploy-build \
${{ inputs.environment }} ${{ inputs.ref }}
run: .venv/bin/python3 -m dsets deploy-build
13 changes: 0 additions & 13 deletions content/other/_meta/class.json

This file was deleted.

69 changes: 35 additions & 34 deletions content/other/hamlib/hamlib-max-3-sat/dataset.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,9 @@
{
"slug": "hamlib-max-3-sat",
"class": {
"$path": "/other/_meta/class.json"
},
"collection": {
"$path": "/other/hamlib/_meta/collection.json"
},
"data": [
{
"dataUrl": "https://datasets.cloud.pennylane.ai/datasets/h5/other/Max3Sat/Max3Sat_Max3Sat.h5",
"parameters": {
"name": "hamlib-max-3-sat"
},
"extra": {}
}
],
"downloadName": "hamlib-max3sat",
"features": [
{
"slug": "dataset-attributes",
"title": "Dataset Attributes",
"type": "DATA",
"content": {
"$path": "features/dataset-attributes.md"
}
}
],
"meta": {
"$path": "meta.json"
},
"extra": {
"defaultParameters": {
"name": "hamlib-max-3-sat"
},
"extraAttributes": [
"slug": "hamlib-max-3-sat",
"name": "HamlibMax3Sat",
"attributeList": [
{
"name": "clauses",
"pythonType": "list[tuple[int, int, int]]",
Expand Down Expand Up @@ -65,5 +35,36 @@
"doc": "List of clause ratios r = m/n, where m is the number of clauses and n is the number of variables."
}
]
},
"collection": {
"$path": "/other/hamlib/_meta/collection.json"
},
"data": [
{
"dataUrl": "https://datasets.cloud.pennylane.ai/datasets/h5/other/Max3Sat/Max3Sat_Max3Sat.h5",
"parameters": {
"name": "hamlib-max-3-sat"
},
"extra": {}
}
],
"downloadName": "hamlib-max3sat",
"features": [
{
"slug": "dataset-attributes",
"title": "Dataset Attributes",
"type": "DATA",
"content": {
"$path": "features/dataset-attributes.md"
}
}
],
"meta": {
"$path": "meta.json"
},
"extra": {
"defaultParameters": {
"name": "hamlib-max-3-sat"
}
}
}
}
66 changes: 49 additions & 17 deletions content/other/hamlib/hamlib-max-3-sat/meta.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,60 @@
{
"abstract": null,
"authors": [
"Nicolas PD Sawaya",
"Daniel Marti-Dafcik",
"Yang Ho",
"Daniel P Tabor",
"David E Bernal Neira",
"Alicia B Magann",
"Shavindra Premaratne",
"Pradeep Dubey",
"Anne Matsuura",
"Nathan Bishop",
"Wibe A de Jong",
"Simon Benjamin",
"Ojas D Parekh",
"Norm M. Tubman",
"Katherine Klymko",
"Daan Camps"
{
"name": "Nicolas PD Sawaya"
},
{
"name": "Daniel Marti-Dafcik"
},
{
"name": "Yang Ho"
},
{
"name": "Daniel P Tabor"
},
{
"name": "David E Bernal Neira"
},
{
"name": "Alicia B Magann"
},
{
"name": "Shavindra Premaratne"
},
{
"name": "Pradeep Dubey"
},
{
"name": "Anne Matsuura"
},
{
"name": "Nathan Bishop"
},
{
"name": "Wibe A de Jong"
},
{
"name": "Simon Benjamin"
},
{
"name": "Ojas D Parekh"
},
{
"name": "Norm M. Tubman"
},
{
"name": "Katherine Klymko"
},
{
"name": "Daan Camps"
}
],
"citation": {
"$path": "citation.txt"
},
"changelog": [
"{\"version 0.1 : initial public release\"}"
"version 0.1 : initial public release"
],
"license": "[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)",
"sourceCodeUrl": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Each Hamiltonian acts as the cost function for its corresponding Max-3-SAT probl
**Example usage**

```python
[ds] = qml.data.load("other", name="hamlib-max3sat")
[ds] = qml.data.load("hamlib-max3sat")
ham = ds.hamiltonians[1320]

dev = qml.device("default.qubit", wires=4)
Expand Down
51 changes: 26 additions & 25 deletions content/other/hamlib/hamlib-maxcut/dataset.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
{
"slug": "hamlib-maxcut",
"class": {
"$path": "/other/_meta/class.json"
"slug": "hamlib-maxcut",
"name": "HamlibMaxcut",
"attributeList": [
{
"name": "hamiltonians",
"pythonType": "list[Hamiltonian]",
"doc": "List of hamiltonians. Each Hamiltonian corresponds to one MaxCut instance."
},
{
"name": "ns",
"pythonType": "list[int]",
"doc": "List containing the number of nodes for each maxcut instance."
},
{
"name": "ids",
"pythonType": "list[Any]",
"doc": "Describes the graph type. For circulant graphs, these describe the offset in edge connections and have form `circ_offsets-{distance to first connection}-{distance to second connection}`. For complete bipartite graphs, these describe the number of nodes in each set and have form `complbipart_a-{number of nodes in set a}_b{number of nodes in set b}`. Star graphs do not contain extra information and are labeled `star`."
},
{
"name": "edges",
"pythonType": "list[Any]",
"doc": "The MaxCut edges provided as tuples of form (node1, node2)."
}
]
},
"collection": {
"$path": "/other/hamlib/_meta/collection.json"
Expand Down Expand Up @@ -32,28 +55,6 @@
"extra": {
"defaultParameters": {
"name": "hamlib-maxcut"
},
"extraAttributes": [
{
"name": "hamiltonians",
"pythonType": "list[Hamiltonian]",
"doc": "List of hamiltonians. Each Hamiltonian corresponds to one MaxCut instance."
},
{
"name": "ns",
"pythonType": "list[int]",
"doc": "List containing the number of nodes for each maxcut instance."
},
{
"name": "ids",
"pythonType": "list[Any]",
"doc": "Describes the graph type. For circulant graphs, these describe the offset in edge connections and have form `circ_offsets-{distance to first connection}-{distance to second connection}`. For complete bipartite graphs, these describe the number of nodes in each set and have form `complbipart_a-{number of nodes in set a}_b{number of nodes in set b}`. Star graphs do not contain extra information and are labeled `star`."
},
{
"name": "edges",
"pythonType": "list[Any]",
"doc": "The MaxCut edges provided as tuples of form (node1, node2)."
}
]
}
}
}
}
64 changes: 48 additions & 16 deletions content/other/hamlib/hamlib-maxcut/meta.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,54 @@
{
"abstract": null,
"authors": [
"Nicolas PD Sawaya",
"Daniel Marti-Dafcik",
"Yang Ho",
"Daniel P Tabor",
"David E Bernal Neira",
"Alicia B Magann",
"Shavindra Premaratne",
"Pradeep Dubey",
"Anne Matsuura",
"Nathan Bishop",
"Wibe A de Jong",
"Simon Benjamin",
"Ojas D Parekh",
"Norm M. Tubman",
"Katherine Klymko",
"Daan Camps"
{
"name": "Nicolas PD Sawaya"
},
{
"name": "Daniel Marti-Dafcik"
},
{
"name": "Yang Ho"
},
{
"name": "Daniel P Tabor"
},
{
"name": "David E Bernal Neira"
},
{
"name": "Alicia B Magann"
},
{
"name": "Shavindra Premaratne"
},
{
"name": "Pradeep Dubey"
},
{
"name": "Anne Matsuura"
},
{
"name": "Nathan Bishop"
},
{
"name": "Wibe A de Jong"
},
{
"name": "Simon Benjamin"
},
{
"name": "Ojas D Parekh"
},
{
"name": "Norm M. Tubman"
},
{
"name": "Katherine Klymko"
},
{
"name": "Daan Camps"
}
],
"citation": {
"$path": "citation.txt"
Expand Down
2 changes: 1 addition & 1 deletion content/other/hamlib/hamlib-maxcut/using_this_dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ all nodes in the other set.
**Example usage**

```python
[ds] = qml.data.load("other", name="hamlib-maxcut")
[ds] = qml.data.load("hamlib-maxcut")
ham = ds.hamiltonians[4]

dev = qml.device("default.qubit", wires=4)
Expand Down
Loading

0 comments on commit d5dd6bc

Please sign in to comment.