mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-06-02 20:32:02 -05:00
Fix test naming and enhance plot detection
This commit is contained in:
@@ -1110,15 +1110,8 @@ def test_module_dataloader_tensor_yield():
|
||||
|
||||
# %%
|
||||
if __name__ == "__main__":
|
||||
# Unit tests
|
||||
test_unit_dataset_interface()
|
||||
test_unit_dataloader()
|
||||
test_unit_simple_dataset()
|
||||
test_unit_dataloader_pipeline()
|
||||
# Integration test
|
||||
test_module_dataloader_tensor_yield()
|
||||
|
||||
from tito.tools.testing import run_module_tests_auto
|
||||
|
||||
# Automatically discover and run all tests in this module
|
||||
success = run_module_tests_auto("DataLoader")
|
||||
|
||||
|
||||
@@ -501,7 +501,7 @@ test_unit_add_operation()
|
||||
|
||||
# Run inline tests when module is executed directly
|
||||
if __name__ == "__main__":
|
||||
test_add_operation()
|
||||
test_unit_add_operation()
|
||||
|
||||
# %% [markdown]
|
||||
"""
|
||||
|
||||
@@ -1444,16 +1444,8 @@ Time to test your implementation! This section uses TinyTorch's standardized tes
|
||||
# =============================================================================
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Unit tests
|
||||
test_unit_gradient_descent_step()
|
||||
test_unit_sgd_optimizer()
|
||||
test_unit_adam_optimizer()
|
||||
test_unit_step_scheduler()
|
||||
test_unit_training_integration()
|
||||
# Integration test
|
||||
test_module_optimizer_autograd_compatibility()
|
||||
|
||||
from tito.tools.testing import run_module_tests_auto
|
||||
|
||||
# Automatically discover and run all tests in this module
|
||||
success = run_module_tests_auto("Optimizers")
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ def test_unit_mse_loss():
|
||||
print("🎯 MSE Loss: All tests passed!")
|
||||
|
||||
# Run the test
|
||||
test_mse_loss()
|
||||
test_unit_mse_loss()
|
||||
|
||||
# %% nbgrader={"grade": false, "grade_id": "crossentropy-loss", "locked": false, "schema_version": 3, "solution": true, "task": false}
|
||||
#| export
|
||||
@@ -379,7 +379,7 @@ def test_unit_crossentropy_loss():
|
||||
print("🎯 CrossEntropy Loss: All tests passed!")
|
||||
|
||||
# Run the test
|
||||
test_crossentropy_loss()
|
||||
test_unit_crossentropy_loss()
|
||||
|
||||
# %% nbgrader={"grade": false, "grade_id": "binary-crossentropy-loss", "locked": false, "schema_version": 3, "solution": true, "task": false}
|
||||
#| export
|
||||
@@ -515,7 +515,7 @@ def test_unit_binary_crossentropy_loss():
|
||||
print("🎯 Binary CrossEntropy Loss: All tests passed!")
|
||||
|
||||
# Run the test
|
||||
test_binary_crossentropy_loss()
|
||||
test_unit_binary_crossentropy_loss()
|
||||
|
||||
# %% [markdown]
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user