diff --git a/config.yml b/config.yml index 8d1b7961..fcd3a261 100644 --- a/config.yml +++ b/config.yml @@ -66,6 +66,7 @@ notebooks: - name: api_examples packages_common: - mat3ra-standata + - mat3ra-ide - mat3ra-api-client - requests - mat3ra-ade diff --git a/other/materials_designer/workflows/band_gap.ipynb b/other/materials_designer/workflows/band_gap.ipynb index a1f2489a..5febaf86 100644 --- a/other/materials_designer/workflows/band_gap.ipynb +++ b/other/materials_designer/workflows/band_gap.ipynb @@ -465,7 +465,8 @@ "id": "34", "metadata": {}, "source": [ - "## 6. Create the compute configuration" + "## 6. Create the compute configuration\n", + "### 6.1. Get list of clusters" ] }, { @@ -475,18 +476,38 @@ "metadata": {}, "outputs": [], "source": [ - "from utils.api import get_cluster_name\n", - "\n", - "CLUSTER_NAME = get_cluster_name()\n", + "clusters = client.clusters.list()\n", + "clusters" + ] + }, + { + "cell_type": "markdown", + "id": "36", + "metadata": {}, + "source": [ + "### 6.2. Create compute configuration for the job" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "37", + "metadata": {}, + "outputs": [], + "source": [ + "from mat3ra.ide.compute import Compute, QueueName\n", "\n", - "compute = client.jobs.build_compute_config(\n", - " cluster=CLUSTER_NAME\n", + "cluster = clusters[0]\n", + "compute = Compute(\n", + " cluster=cluster,\n", + " queue=QueueName.D,\n", + " ppn=2\n", ")" ] }, { "cell_type": "markdown", - "id": "36", + "id": "38", "metadata": {}, "source": [ "## 7. Create the job with material and workflow configuration\n", @@ -496,7 +517,7 @@ { "cell_type": "code", "execution_count": null, - "id": "37", + "id": "39", "metadata": {}, "outputs": [], "source": [ @@ -506,7 +527,7 @@ }, { "cell_type": "markdown", - "id": "38", + "id": "40", "metadata": {}, "source": [ "### 7.2. Create job" @@ -515,7 +536,7 @@ { "cell_type": "code", "execution_count": null, - "id": "39", + "id": "41", "metadata": {}, "outputs": [], "source": [ @@ -533,7 +554,7 @@ " project_id=project_id,\n", " prefix=JOB_NAME,\n", " owner_id=ACCOUNT_ID,\n", - " compute=compute,\n", + " compute=compute.to_dict(),\n", ")\n", "\n", "job_dict = job_response[0]\n", @@ -545,7 +566,7 @@ }, { "cell_type": "markdown", - "id": "40", + "id": "42", "metadata": {}, "source": [ "## 8. Submit the job and monitor the status" @@ -554,7 +575,7 @@ { "cell_type": "code", "execution_count": null, - "id": "41", + "id": "43", "metadata": {}, "outputs": [], "source": [ @@ -564,7 +585,7 @@ { "cell_type": "code", "execution_count": null, - "id": "42", + "id": "44", "metadata": {}, "outputs": [], "source": [ @@ -575,7 +596,7 @@ }, { "cell_type": "markdown", - "id": "43", + "id": "45", "metadata": {}, "source": [ "## 9. Retrieve results" @@ -584,7 +605,7 @@ { "cell_type": "code", "execution_count": null, - "id": "44", + "id": "46", "metadata": {}, "outputs": [], "source": [ @@ -598,7 +619,7 @@ { "cell_type": "code", "execution_count": null, - "id": "45", + "id": "47", "metadata": {}, "outputs": [], "source": [] diff --git a/pyproject.toml b/pyproject.toml index 89d55977..6579d5f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,15 +8,15 @@ dependencies = [ # ase >=3.25.0 is required for supercell to be generated, # otherwise on 3.21.1 we encountered negative number of atoms during supercell generation "ase>=3.25.0", - # Use a valid PEP 508 URL for a local file dependency: file URIs must be absolute and include three slashes - "mat3ra-api-client", "matplotlib>=3.4.1", "pandas>=1.5.3", "pymatgen==2024.4.13", "mat3ra-made>=2025.8.13.post0", "mat3ra-utils>=2024.6.11.post0", "mat3ra-wode", - "mat3ra-prode" + "mat3ra-prode", + "mat3ra-ide @ git+https://github.com/Exabyte-io/ide.git@15dbf8c8ea8284e3481b97ef6e65bfd6d3318352", + "mat3ra-api-client @ git+https://github.com/Exabyte-io/api-client.git@b30965041557d9e27fcfca1f1bd26726910a9e63", ] [project.optional-dependencies]