Skip to content

Commit

Permalink
make it to template
Browse files Browse the repository at this point in the history
  • Loading branch information
YuyangXueEd committed Nov 20, 2023
1 parent bf211e8 commit 36040b7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion configs/logger/comet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ comet:
_target_: lightning.pytorch.loggers.comet.CometLogger
api_key: ${oc.env:COMET_API_TOKEN} # api key is loaded from environment variable
save_dir: "${paths.output_dir}"
project_name: "fastmri_reconstruction_unet"
project_name: "MRI_Recon_fastMRI_Template"
rest_api_key: null
# experiment_name: ""
experiment_key: null # set to resume experiment
Expand Down
2 changes: 1 addition & 1 deletion configs/train.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defaults:
- debug: null

# task name, determines output directory path
task_name: "fastmri_knee_training"
task_name: "MRI_Recon_fastMRI_Template"

# tags to help you identify your experiments
# you can overwrite this in experiment configs
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
setup(
name="src",
version="0.0.1",
description="Describe Your Cool Project",
author="",
author_email="",
url="https://github.com/user/project",
description="MRI Reconstruction using Lighting and Hydra",
author="Yuyang Xue",
author_email="yuyang.xue@ed.ac.uk",
url="https://github.com/YuyangXueEd/ReconHydra",
install_requires=["lightning", "hydra-core"],
packages=find_packages(),
# use this to customize global commands available in the terminal after installing the package
Expand Down
3 changes: 2 additions & 1 deletion src/data/fastmri_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def __init__(
if sample_rate is not None and volume_sample_rate is not None:
raise ValueError("Either sample_rate or volume_sample_rate should be set but not both.")

Path("../data/caches/").mkdir(parents=True, exist_ok=True)
self.dataset_cache_file = Path('../data/caches/' + dataset_cache_file)
self.transform = transform
self.recons_key = "reconstruction_rss" if challenge == "multicoil" else "reconstruction_esc"
Expand Down Expand Up @@ -471,7 +472,7 @@ def __init__(

# this line allows to access init params with 'self.hparams' attribute
# also ensures init params will be stored in ckpt
self.save_hyperparameters(logger=False)
self.save_hyperparameters(ignore=['net'])

self.data_path = Path(data_path)
self.challenge = challenge
Expand Down
2 changes: 1 addition & 1 deletion src/models/mri_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(

# this line allows to access init params with 'self.hparams' attribute
# also ensures init params will be stored in ckpt
self.save_hyperparameters(logger=False)
self.save_hyperparameters(ignore=['net'])

self.num_log_images = num_log_images

Expand Down

0 comments on commit 36040b7

Please sign in to comment.