diff --git a/.github/Architecture.md b/.github/Architecture.md index 3ce72670c..cf373f546 100644 --- a/.github/Architecture.md +++ b/.github/Architecture.md @@ -4,44 +4,44 @@ ``` 📦 backend +| |- 📂 common: +| | |- 📜 default_datasets.py : store logic to load in default datasets from scikit-learn +| | |- 📜 ai_drive.py +| | |- 📜 optimizer.py : what optimizer to use (ie: SGD or Adam for now) +| | |- 📜 __init__.py +| | |- 📜 kernel.py +| | |- 📜 constants.py : list of helpful constants +| | |- 📜 dataset.py : read in the dataset through URL or file upload +| | |- 📜 preprocessing.py +| | |- 📜 utils.py : utility functions that could be helpful +| | |- 📜 email_notifier.py : Endpoint to send email notification of training results via API Gateway + AWS SES +| | |- 📜 loss_functions.py : loss function enum | |- 📂 aws_helpers: | | |- 📂 dynamo_db_utils: -| | | |- 📜 trainspace_db.py -| | | |- 📜 constants.py : list of helpful constants | | | |- 📜 userprogress_db.py +| | | |- 📜 constants.py : list of helpful constants | | | |- 📜 DynamoUnitTests.md +| | | |- 📜 trainspace_db.py | | | |- 📜 dynamo_db_utils.py | | |- 📜 __init__.py | |- 📂 ml: -| | |- 📜 ml_model_parser.py -| | |- 📜 __init__.py | | |- 📜 ml_trainer.py : train a classical machine learning learning model on the dataset -| |- 📂 common: -| | |- 📜 loss_functions.py : loss function enum -| | |- 📜 default_datasets.py : store logic to load in default datasets from scikit-learn -| | |- 📜 dataset.py : read in the dataset through URL or file upload -| | |- 📜 constants.py : list of helpful constants -| | |- 📜 utils.py : utility functions that could be helpful +| | |- 📜 ml_model_parser.py | | |- 📜 __init__.py -| | |- 📜 preprocessing.py -| | |- 📜 ai_drive.py -| | |- 📜 kernel.py -| | |- 📜 email_notifier.py : Endpoint to send email notification of training results via API Gateway + AWS SES -| | |- 📜 optimizer.py : what optimizer to use (ie: SGD or Adam for now) | |- 📂 dl: -| | |- 📜 dl_eval.py : Evaluation functions for deep learning models in Pytorch (eg: accuracy, loss, etc) +| | |- 📜 dl_model_parser.py : parse the user specified pytorch model | | |- 📜 dl_model.py : torch model based on user specifications from drag and drop | | |- 📜 __init__.py +| | |- 📜 dl_eval.py : Evaluation functions for deep learning models in Pytorch (eg: accuracy, loss, etc) | | |- 📜 dl_trainer.py : train a deep learning model on the dataset -| | |- 📜 dl_model_parser.py : parse the user specified pytorch model | | |- 📜 detection.py -| |- 📜 app.py : run the backend (entrypoint script) -| |- 📜 poetry.lock -| |- 📜 epoch_times.csv | |- 📜 __init__.py | |- 📜 data.csv : data csv file for use in the playground -| |- 📜 middleware.py | |- 📜 pyproject.toml +| |- 📜 middleware.py +| |- 📜 poetry.lock +| |- 📜 app.py : run the backend (entrypoint script) +| |- 📜 epoch_times.csv ``` ## Frontend Architecture @@ -53,171 +53,171 @@ | | |- 📜 Linear.md : Doc for Linear layer | | |- 📜 ReLU.md : Doc for ReLU later | | |- 📜 softmax_equation.png : PNG file of Softmax equation +| |- 📂 public: +| | |- 📂 images: +| | | |- 📂 wiki_images: +| | | | |- 📜 tanh_plot.png +| | | | |- 📜 dropout_diagram.png +| | | | |- 📜 tanh_equation.png +| | | | |- 📜 conv2d2.gif +| | | | |- 📜 batchnorm_diagram.png +| | | | |- 📜 conv2d.gif +| | | | |- 📜 maxpool2d.gif +| | | | |- 📜 softmax_equation.png : PNG file of Softmax equation +| | | | |- 📜 sigmoid_equation.png +| | | | |- 📜 avgpool_maxpool.gif +| | | |- 📂 learn_mod_images: +| | | | |- 📜 lossExample.png +| | | | |- 📜 robotImage.jpg +| | | | |- 📜 LeakyReLUactivation.png +| | | | |- 📜 neuralnet.png +| | | | |- 📜 lossExampleTable.png +| | | | |- 📜 binarystepactivation.png +| | | | |- 📜 ReLUactivation.png +| | | | |- 📜 sigmoidfunction.png +| | | | |- 📜 tanhactivation.png +| | | | |- 📜 neuronWithEquation.png +| | | | |- 📜 neuron.png +| | | | |- 📜 lossExampleEquation.png +| | | | |- 📜 sigmoidactivation.png +| | | |- 📂 logos: +| | | | |- 📂 dlp_branding: +| | | | | |- 📜 dlp-logo.png : DLP Logo, duplicate of files in public, but essential as the frontend can't read public +| | | | | |- 📜 dlp-logo.svg : DLP Logo, duplicate of files in public, but essential as the frontend can't read public +| | | | |- 📜 dsgt-logo-light.png +| | | | |- 📜 pandas-logo.png +| | | | |- 📜 github.png +| | | | |- 📜 flask-logo.png +| | | | |- 📜 react-logo.png +| | | | |- 📜 aws-logo.png +| | | | |- 📜 pytorch-logo.png +| | | | |- 📜 dsgt-logo-white-back.png +| | | | |- 📜 dsgt-logo-dark.png +| | | | |- 📜 python-logo.png +| | | | |- 📜 google.png +| | | |- 📜 demo_video.gif : GIF tutorial of a simple classification training session +| | |- 📜 manifest.json : Default React file for choosing icon based on +| | |- 📜 index.html : Base HTML file that will be initially rendered +| | |- 📜 dlp-logo.ico : DLP Logo +| | |- 📜 robots.txt | |- 📂 src: +| | |- 📂 backend_outputs: +| | | |- 📜 model.pt : Last model.pt output +| | | |- 📜 my_deep_learning_model.onnx : Last ONNX file output +| | | |- 📜 model.pkl +| | |- 📂 common: +| | | |- 📂 redux: +| | | | |- 📜 userLogin.ts +| | | | |- 📜 train.ts +| | | | |- 📜 backendApi.ts +| | | | |- 📜 store.ts +| | | | |- 📜 hooks.ts +| | | |- 📂 styles: +| | | | |- 📜 Home.module.css +| | | | |- 📜 globals.css +| | | |- 📂 components: +| | | | |- 📜 Spacer.tsx +| | | | |- 📜 Footer.tsx +| | | | |- 📜 TitleText.tsx +| | | | |- 📜 DlpTooltip.tsx +| | | | |- 📜 HtmlTooltip.tsx +| | | | |- 📜 EmailInput.tsx +| | | | |- 📜 NavBarMain.tsx +| | | | |- 📜 ClientOnlyPortal.tsx +| | | |- 📂 utils: +| | | | |- 📜 firebase.ts +| | | | |- 📜 dndHelpers.ts +| | | | |- 📜 dateFormat.ts | | |- 📂 features: -| | | |- 📂 LearnMod: -| | | | |- 📜 ModulesSideBar.tsx -| | | | |- 📜 MCQuestion.tsx -| | | | |- 📜 ClassCard.tsx -| | | | |- 📜 ImageComponent.tsx -| | | | |- 📜 FRQuestion.tsx -| | | | |- 📜 LearningModulesContent.tsx -| | | | |- 📜 Exercise.tsx -| | | |- 📂 Dashboard: -| | | | |- 📂 redux: -| | | | | |- 📜 dashboardApi.ts -| | | | |- 📂 components: -| | | | | |- 📜 TrainBarChart.tsx -| | | | | |- 📜 TrainDoughnutChart.tsx -| | | | | |- 📜 TrainDataGrid.tsx | | | |- 📂 Train: +| | | | |- 📂 constants: +| | | | | |- 📜 trainConstants.ts +| | | | |- 📂 types: +| | | | | |- 📜 trainTypes.ts +| | | | |- 📂 redux: +| | | | | |- 📜 trainspaceSlice.ts +| | | | | |- 📜 trainspaceApi.ts | | | | |- 📂 features: -| | | | | |- 📂 Tabular: -| | | | | | |- 📂 redux: -| | | | | | | |- 📜 tabularActions.ts -| | | | | | | |- 📜 tabularApi.ts -| | | | | | |- 📂 components: -| | | | | | | |- 📜 TabularReviewStep.tsx -| | | | | | | |- 📜 TabularDatasetStep.tsx -| | | | | | | |- 📜 TabularFlow.tsx -| | | | | | | |- 📜 TabularTrainspace.tsx -| | | | | | | |- 📜 TabularParametersStep.tsx -| | | | | | |- 📂 types: -| | | | | | | |- 📜 tabularTypes.ts -| | | | | | |- 📂 constants: -| | | | | | | |- 📜 tabularConstants.ts -| | | | | | |- 📜 index.ts | | | | | |- 📂 Image: +| | | | | | |- 📂 constants: +| | | | | | | |- 📜 imageConstants.ts +| | | | | | |- 📂 types: +| | | | | | | |- 📜 imageTypes.ts | | | | | | |- 📂 redux: -| | | | | | | |- 📜 imageActions.ts | | | | | | | |- 📜 imageApi.ts +| | | | | | | |- 📜 imageActions.ts | | | | | | |- 📂 components: +| | | | | | | |- 📜 ImageFlow.tsx | | | | | | | |- 📜 ImageDatasetStep.tsx | | | | | | | |- 📜 ImageTrainspace.tsx | | | | | | | |- 📜 ImageReviewStep.tsx | | | | | | | |- 📜 ImageParametersStep.tsx -| | | | | | | |- 📜 ImageFlow.tsx -| | | | | | |- 📂 types: -| | | | | | | |- 📜 imageTypes.ts +| | | | | | |- 📜 index.ts +| | | | | |- 📂 Tabular: | | | | | | |- 📂 constants: -| | | | | | | |- 📜 imageConstants.ts +| | | | | | | |- 📜 tabularConstants.ts +| | | | | | |- 📂 types: +| | | | | | | |- 📜 tabularTypes.ts +| | | | | | |- 📂 redux: +| | | | | | | |- 📜 tabularActions.ts +| | | | | | | |- 📜 tabularApi.ts +| | | | | | |- 📂 components: +| | | | | | | |- 📜 TabularParametersStep.tsx +| | | | | | | |- 📜 TabularDatasetStep.tsx +| | | | | | | |- 📜 TabularTrainspace.tsx +| | | | | | | |- 📜 TabularFlow.tsx +| | | | | | | |- 📜 TabularReviewStep.tsx | | | | | | |- 📜 index.ts -| | | | |- 📂 redux: -| | | | | |- 📜 trainspaceApi.ts -| | | | | |- 📜 trainspaceSlice.ts | | | | |- 📂 components: -| | | | | |- 📜 DatasetStepLayout.tsx | | | | | |- 📜 CreateTrainspace.tsx +| | | | | |- 📜 DatasetStepLayout.tsx | | | | | |- 📜 TrainspaceLayout.tsx -| | | | |- 📂 types: -| | | | | |- 📜 trainTypes.ts -| | | | |- 📂 constants: -| | | | | |- 📜 trainConstants.ts | | | |- 📂 Feedback: | | | | |- 📂 redux: | | | | | |- 📜 feedbackApi.ts +| | | |- 📂 Dashboard: +| | | | |- 📂 redux: +| | | | | |- 📜 dashboardApi.ts +| | | | |- 📂 components: +| | | | | |- 📜 TrainDataGrid.tsx +| | | | | |- 📜 TrainBarChart.tsx +| | | | | |- 📜 TrainDoughnutChart.tsx +| | | |- 📂 LearnMod: +| | | | |- 📜 MCQuestion.tsx +| | | | |- 📜 ImageComponent.tsx +| | | | |- 📜 ModulesSideBar.tsx +| | | | |- 📜 Exercise.tsx +| | | | |- 📜 FRQuestion.tsx +| | | | |- 📜 LearningModulesContent.tsx +| | | | |- 📜 ClassCard.tsx | | | |- 📂 OpenAi: | | | | |- 📜 openAiUtils.ts | | |- 📂 pages: | | | |- 📂 train: -| | | | |- 📜 [train_space_id].tsx | | | | |- 📜 index.tsx -| | | |- 📜 LearnContent.tsx +| | | | |- 📜 [train_space_id].tsx +| | | |- 📜 login.tsx | | | |- 📜 feedback.tsx -| | | |- 📜 dashboard.tsx | | | |- 📜 learn.tsx -| | | |- 📜 wiki.tsx -| | | |- 📜 forgot.tsx +| | | |- 📜 dashboard.tsx | | | |- 📜 about.tsx -| | | |- 📜 _app.tsx -| | | |- 📜 login.tsx | | | |- 📜 _document.tsx +| | | |- 📜 _app.tsx | | | |- 📜 settings.tsx -| | |- 📂 common: -| | | |- 📂 styles: -| | | | |- 📜 Home.module.css -| | | | |- 📜 globals.css -| | | |- 📂 redux: -| | | | |- 📜 hooks.ts -| | | | |- 📜 train.ts -| | | | |- 📜 store.ts -| | | | |- 📜 backendApi.ts -| | | | |- 📜 userLogin.ts -| | | |- 📂 components: -| | | | |- 📜 DlpTooltip.tsx -| | | | |- 📜 Footer.tsx -| | | | |- 📜 HtmlTooltip.tsx -| | | | |- 📜 NavBarMain.tsx -| | | | |- 📜 Spacer.tsx -| | | | |- 📜 EmailInput.tsx -| | | | |- 📜 TitleText.tsx -| | | | |- 📜 ClientOnlyPortal.tsx -| | | |- 📂 utils: -| | | | |- 📜 dndHelpers.ts -| | | | |- 📜 firebase.ts -| | | | |- 📜 dateFormat.ts -| | |- 📂 backend_outputs: -| | | |- 📜 model.pt : Last model.pt output -| | | |- 📜 my_deep_learning_model.onnx : Last ONNX file output -| | | |- 📜 model.pkl -| | |- 📜 next-env.d.ts +| | | |- 📜 forgot.tsx +| | | |- 📜 LearnContent.tsx +| | | |- 📜 wiki.tsx | | |- 📜 iris.csv : Sample CSV data -| | |- 📜 constants.ts | | |- 📜 GlobalStyle.ts -| |- 📂 public: -| | |- 📂 images: -| | | |- 📂 wiki_images: -| | | | |- 📜 sigmoid_equation.png -| | | | |- 📜 batchnorm_diagram.png -| | | | |- 📜 maxpool2d.gif -| | | | |- 📜 conv2d.gif -| | | | |- 📜 conv2d2.gif -| | | | |- 📜 dropout_diagram.png -| | | | |- 📜 tanh_equation.png -| | | | |- 📜 avgpool_maxpool.gif -| | | | |- 📜 tanh_plot.png -| | | | |- 📜 softmax_equation.png : PNG file of Softmax equation -| | | |- 📂 learn_mod_images: -| | | | |- 📜 neuralnet.png -| | | | |- 📜 robotImage.jpg -| | | | |- 📜 ReLUactivation.png -| | | | |- 📜 neuronWithEquation.png -| | | | |- 📜 tanhactivation.png -| | | | |- 📜 sigmoidactivation.png -| | | | |- 📜 binarystepactivation.png -| | | | |- 📜 lossExampleTable.png -| | | | |- 📜 sigmoidfunction.png -| | | | |- 📜 neuron.png -| | | | |- 📜 LeakyReLUactivation.png -| | | | |- 📜 lossExample.png -| | | | |- 📜 lossExampleEquation.png -| | | |- 📂 logos: -| | | | |- 📂 dlp_branding: -| | | | | |- 📜 dlp-logo.png : DLP Logo, duplicate of files in public, but essential as the frontend can't read public -| | | | | |- 📜 dlp-logo.svg : DLP Logo, duplicate of files in public, but essential as the frontend can't read public -| | | | |- 📜 dsgt-logo-dark.png -| | | | |- 📜 google.png -| | | | |- 📜 react-logo.png -| | | | |- 📜 flask-logo.png -| | | | |- 📜 pytorch-logo.png -| | | | |- 📜 aws-logo.png -| | | | |- 📜 dsgt-logo-light.png -| | | | |- 📜 github.png -| | | | |- 📜 pandas-logo.png -| | | | |- 📜 python-logo.png -| | | | |- 📜 dsgt-logo-white-back.png -| | | |- 📜 demo_video.gif : GIF tutorial of a simple classification training session -| | |- 📜 index.html : Base HTML file that will be initially rendered -| | |- 📜 robots.txt -| | |- 📜 manifest.json : Default React file for choosing icon based on -| | |- 📜 dlp-logo.ico : DLP Logo -| |- 📜 package.json +| | |- 📜 constants.ts +| | |- 📜 next-env.d.ts +| |- 📜 next.config.js +| |- 📜 yarn.lock +| |- 📜 jest.config.js | |- 📜 .eslintrc.json -| |- 📜 next-env.d.ts +| |- 📜 package.json | |- 📜 tsconfig.json -| |- 📜 yarn.lock +| |- 📜 next-env.d.ts | |- 📜 .eslintignore -| |- 📜 next.config.js -| |- 📜 jest.config.js ``` diff --git a/backend/common/ai_drive.py b/backend/common/ai_drive.py index 217ba6666..3140d4ff6 100644 --- a/backend/common/ai_drive.py +++ b/backend/common/ai_drive.py @@ -81,9 +81,7 @@ def dl_tabular_drive(trainspace_data: TrainspaceData): X, y, category_list = get_default_dataset(default.upper(), target, features) elif default and problem_type.upper() == "REGRESSION": X, y, _ = get_default_dataset(default.upper(), target, features) - - - + else: input_df = read_df_from_bucket( FILE_UPLOAD_BUCKET_NAME, make_train_bucket_path(trainspace_data)