Skip to content

Commit

Permalink
Add tests for imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruruthia committed Sep 27, 2024
1 parent 3a0d189 commit e607e5f
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions tests/test_imports.py
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}"

0 comments on commit e607e5f

Please sign in to comment.