dnaaun / openFraming

Tools for automatic frame discovery and labeling based on topic modeling and deep learning, made widely accessible to researchers from non computational backgrounds.
http://www.openframing.org
9 stars 7 forks source link

Let the user get a link in the email when training a classifier is done, and then upload an unlabeled set #301

Open monajalal opened 4 years ago

monajalal commented 4 years ago

Right now, the user has to keep their tab open, to make sure that they can train and predict on a custom dataset of their own.

edward-edberg commented 4 years ago

@monajalal @davidatbu this method contradicts with the current one. I still don't know how to do it subtly.

edward-edberg commented 4 years ago

I think we have to do it in the backend. Frontend modification is kind of limited.

dnaaun commented 4 years ago

Hi @edward-edberg,

I don't see how modifying the backend will help with this. The backend already sends an email when training finishes, and then another one when predicting finishes.

I understand what you are saying in that, in the frontend, this is not possible if the user is going to upload training dataset and the unlabeled dataset at the same time. But, if we have different pages for the two, imagine this:

The user goes towww.openframing.org/train_a_classifier.html He gets an email when training finishes atwww.openframing.org/predict_with_classifier.html?classifier_id=<SOME_ID>

On the frontend, the JS inside predict_with_classifier.html will grab the <SOME_ID> from the URL(this is possible, and this is what we do for topic modeling previewing already), and then it will let the user upload testing data.

And then we send an email to the user with the results.

edward-edberg commented 4 years ago

Okay, but how about if the client wants to use default classifier? They will upload the test file in the first place, right? If we want to implement a new mechanism that you have mentioned, then we will separate training from scratch page and testing-only page.

dnaaun commented 4 years ago

Okay, but how about if the client wants to use default classifier? They will upload the test file in the first place, right?

Yup!

If we want to implement a new mechanism that you have mentioned, then we will separate training from scratch page and testing-only page.

Yes, exactly.

On Tue, Jul 14, 2020 at 8:12 PM Edward Edberg Halim < notifications@github.com> wrote:

Okay, but how about if the client wants to use default classifier? They will upload the test file in the first place, right? If we want to implement a new mechanism that you have mentioned, then we will separate training from scratch page and testing-only page.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/davidatbu/openFraming/issues/301#issuecomment-658473500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQIHC3V2OBZMWWGY22ZHN3R3TX6ZANCNFSM4OZ4HTYQ .

edward-edberg commented 4 years ago

@davidatbu I have a question, how do you provide unique link for each task to upload test file?

dnaaun commented 4 years ago

Great question Edward!

We actually already do this with topic model previews. If you go and train a topic model right now, you'll get an email, with a unique link to your topic model, for example www.openframing.org/topicModelPreviews.html?topic_model_id=2 (you can actually click on it). Since the backend has access to the topic model id, that's all we have to change to generate a "unique link".

On Wed, Jul 15, 2020 at 10:47 AM Edward Edberg Halim < notifications@github.com> wrote:

@davidatbu https://github.com/davidatbu I have a question, how do you provide unique link for each task to upload test file?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/davidatbu/openFraming/issues/301#issuecomment-658813278, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQIHC47Z3HYOPQDGC2MO6TR3W6RDANCNFSM4OZ4HTYQ .

edward-edberg commented 4 years ago

@davidatbu ok, you can provide me topic_model_id, then how can I get that topic_model_id? since I have to make post request

edward-edberg commented 4 years ago

parse the url? or do you have any suggestion? because I have never done this before

dnaaun commented 4 years ago

Here's how we do it in topicModelPreviews.html

Here's the function:

https://github.com/davidatbu/openFraming/blob/2642424f43c481ee3bf178b161fb41cc1f3ff34a/services/web/frontend/js/topicModelPreview.js#L43-L55

Here's how we call it. https://github.com/davidatbu/openFraming/blob/2642424f43c481ee3bf178b161fb41cc1f3ff34a/services/web/frontend/js/topicModelPreview.js#L74-L75

edward-edberg commented 4 years ago

My code looks terrible compared to this lol. Got it. I think I can build them.

dnaaun commented 4 years ago

I copy pasted it from Stackoverflow :) I usually live a link to where I found it but I forgot to this time somehow.

On Wed, Jul 15, 2020 at 2:03 PM Edward Edberg Halim < notifications@github.com> wrote:

My code looks terrible compared to this lol. Got it. I think I can build them.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/davidatbu/openFraming/issues/301#issuecomment-658916684, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQIHCZYPFYZJRFY3GAL3CTR3XVNJANCNFSM4OZ4HTYQ .