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

Removed public/private submissions and brain/base models for vision #228

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions benchmarks/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ class UploadPlaceHolder(forms.Form):


class UploadFileForm(forms.Form):
model_type = forms.ChoiceField(choices=[
("BaseModel", "Base model - to submit a standard machine learning model"),
("BrainModel", "Brain model - to change brain-transformation")])
zip_file = forms.FileField(label="", help_text='Required')
public = forms.BooleanField(label='Make model scores public (can be changed later):', required=False,
help_text='Check if you want the results of your submitted models included in the public ranking.')
Comment on lines -43 to -44
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused why we want to remove this; this has nothing to do with whether or not the code/weights are public. @kvfairchild I feel like there's a breakdown in communication somewhere


class Meta:
model = UploadPlaceHolder
fields = ('zip_file', 'public', 'competition')


class UploadFileFormLanguage(forms.Form):
zip_file = forms.FileField(label="", help_text='Required')

class Meta:
Expand All @@ -62,4 +49,4 @@ def __init__(self, *args, **kwargs):
self.fields.pop('old_password')

class Meta:
fields = ('new_password1', 'new_password2')
fields = ('new_password1', 'new_password2')
12 changes: 3 additions & 9 deletions benchmarks/views/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode
from django.views import View

from benchmarks.forms import SignupForm, LoginForm, UploadFileForm, UploadFileFormLanguage
from benchmarks.forms import SignupForm, LoginForm, UploadFileForm
from benchmarks.models import Model, BenchmarkInstance, BenchmarkType
from benchmarks.tokens import account_activation_token
from benchmarks.views.index import get_context
Expand Down Expand Up @@ -153,18 +153,12 @@ def get(self, request):
assert self.domain is not None
if request.user.is_anonymous:
return HttpResponseRedirect(f'../profile/{self.domain}')
if self.domain == "language":
form = UploadFileFormLanguage()
else:
form = UploadFileForm()
form = UploadFileForm()
return render(request, 'benchmarks/upload.html', {'form': form, 'domain': self.domain})

def post(self, request):
assert self.domain is not None
if self.domain == "language":
form = UploadFileFormLanguage(request.POST, request.FILES)
else:
form = UploadFileForm(request.POST, request.FILES)
form = UploadFileForm(request.POST, request.FILES)
if not form.is_valid():
return HttpResponse("Form is invalid", status=400)

Expand Down