DSGT-DLP / Deep-Learning-Playground

Web Application where people new to Deep Learning can input a dataset and toy around with basic Pytorch modules without writing any code
MIT License
24 stars 8 forks source link

[BUG]: Migrate getDatasetFromFile endpoint to SST #980

Closed noah-iversen closed 11 months ago

noah-iversen commented 1 year ago

Operating system

Windows 11

Bug description

When a user attempts to train under tabular and uploads their own file, there used to be an endpoint that could be called to parse the uploaded file.

However, we are migrating our endpoints to SST and the one that handles reading the dataset has not been migrated yet. Your task is to migrate the endpoint called getDatasetFromFile to SST and make necessary changes in the transpaceApi.ts file.

Default endpoint url: /api/training/datasets/default/${dataset.name}/columns getDatasetFromFile url: /api/dataset/getColumnsFromDatasetFile

Beware: "getColumnsFromDataset" and getColumnsFromDatasetFile" are different names to refer to. The former is the name of the RTK query itself, and the latter is the appended name to the endpoint URL.

When calling to the endpoint, either the default endpoint or the "getDatasetFromFile" gets appended. Ensure that the new appended url is accurate when making these changes.

The only changes necessary should be to the getDatasetFromFile URL itself, since it's a GET call.

Steps to reproduce

https://github.com/DSGT-DLP/Deep-Learning-Playground/assets/7332345/37031dbb-6ee8-453b-bc4e-9e1bd72cc17b

Visit trainspace, go under tabular, upload file, and then view the error that occurs due to the invalid endpoint call. See video.

github-actions[bot] commented 1 year ago

Hello @noah-iversen! Thank you for submitting the Bug Request Form. We appreciate your contribution. :wave:

We will look into it and provide a response as soon as possible.

To work on this bug request, you can follow these branch setup instructions:

  1. Checkout the main branch:

     git checkout nextjs
  2. Pull the latest changes from the remote main branch:

     git pull origin nextjs
  3. Create a new branch specific to this bug request using the issue number:

     git checkout -b bug-980

    Feel free to make the necessary changes in this branch and submit a pull request when you're ready.

    Best regards, Deep Learning Playground (DLP) Team

karkir0003 commented 1 year ago

@noah-iversen Below would be the general steps to migrate getDatasetFromFile endpoint to SST (the endpoint responsible for getting columns from user uploaded CSV file):

Links to the original code: getColumnsFromDatasetFile, get_column_names(}

  1. It turns out that the endpoint reponsible for extracting columns from user uploaded CSV lives here
  2. All you need to do is modify the URL used here to point to the route shown here. This should be similar approach to your previous PR
karkir0003 commented 11 months ago

@noah-iversen status on this task?