Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unittest PR for workflow update #14

Merged
merged 7 commits into from
Nov 20, 2023
Merged

Unittest PR for workflow update #14

merged 7 commits into from
Nov 20, 2023

Conversation

eatpk
Copy link
Collaborator

@eatpk eatpk commented Nov 20, 2023

No description provided.

@sangkeun00
Copy link
Collaborator

LGTM. You can merge the request after fixing the black-formatting issue.

@eatpk eatpk force-pushed the unit-test-compute branch 8 times, most recently from 827110e to 9866c7f Compare November 20, 2023 03:48
Comment on lines +11 to +19
def construct_mlp(num_inputs=784, num_classes=10):
return torch.nn.Sequential(
nn.Flatten(),
nn.Linear(num_inputs, 4, bias=False),
nn.ReLU(),
nn.Linear(4, 2, bias=False),
nn.ReLU(),
nn.Linear(2, num_classes, bias=False),
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to make to smaller version of the model.

Comment on lines +1 to +8
import unittest
import torch
import torchvision
import torch.nn as nn
import numpy as np
import os

DEVICE = torch.device("cpu")
Copy link
Collaborator Author

@eatpk eatpk Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only testing the compute_influence as I think the train.py does not include anything from analog lib.

I strongly think that this test may have to be removed before the public release from the /tests/ as this is not pertaining to the actual module we are building. However, I am leaving it here as per the internal contributors may overlook the test run of their work in local with the mnist data.

Caveat, this may not well represent the overall behavior of the module as the sheer size of the model architecture.

@eatpk eatpk merged commit ee8b734 into main Nov 20, 2023
2 checks passed
@sangkeun00 sangkeun00 deleted the unit-test-compute branch December 28, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants