Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ temp/
anas-ntbs/

# WIP scripts
src/microbiome_gpt/run_data_preparation.py
src/gut_former/run_data_preparation.py

# Personal notes
TODO.md
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fix:
# -----------------------------------------

kernel:
poetry run python -m ipykernel install --user --name=microbiome-gpt --display-name "Python (microbiome-gpt)"
poetry run python -m ipykernel install --user --name=gut-former --display-name "Python (gut-former)"

jupyter:
poetry run jupyter notebook
Expand Down
8 changes: 4 additions & 4 deletions notebooks/figure1a_data_overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"cell_type": "code",
"source": [
"from microbiome_gpt.utils.fig_style import apply_style\n",
"from gut_former.utils.fig_style import apply_style\n",
"\n",
"apply_style(font_family=\"DejaVu Serif\", base_font_size=16)"
],
Expand Down Expand Up @@ -55,7 +55,7 @@
},
"cell_type": "code",
"source": [
"from microbiome_gpt.utils.project_paths import find_data_path, find_figures_path\n",
"from gut_former.utils.project_paths import find_data_path, find_figures_path\n",
"\n",
"data_path = find_data_path()\n",
"figures_path = find_figures_path()"
Expand Down Expand Up @@ -618,9 +618,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python (microbiome-gpt)",
"display_name": "Python (gut-former)",
"language": "python",
"name": "microbiome-gpt"
"name": "gut-former"
},
"language_info": {
"codemirror_mode": {
Expand Down
10 changes: 5 additions & 5 deletions notebooks/figure1b_model_eval.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"source": [
"from microbiome_gpt.utils.fig_style import apply_style\n",
"from gut_former.utils.fig_style import apply_style\n",
"\n",
"apply_style(font_family=\"DejaVu Serif\", base_font_size=16)"
],
Expand Down Expand Up @@ -48,7 +48,7 @@
}
},
"source": [
"from microbiome_gpt.utils.project_paths import find_data_path, find_figures_path\n",
"from gut_former.utils.project_paths import find_data_path, find_figures_path\n",
"\n",
"data_path = find_data_path()\n",
"figures_path = find_figures_path()\n",
Expand Down Expand Up @@ -131,7 +131,7 @@
},
"cell_type": "code",
"source": [
"from microbiome_gpt.utils.analysis import get_pcoa_coords, get_disparity\n",
"from gut_former.utils.analysis import get_pcoa_coords, get_disparity\n",
"\n",
"fig, axes = plt.subplots(1, 2, figsize=(10, 4))\n",
"\n",
Expand Down Expand Up @@ -272,9 +272,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python (microbiome-gpt)",
"display_name": "Python (gut-former)",
"language": "python",
"name": "microbiome-gpt"
"name": "gut-former"
},
"language_info": {
"name": "python",
Expand Down
4 changes: 2 additions & 2 deletions notebooks/figure2_signatures.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"source": [
"from microbiome_gpt.utils.fig_style import apply_style\n",
"from gut_former.utils.fig_style import apply_style\n",
"\n",
"apply_style(font_family=\"DejaVu Serif\", base_font_size=16)"
],
Expand Down Expand Up @@ -54,7 +54,7 @@
}
},
"source": [
"from microbiome_gpt.utils.project_paths import find_data_path, find_figures_path\n",
"from gut_former.utils.project_paths import find_data_path, find_figures_path\n",
"\n",
"data_path = find_data_path()\n",
"output_path = find_data_path().parent / \"output\"\n",
Expand Down
2 changes: 1 addition & 1 deletion src/gut_former/run_data_preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def main():
# Handling Args
p = argparse.ArgumentParser()

p.add_argument("--dataset", type=str, default="raw", help="TODO")
p.add_argument("--dataset", type=str, default="raw", help="Dataset name; expects taxonomy_relab_{dataset}.csv, pathways_relab_{dataset}.csv, and metadata_{dataset}.csv in the data directory, with sample ID as the (optionally unnamed) first column")

args = p.parse_args()

Expand Down
8 changes: 4 additions & 4 deletions src/gut_former/run_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ def main():
# Handling Args
p = argparse.ArgumentParser()

p.add_argument("--dataset", type=str, default="sample", help="TODO")
p.add_argument("--embedding_dim", type=int, default=128, help="TODO")
p.add_argument("--latent_dim", type=int, default=64, help="TODO")
p.add_argument("--dataset", type=str, default="sample", help="Dataset name; expects taxonomy_{dataset}.csv and pathways_{dataset}.csv in the data directory, with sample ID as the (optionally unnamed) first column")
p.add_argument("--embedding_dim", type=int, default=128, help="Embedding dimension for the model")
p.add_argument("--latent_dim", type=int, default=64, help="Latent space dimension; controls the size of the learned representation")
output_path = find_output_path()
p.add_argument("--checkpoint", type=str, default=f"{output_path}/checkpoint_sample.pt", help="TODO")
p.add_argument("--checkpoint", type=str, default=f"{output_path}/checkpoint_sample.pt", help="Path to model checkpoint file to load for inference")
args = p.parse_args()

# Loading & Preparing Data
Expand Down
13 changes: 6 additions & 7 deletions src/gut_former/run_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ def main():

p = argparse.ArgumentParser()

p.add_argument("--dataset", type=str, default="sample", help="TODO")
p.add_argument("--embedding_dim", type=int, default=128, help="TODO")
p.add_argument("--latent_dim", type=int, default=64, help="TODO")
p.add_argument("--batch_size", type=int, default=16, help="TODO")
p.add_argument("--learning_rate", type=float, default=1.893292917167e-4, help="TODO")
p.add_argument("--epochs", type=int, default=55, help="TODO")
p.add_argument("--verbose", type=bool, default=True, help="TODO")
p.add_argument("--dataset", type=str, default="sample", help="Dataset name; expects taxonomy_{dataset}.csv, pathways_{dataset}.csv, and metadata_{dataset}.csv in the data directory, with sample ID as the (optionally unnamed) first column")
p.add_argument("--embedding_dim", type=int, default=128, help="Embedding dimension for the model")
p.add_argument("--latent_dim", type=int, default=64, help="Latent space dimension; controls the size of the learned representation")
p.add_argument("--batch_size", type=int, default=16, help="Mini-batch size for training")
p.add_argument("--learning_rate", type=float, default=1.893292917167e-4, help="Learning rate for the Adam optimizer")
p.add_argument("--epochs", type=int, default=55, help="Number of training epochs")

p.add_argument("--checkpoint", type=str, default=None, help="Path to checkpoint to resume training from")
args = p.parse_args()
Expand Down