diff --git a/other/materials_designer/workflows/band_gap.ipynb b/other/materials_designer/workflows/band_gap.ipynb index f91f3873..a03f2a65 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", + "clusters = client.clusters.list()" + ] + }, + { + "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", - "CLUSTER_NAME = get_cluster_name()\n", + "cluster = clusters[0]\n", "\n", - "compute = client.jobs.build_compute_config(\n", - " cluster=CLUSTER_NAME\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 6d71bdfa..3fd1febd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ dependencies = [ # 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 @ git+https://github.com/Exabyte-io/api-client.git@a329f363893ee96832b5c1a3c514ade28f0839cb", + "mat3ra-api-client @ git+https://github.com/Exabyte-io/api-client.git@141d7dba220f07844e97557dda3ee74087b38c31", "matplotlib>=3.4.1", "pandas>=1.5.3", "pymatgen==2024.4.13",