Skip to content

Commit e391f31

Browse files
committed
fix: update comment and docs
1 parent ad38f5e commit e391f31

4 files changed

Lines changed: 49 additions & 36 deletions

File tree

examples/science/af3-slurm/examples/simple_ipynb_launcher/Ipynb.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,20 @@ Ensure your input JSON file is placed in the correct location **relative to your
1010

1111
```code
1212
alphafold/
13-
├── <uploaded_file>.json
14-
├── fold_input.json # Example input file (provided)
13+
├── <uploaded_file>.json # Your manually uploaded input file
14+
├── fold_input_example.json # Example input file (provided)
1515
└── slurm-rest-api-notebook.ipynb
1616
```
1717

18-
When configuring your data pipeline or inference process, use the correct **relative file path to reference the input JSON**. We provide an example input file of data pipeline process named `fold_input.json` to help you get started quickly.
18+
When configuring your data pipeline or inference process, ensure you use the correct ***relative file path*** to reference the input JSON. To help you get started, we provide an example input file for the data pipeline process named `fold_input_example.json`.
1919

20-
Since both the notebook and the input file are in the same directory (`alphafold/`), you can specify the file like this in your notebook code:
20+
If your input file is located in the same directory(under `/alphafold/` directory) with `fold_input_example.json`, simply update the `input_file` variable in the notebook code to reflect the name of your uploaded file:
2121

2222
```python
23-
input_file= "fold_input.json"
23+
input_file= "fold_input_example.json" # Replace this with your actual file name
2424
```
2525

26-
If you're uploading your own file, simply replace the `input_file` variable with the name of your uploaded file:
27-
28-
```python
29-
input_file = "<uploaded_file>.json"
30-
```
26+
Make sure the file is properly formatted and matches the expected schema (see [AlphaFold Input Documentation](https://github.com/google-deepmind/alphafold3/blob/main/docs/input.md#alphafold-server-json-compatibility) for reference).
3127

3228
**2. Running the Setup Cells (including System Configuration and SLURM Initialization):**
3329

examples/science/af3-slurm/examples/simple_ipynb_launcher/README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,38 +31,43 @@ The version mismatch does not impact the functionality required by this project.
3131
### Resource Unavailability (Out of Capacity)
3232

3333
**Description**:
34-
Your job is queued but not executed because the cloud provider (e.g., GCP) can't provision the required compute nodes. This is often due to a temporary lack of available resources in the chosen region or zone.
34+
Your job is queued but not executed because GCP can't provision the required compute nodes. This is often due to a temporary lack of available resources in the chosen region or zone.
3535

3636
**Resolution**:
37-
- Check the **Controller Logs**:
37+
- Check the Slurm **Controller Node** Log:
3838
Log on to the controller machine for your cluster to see detailed error messages like
3939
`"GCP Error: Zone does not currently have sufficient capacity for resources"`.
4040
- **Wait and Re-check**:
41-
For temporary resource shortages, wait **5–10 minutes** and then re-run the "check job status" cell in your Jupyter notebook. Resources might become available and allow your job to proceed.
41+
For temporary resource shortages, wait **5–10 minutes** and then re-run the `get_job_state` cell in your Jupyter notebook. Resources might become available and allow your job to proceed.
4242

4343
### Node Creation In Progress
4444

4545
**Description**:
46-
After your job is submitted, it takes time for the cluster to spin up new nodes. You might see a `NODE_FAIL` status if nodes are still being created and are not yet ready.
46+
After submitting your job, the cluster may take several minutes to provision and initialize new compute nodes. During this time, your job might temporarily show a status like `NODE_FAIL` if the nodes are not yet fully ready or registered.
4747

4848
**Resolution**:
49-
- Monitor the **Controller Logs** for status updates.
50-
- **Wait 5–10 minutes**, then recheck your job status to see if nodes have become available.
51-
52-
---
53-
54-
### Runtime-Related Issues
55-
56-
These issues occur once your job attempts to run on the allocated nodes.
49+
- Check the Slurm **Controller Node** Logs for detailed status updates.
50+
- **Wait 5–10 minutes**, then recheck your job status to see if the nodes have become available and the job is progressing.
5751

5852
### Input File Format Error
5953

6054
**Description**:
6155
Your job might fail immediately if the input file format is incorrect or if the file is corrupted.
6256

6357
**Resolution**:
64-
- Review the **Job Logs** to identify input file issues.
65-
- Ensure the input file meets the expected format and isn't corrupted.
58+
- Review the **Job Logs** to identify issues related to the input file. Logs are located at:
59+
- `/home/af3ipynb/datapipeline_result/<input_file_name>/<timestamp>/slurm_logs/job_<job_id>/*.txt` for **data pipeline** process
60+
- `/home/af3ipynb/inference_result/<input_file_name>/<timestamp>/slurm_logs/job_<job_id>/*.txt` for **inference** process.
61+
62+
Each directory contains:
63+
- `err.txt` – captures detailed **STDERR** output.
64+
- `out.txt` – captures **STDOUT** output.
65+
66+
- Ensure that the input file:
67+
- Conforms to the expected format. Currently supported formats include alphafoldserver and alphafold3.
68+
- Is not corrupted.
69+
70+
For detailed input file requirements, please refer to [Alphafold Input Documentation](https://github.com/google-deepmind/alphafold3/blob/main/docs/input.md#alphafold-server-json-compatibility).
6671

6772
### Out of Memory (OOM) Issue
6873

examples/science/af3-slurm/examples/simple_ipynb_launcher/adm/slurm-rest-api-notebook.ipynb.j2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,11 @@
258258
"# In this example, we will use the output from the datapipeline job.\n",
259259
"# Datapipeline job could returns multiple output files in case the input file is a JSON file with multiple protein sequences\n",
260260
"# The output path is a list of dictionaries, each containing the path to the output file\n",
261-
"# The first output path is used as input for inference\n",
261+
"# In this example, the first datapipeline output is used as input for inference\n",
262262
"print(\"[INFO] Extracting output paths from datapipeline job response...\")\n",
263263
"print(\"[INFO] Datapipeline output path count:\", len(datapipeline_submit_job_response[\"output_path_list\"]))\n",
264-
"inference_input_file = datapipeline_submit_job_response[\"output_path_list\"][0][\"output_path\"]\n",
264+
"output_index = 0 # Change this index if you want to use a different output file\n",
265+
"inference_input_file = datapipeline_submit_job_response[\"output_path_list\"][output_index][\"output_path\"]\n",
265266
"\n",
266267
"# Assign `enable_unified_memory` with True or False\n",
267268
"# No changes required to run default settings\n",

examples/science/af3-slurm/examples/simple_ipynb_launcher/adm/slurm_client.py.j2

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ class AF3SlurmClient:
213213

214214
def submit_inference_job(self, input_file: str, partition_name: str, enable_unified_memory: Optional[bool] = None, output_dir: Optional[str] = None) -> Optional[Dict]:
215215
"""Submits an inference job to Slurm server."""
216+
217+
if not input_file:
218+
raise ValueError("Input file must be provided.")
219+
216220
partition_config = self.PARTITION_CONFIG_MAP.get(partition_name, {})
217221
if not partition_config:
218222
raise ValueError(
@@ -258,7 +262,10 @@ class AF3SlurmClient:
258262
input_file=input_file
259263
)
260264
output_path_list: List[Dict] = []
261-
for sanitised_input_name in sanitised_input_name_list:
265+
266+
print(
267+
f"[INFO] Inference output path for input file: {input_file}")
268+
for index, sanitised_input_name in enumerate(sanitised_input_name_list):
262269
inference_model_cif_output_path = os.path.join(
263270
output_dir, f"{sanitised_input_name}", f"{sanitised_input_name}_model.cif")
264271
inference_summary_confidences_output_path = os.path.join(
@@ -270,19 +277,21 @@ class AF3SlurmClient:
270277
"summary_confidences": inference_summary_confidences_output_path,
271278
"confidences": inference_confidences_output_path
272279
})
273-
274-
print(f"[INFO] Output path for input file: {sanitised_input_name}")
275280
print(
276-
f" ├── Inference model CIF output path : {inference_model_cif_output_path}")
281+
f" ├── Model CIF output path {index+1} : {inference_model_cif_output_path}")
277282
print(
278-
f" ├── Inference confidences output path : {inference_confidences_output_path}")
283+
f" ├── Confidences output path {index+1} : {inference_confidences_output_path}")
279284
print(
280-
f" └── Inference summary confidences output path : {inference_summary_confidences_output_path}")
285+
f" └── Summary confidences output path {index+1} : {inference_summary_confidences_output_path}")
281286
response["output_path_list"] = output_path_list
282287
return response
283288

284289
def submit_data_pipeline_job(self, input_file: str, partition_name: str, output_dir: Optional[str] = None) -> Optional[Dict]:
285-
"""Submits an data pipeline job to Slurm server."""
290+
"""Submits a data pipeline job to Slurm server."""
291+
292+
if not input_file:
293+
raise ValueError("Input file must be provided.")
294+
286295
partition_config = self.PARTITION_CONFIG_MAP.get(partition_name, {})
287296
if not partition_config:
288297
raise ValueError(
@@ -320,15 +329,17 @@ class AF3SlurmClient:
320329
sanitised_input_name_list = retrieve_sanitised_input_file_name(
321330
input_file)
322331
output_path_list: List[Dict] = []
323-
for sanitised_input_name in sanitised_input_name_list:
332+
333+
print(
334+
f"[INFO] Datapipeline output path for input file: {input_file}")
335+
for index, sanitised_input_name in enumerate(sanitised_input_name_list):
324336
datapipeline_output_file_path = os.path.join(
325337
output_dir, f"{sanitised_input_name}", f"{sanitised_input_name}_data.json")
326338
output_path_list.append({
327339
"output_path": datapipeline_output_file_path
328340
})
329-
print(f"[INFO] Output path for input file: {sanitised_input_name}")
330341
print(
331-
f" └── Datapipeline output path : {datapipeline_output_file_path}")
342+
f" └── Path {index+1} : {datapipeline_output_file_path}")
332343

333344
response["output_path_list"] = output_path_list
334345
return response

0 commit comments

Comments
 (0)