Download tests/test_model_loading.py from milansharma94/Resona: direct link, hf CLI and curl.
- Browser
- Download file 541 Bytes
-
https://huggingface.co/milansharma94/Resona/resolve/main/tests/test_model_loading.py
- Command line
-
hf download hf://milansharma94/Resona/tests/test_model_loading.py
-
curl -L -o test_model_loading.py https://huggingface.co/milansharma94/Resona/resolve/main/tests/test_model_loading.py
541 Bytes
| """ | |
| Test Model Loading for Resona | |
| """ | |
| import sys | |
| import os | |
| import torch | |
| REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) | |
| sys.path.insert(0, REPO_ROOT) | |
| from resona.core.model import ResonaModel | |
| def test_model_instantiation(): | |
| print("Testing ResonaModel instantiation on CPU...") | |
| model = ResonaModel(device="cpu") | |
| assert isinstance(model, torch.nn.Module) | |
| assert len(model.vocab) > 50 | |
| print("[PASS] ResonaModel loaded successfully.") | |
| if __name__ == "__main__": | |
| test_model_instantiation() | |