This guide helps you verify that your extraction jobs on Grete are running correctly and producing expected results.
Check if your job is running, pending, or completed.
squeue -j [JOB_ID]Replace [JOB_ID] with your actual job ID from the sbatch output.
squeue -u $USERPD- Pending: Waiting for GPU resourcesR- Running: Extraction in progressCG- Completing: Job finishing upCD- Completed: Job finished (won't show in squeue)
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
123456 kisski extract_paper u25486 R 0:15 1 gpu001
Watch the extraction progress in real-time while the job is running.
# Automatically finds and follows the newest log file
tail -f $(ls -t extract_*.log | head -n1)tail -f extract_[JOB_ID].logPress Ctrl+C to stop tailing the log.
Good signs:
✓ Paper fetched successfully
✓ PDF parsed successfully
✓ Extracting models from text...
✓ Extraction complete
Models extracted: 3
Warning signs:
ERROR: Failed to parse PDF
WARNING: No models found
AttributeError: ...
Once the job is no longer shown in squeue, check the results.
# Show most recent files with timestamps
ls -lt data/extracted/ | head
# Count total extractions
ls data/extracted/*.json | wc -l# Display the newest extraction file
cat $(ls -t data/extracted/*.json | head -n1)
# View just the beginning
cat $(ls -t data/extracted/*.json | head -n1) | head -100# Files should typically be >1KB
ls -lh data/extracted/*.json | tail -5Empty or tiny files (<100 bytes) indicate extraction failures.
Verify that important fields were extracted correctly.
# Get latest extraction file
LATEST=$(ls -t data/extracted/*.json | head -n1)
# Check if specific fields exist
grep "model_name" $LATEST
grep "parameters" $LATEST
grep "architecture" $LATEST
grep "training_data" $LATESTIf you have jq installed:
cat $(ls -t data/extracted/*.json | head -n1) | jq '.'# Look for status field
grep -A 5 '"status"' $(ls -t data/extracted/*.json | head -n1)Review error logs for any issues during execution.
# Check most recent error file
cat $(ls -t extract_*.err | head -n1)CUDA/GPU errors:
grep -i "cuda\|gpu\|out of memory" extract_*.errPython errors:
grep -i "error\|traceback\|exception" extract_*.errModel loading issues:
grep -i "transformers\|model" extract_*.errCheck that the extracted data is meaningful and complete.
LATEST=$(ls -t data/extracted/*.json | head -n1)
echo "=== Extraction Quality Check ==="
echo "File: $LATEST"
echo ""
echo "Models found:"
grep -c '"model_name"' $LATEST || echo "0"
echo ""
echo "Model names:"
grep '"model_name"' $LATEST
echo ""
echo "Has parameters:"
grep -c '"parameters"' $LATEST || echo "0"- Single model papers: 1 model extracted
- Multi-model papers (like Llama 2): 2-4 models extracted
- Field completeness: Most fields should have values (not null/empty)
For known papers, compare with expected results.
Should extract:
- Llama 2 7B
- Llama 2 13B
- Llama 2 70B
- Llama 2 7B-Chat
- Llama 2 13B-Chat
- Llama 2 70B-Chat
grep '"model_name"' data/extracted/2307.09288_*.jsongrep '"model_name"' data/extracted/*gpt-1*.json# View SLURM accounting info
sacct -j [JOB_ID] --format=JobID,JobName,Elapsed,State,ExitCode- Short papers (~10 pages): 5-15 minutes
- Medium papers (~20 pages): 15-30 minutes
- Long papers (~50+ pages): 30-60 minutes
Much longer times may indicate issues.
For job arrays, check each sub-job.
squeue -j [ARRAY_JOB_ID]# View all tasks in array
sacct -j [ARRAY_JOB_ID] --format=JobID,JobName,State,ExitCode
# Count successful completions
sacct -j [ARRAY_JOB_ID] | grep -c "COMPLETED"# Count expected vs actual extractions
echo "Papers in batch: 5"
echo "Extractions completed: $(ls data/extracted/*.json | wc -l)"If verification fails, check:
- Job completed (not canceled or failed)
- No errors in
extract_*.errfile - Output file exists in
data/extracted/ - Output file is not empty (>1KB)
- JSON is valid (no parsing errors)
- Model names extracted
- Key fields populated (parameters, architecture, etc.)
If issues persist:
- Check logs: Review full log and error files
- Check resources: Verify GPU/memory usage
- Try different paper: Test with known working paper
- Consult troubleshooting: See troubleshooting docs
# Monitor job
squeue -u $USER
tail -f extract_*.log
# Check results
ls -lt data/extracted/ | head
cat $(ls -t data/extracted/*.json | head -n1) | head -50
# Check errors
cat $(ls -t extract_*.err | head -n1)
# Verify extraction
grep -c '"model_name"' $(ls -t data/extracted/*.json | head -n1)✅ Job status shows R (running) then disappears from queue
✅ Log file shows "✓ EXTRACTION COMPLETE"
✅ JSON file created in data/extracted/
✅ File size >1KB
✅ At least one model extracted
✅ No errors in .err file
✅ Key fields populated (model_name, parameters, etc.)
If all indicators are green, your extraction was successful!