-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ruruthia
committed
Sep 27, 2024
1 parent
3a0d189
commit e607e5f
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
def test_imports(): | ||
try: | ||
# Check if external libraries can be imported | ||
import argparse | ||
import uuid | ||
|
||
import neptune | ||
import numpy as np | ||
import tensorflow as tf | ||
from tqdm import trange | ||
|
||
# Check if custom modules can be imported | ||
from cvdm.configs.utils import ( | ||
create_data_config, | ||
create_eval_config, | ||
create_model_config, | ||
create_neptune_config, | ||
create_training_config, | ||
load_config_from_yaml, | ||
) | ||
from cvdm.diffusion_models.joint_model import instantiate_cvdm | ||
from cvdm.utils.inference_utils import ( | ||
log_loss, | ||
log_metrics, | ||
obtain_output_montage_and_metrics, | ||
save_output_montage, | ||
save_weights, | ||
) | ||
from cvdm.utils.training_utils import ( | ||
prepare_dataset, | ||
prepare_model_input, | ||
train_on_batch_cvdm, | ||
) | ||
|
||
assert True # If no ImportError occurs, the test will pass | ||
|
||
except ImportError as e: | ||
assert False, f"Import failed: {e}" |