Closed codingwithsurya closed 12 months ago
@karkir0003 @dwu359
took a stab at this. a couple questions i had was.
self.train_set = datasets.__dict__[dataset_name](root='./backend/image_data_uploads', train=True, download=True, transform=self.train_transform)
self.test_set = datasets.__dict__[dataset_name](root='./backend/image_data_uploads', train=False, download=True, transform=self.test_transform)
With transition to django, is the path for data uploads still gonna be in backend/data_uploads?
Does my image.py look good in /routes/image? Is there any particular i have to add for image training?
Any additional schemas for image classification? I think i got the right ones.
If everything looks good here (no red flags in code), i can begin testing with our default datsets to make sure our trainspace flow is working as intended.
for image data uploads, please dont use backend/ dir.
for image data uploads, please dont use backend/ dir.
sure, then what directory do i use? I dont see a similar directory in /training
i think u can test the endpoint out @codingwithsurya
for image data uploads, please dont use backend/ dir.
sure, then what directory do i use? I dont see a similar directory in /training
should be clarified
for image data uploads, please dont use backend/ dir.
sure, then what directory do i use? I dont see a similar directory in /training
should be clarified
yea looks good. i just commited what we talked about. and i'll test on colab as well soon when i get a chance.
added minor comments on static typing python
addressed all these
TO-DO: find viable nnSequential PyTorch MNIST Architecture for testing
TODO: Cross-Entropy Loss not computing correctly. Figure out correct param for FLATTEN in current architecture.
Otherwise, we can make our own
Update: MNIST dataset testing works!
TODO: Train/test transforms as parameter to endpoint. CIFAR10 Testing.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
6 Code Smells
No Coverage information
0.0% Duplication
Migrate Image Training Endpoint to Django
Github Issue Number Here: Feature#993
What user problem are we solving?
With the ongoing migration from Flask Blueprint to Django for better scalability and maintainability, we need to ensure that the training endpoints for image datasets continue to function as expected. Users need a reliable endpoint to submit image training requests and this migration aims to improve the overall infrastructure.
What solution does this PR provide?
This PR introduces the /image route within the Django framework, replacing the old Flask Blueprint route. The new route handles image training requests, particularly focusing on classification tasks as regression is not supported. The structure of this endpoint is mirrored from the specified reference, with adjustments made to fit the Django framework. The old image train code served as inspiration for ensuring that the necessary features and behaviors are retained.
Testing Methodology
Testing yet to be done but to verify the functionality and integrity of the new /image route, but when testing begins, we can submit training requests using torch built-in datasets (MNIST, FashionMNIST) to ensure that models train as expected and the endpoint returns accurate results.
Also use postman for testing .
Any other considerations