Agentic Medical Deep Learning Engineer
Project description
Med-DLE: Agentic Medical Deep Learning Engineer
MedDLE is designed to be a codegen agentic system for medical deep learning tasks.
Quick Start
Setup environment
- we recommand use
condato create a virtual environment:
conda create --name meddle python=3.11
conda activate meddle
- Then install
meddlevia:
pip install -r requirements.txt
pip install -e .
optional: use
uvto speedup installationpip install uv uv pip install -r requirements.txt uv pip install -e .
-
Get data from link and move the data into
med_dl_tasks -
remember to set up your private api key of OPENAI/ANTROPIC/OPENROUNTER
export OPENAI_BASE_URL="<your base url>" # (e.g. https://api.openai.com/v1)
export OPENAI_API_KEY="<your key>"
Basic codegen
Use bash run.sh to run the demo experiment.
MONAI-enhanced codegen
We highlight MONAI as a helpful candidate for medical DL codegen with Prompt/RAG mode:
Prompt mode
meddle data_dir="meddle/med_dl_tasks/odir5k_2d_mlc" exp_name="monai_prompt-odir5k_2d_mlc"\
goal="Classify 2D Medical images into different categories in a multi-label setting" \
eval="Use the average of kappa score, F-1 score, and AUC value metric between the predicted and ground-truth values." \
agent.steps=20 agent.force_monai_with_prompt=true
RAG mode
1. Create the knowledge database
Firstly, download the persisted database into meddle/monai_rag from link.
Or you can create the db with this cmd:
cd meddle/monai_rag
python create_monai_rag_db.py
You could use python -m meddle.monai_rag.query_rag_db to check whether the creation succeeds.
2. enable the feature in agent
Here's some example:
meddle data_dir="meddle/med_dl_tasks/odir5k_2d_mlc" exp_name="monai_prompt_kb-odir5k_2d_mlc"\
goal="Classify 2D Medical images into different categories in a multi-label setting" \
eval="Use the average of kappa score, F-1 score, and AUC value metric between the predicted and ground-truth values." \
agent.steps=20 agent.force_monai_with_prompt=false agent.enable_monai_knowledge_base=true
meddle data_dir="meddle/med_dl_tasks/odir5k_2d_mlc" exp_name="monai_prompt_kb_q2d-odir5k_2d_mlc"\
goal="Classify 2D Medical images into different categories in a multi-label setting" \
eval="Use the average of kappa score, F-1 score, and AUC value metric between the predicted and ground-truth values." \
agent.steps=20 agent.force_monai_with_prompt=false agent.enable_monai_knowledge_base=true agent.enable_query2doc=true
🙏 Acknowledgement
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meddle-0.1.0.tar.gz.
File metadata
- Download URL: meddle-0.1.0.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f4ffa4bfd0295d5bbd96aec55996063dfc18e9f57bb49378b3778d9df710f6c
|
|
| MD5 |
3fb0d99171e5f7de41989ce23d145c43
|
|
| BLAKE2b-256 |
2399e1619e7d2a11ee6d9cb258c535e077c37c6b402e95a2df46cc3bf217280b
|
File details
Details for the file meddle-0.1.0-py3-none-any.whl.
File metadata
- Download URL: meddle-0.1.0-py3-none-any.whl
- Upload date:
- Size: 46.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4794c2155462fc1307d77411a9b21cb4fd0e5edbb8ce4ed03902b00a30d09a04
|
|
| MD5 |
c2a8326609da48ad144ba906a19363b3
|
|
| BLAKE2b-256 |
0b7370edbd19b2d4312ff023986bf930aabb657f99063cbd634dde868695791a
|