Instruction
stringlengths
13
145k
input_code
stringlengths
35
390k
output_code
stringlengths
35
390k
add django-debug-toolbar ## Task - [ ] install `django-debug-toolbar` with the command `poetry add django-debug-toolbar --group dev` - [ ] follow the [remaining installation instructions](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html)
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
enable django-linear-migrationss ## Task - [ ] add `django-linear-migrations` with the following command `poetry add django-linear-migrations --group dev` - [ ] follow the rest of the [django-linear-migrations configuration instructions](https://github.com/adamchainz/django-linear-migrations#installation)
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
FileError when editing user profile settings ### Description After registering and filling in my initial profile, I attempt to visit the Settings screen via the user menu (pictured below). ![image](https://user-images.githubusercontent.com/17307/194142702-6e41e2ea-39cc-4298-bf30-37f98835fd99.png) When I click th...
project/threads/api.py <|code_start|>import json from notifications.signals import notify from accounts.models import Profile from core.custom_decorators import require_post_params from common.utils import save_image_from_url from django.forms.models import model_to_dict from django.contrib.auth.decorators import logi...
project/threads/api.py <|code_start|>import json from notifications.signals import notify from accounts.models import Profile from core.custom_decorators import require_post_params from common.utils import save_image_from_url from django.forms.models import model_to_dict from django.contrib.auth.decorators import logi...
Civis are probably now deleted from the DB If there is a problem with one cause and two solutions the total number of Civis is 4. If I delete the cause, the number of Civis changes to 3 instead of 1. I suspect that in this case the solutions are not deleted.
project/threads/api.py <|code_start|>import json from notifications.signals import notify from accounts.models import Profile from core.custom_decorators import require_post_params from common.utils import save_image_from_url from django.forms.models import model_to_dict from django.contrib.auth.decorators import logi...
project/threads/api.py <|code_start|>import json from notifications.signals import notify from accounts.models import Profile from core.custom_decorators import require_post_params from common.utils import save_image_from_url from django.forms.models import model_to_dict from django.contrib.auth.decorators import logi...
Add "Following" tab to the user profile view We recently removed some features from the user Profile view and now want to reimplement them using only Django. This task will be to add a "Following" tab to the user profile view. The tab should link to a sub-path of the user profile, so it is clear to the viewer that t...
project/accounts/urls.py <|code_start|>from accounts.views import ( PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetDoneView, PasswordResetView, ProfileActivationView, ProfileFollow, ProfileUnfollow, RegisterView, SettingsView, UserProfileView, expunge_user,...
project/accounts/urls.py <|code_start|>from accounts.views import ( PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetDoneView, PasswordResetView, ProfileActivationView, ProfileFollow, ProfileUnfollow, RegisterView, SettingsView, ProfileFollowing, UserProfileV...
Fix symmetrical relationship warning ### Idea summary Our Civi model has a relationship to itself with a `related_name` defined, causing the following warning to appear. ### Further details ``` WARNINGS: threads.Civi.linked_civis: (fields.W345) related_name has no effect on ManyToManyField with a symmetrical...
project/threads/models.py <|code_start|>import datetime import json import math import os from calendar import month_name from categories.models import Category from common.utils import PathAndRename from core.constants import CIVI_TYPES from django.conf import settings from django.contrib.auth import get_user_model f...
project/threads/models.py <|code_start|>import datetime import json import math import os from calendar import month_name from categories.models import Category from common.utils import PathAndRename from core.constants import CIVI_TYPES from django.conf import settings from django.contrib.auth import get_user_model f...
Add "Followers" tab to the user profile view We recently removed some features from the user Profile view and now want to reimplement them using only Django. This task will be to add a "Followers" tab to the user profile view. The tab should link to a sub-path of the user profile so it is clear to the viewer that th...
project/accounts/urls.py <|code_start|>from accounts.views import ( PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetDoneView, PasswordResetView, ProfileActivationView, ProfileFollow, ProfileUnfollow, RegisterView, SettingsView, ProfileFollowing, UserProfileV...
project/accounts/urls.py <|code_start|>from accounts.views import ( PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetDoneView, PasswordResetView, ProfileActivationView, ProfileFollow, ProfileUnfollow, RegisterView, SettingsView, UserFollowers, ProfileFollowin...
Add "Civis" tab to the user profile view We recently removed some features from the user Profile view and now want to reimplement them using only Django. This task will be to add a "Civis" tab to the user profile view. The tab should link to a sub-path of the user profile so it is clear to the viewer that they are v...
project/accounts/urls.py <|code_start|>from accounts.views import ( PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetDoneView, PasswordResetView, ProfileActivationView, ProfileFollow, ProfileUnfollow, RegisterView, SettingsView, ProfileFollowing, UserProfileV...
project/accounts/urls.py <|code_start|>from accounts.views import ( PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetDoneView, PasswordResetView, ProfileActivationView, ProfileFollow, ProfileUnfollow, RegisterView, SettingsView, ProfileFollowing, UserProfileV...
Add "Issues" tab to the user profile view We recently removed some features from the user Profile view and now want to reimplement them using only Django. This task will be to add an "Issues" tab to the user profile view. The tab should link to a sub-path of the user profile so it is clear to the viewer that they ar...
project/accounts/urls.py <|code_start|>from accounts.views import ( PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetDoneView, PasswordResetView, ProfileActivationView, ProfileFollow, ProfileUnfollow, RegisterView, SettingsView, UserFollowers, ProfileFollowin...
project/accounts/urls.py <|code_start|>from accounts.views import ( PasswordResetCompleteView, PasswordResetConfirmView, PasswordResetDoneView, PasswordResetView, ProfileActivationView, ProfileFollow, ProfileFollowing, ProfileUnfollow, RegisterView, SettingsView, UserCivis, ...
Reimplement user categories feature We recently removed some features from the user Profile view and now want to reimplement them using only Django. This task will be to add a "categories" field to the User Profile ("settings") view). ## Task All of these tasks should be done in the `accounts` app. - [ ] de...
project/accounts/views.py <|code_start|>""" Class based views. This module will include views for the accounts app. """ from accounts.authentication import account_activation_token, send_activation_email from accounts.forms import ProfileEditForm, UserRegistrationForm from accounts.models import Profile from django.c...
project/accounts/views.py <|code_start|>""" Class based views. This module will include views for the accounts app. """ from accounts.authentication import account_activation_token, send_activation_email from accounts.forms import ProfileEditForm, UserRegistrationForm from accounts.models import Profile from django.c...
add django-browser-reload ## Task - [ ] follow the [installation instructions](https://github.com/adamchainz/django-browser-reload#installation) to enable `django-browser-reload` for this project
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
Add approved_by_admin field in Challenge Model
apps/challenges/migrations/0011_approved_by_admin_field_added.py <|code_start|><|code_end|> apps/challenges/models.py <|code_start|>from __future__ import unicode_literals from django.utils import timezone from django.db import models from base.models import (TimeStampedModel, ) from hosts.models import (ChallengeHos...
apps/challenges/migrations/0011_approved_by_admin_field_added.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-01-10 23:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('challenges', ...
Participant teams not showing up The participant teams to which the user has been invited does not show up if that user logs in. For instance: User A creates a team ABC and invites User B User B logs in, and goes to the participant teams page. User B does not see team ABC.
apps/participants/views.py <|code_start|>from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_classes,) fro...
apps/participants/views.py <|code_start|>from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_classes,) fro...
Create a ContactUs django model Create a django model `ContactUs` with the following fields: - Name - Email - Message - CreatedAt Note: Use the TimeStampedModel from base app. @TroJan do we need to store some more fields?
apps/contactUs/models.py <|code_start|><|code_end|>
apps/contactUs/models.py <|code_start|>from __future__ import unicode_literals from django.db import models from base.models import (TimeStampedModel, ) class Contact(TimeStampedModel): """Model representing details of User submitting queries.""" name = models.CharField(max_length=100,) email = models.E...
Hosts: User cannot see all of his Host Teams ## CURRENT STATE - `challenge-host-teams` page only shows teams `created_by` the user. ## ISSUE - On `challenge-host-teams` page, user should be able to see all host teams he is a part of. ## RELATED ISSUE - #607 Refer to this issue also.
apps/hosts/views.py <|code_start|>from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_classes,) from rest_...
apps/hosts/views.py <|code_start|>from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_classes,) from rest_...
Set default renderer to JSONRenderer in DRF backend For reference: http://www.django-rest-framework.org/api-guide/renderers/#setting-the-renderers
settings/common.py <|code_start|>""" Django settings for evalai project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1...
settings/common.py <|code_start|>""" Django settings for evalai project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1...
Enforce unique random file name for files being uploaded Currently, the files being uploaded are having simple name and we don't want them to serve to anyone who knows the pattern. Hence, we should store the files with name as uuid that will to secure it to some extent. For reference, see this http://stackoverflow....
apps/base/utils.py <|code_start|>import os import uuid from django.conf import settings from django.utils.deconstruct import deconstructible from rest_framework.pagination import PageNumberPagination def paginated_queryset(queryset, request): ''' Return a paginated result for a queryset ''' pagi...
apps/base/utils.py <|code_start|>import os import uuid from django.conf import settings from django.utils.deconstruct import deconstructible from rest_framework.pagination import PageNumberPagination def paginated_queryset(queryset, request): ''' Return a paginated result for a queryset ''' pagi...
Add fields in ChallengePhaseSerializer Please add fields `max_submissions_per_day` and `max_submissions` in the `Challenge Phase Serializer`. It is needed for the issue #704 .
apps/challenges/serializers.py <|code_start|>from rest_framework import serializers from hosts.serializers import ChallengeHostTeamSerializer from .models import ( Challenge, ChallengePhase, ChallengePhaseSplit, DatasetSplit,) class...
apps/challenges/serializers.py <|code_start|>from rest_framework import serializers from hosts.serializers import ChallengeHostTeamSerializer from .models import ( Challenge, ChallengePhase, ChallengePhaseSplit, DatasetSplit,) class...
Move connection params out of worker to settings We are using RabbitMQ to publish messages for submission and execute them. RabbitMQ needs some connection parameters like host name, exchange name, queue name, etc. To consume message from the queue, a worker is written. This workers lives at `scripts/workers/submissi...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname, join from dja...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname, join from dja...
Add field named method_name in Submission model _What ?_ Add a field named `method_name` in `Submission` model of `jobs` app. The field should be a CharField with maximum length as 1000. The field will be nullable. _Why ?_ So that a user or challenge host can track which method(like KNN, etc) is being used to ...
apps/jobs/migrations/0003_added_method_name_field.py <|code_start|><|code_end|> apps/jobs/models.py <|code_start|>from __future__ import unicode_literals import datetime import logging from django.contrib.auth.models import User from django.db import models from django.db.models import Max from django.utils import ti...
apps/jobs/migrations/0003_added_method_name_field.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-03-11 07:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('jobs', '0002_path_fix_for...
Change binding key for submission worker __Problem__ Presently submission worker creates an exclusive queue and binds on that queue with a key of `challenge.add.*`. __Why__ ? The key needs to be changed because we need to add support for editing of challenge file also. In the future we will bind on key `challe...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname, join from dja...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname, join from dja...
Add nullable attribute to the Team Model Following changes are required in the Team model: - [x] Convert the URLFields to CharField with URL - [x] Change the fields `email`, `github_url`, `linkedin_url`, `personal_website` to nullable fields
apps/web/migrations/0004_change_team_model_field_type.py <|code_start|><|code_end|> apps/web/models.py <|code_start|>from __future__ import unicode_literals from django.db import models from base.models import (TimeStampedModel, ) class Contact(TimeStampedModel): """Model representing details of User submitting...
apps/web/migrations/0004_change_team_model_field_type.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-03-19 21:06 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('web', '0003_added_des...
Add nullable attribute to the Team Model Following changes are required in the Team model: - [x] Convert the URLFields to CharField with URL - [x] Change the fields `email`, `github_url`, `linkedin_url`, `personal_website` to nullable fields
apps/web/migrations/0004_change_team_model_field_type.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-03-19 21:06 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('web', '0003_added_des...
apps/web/migrations/0004_change_team_model_field_type.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-03-19 21:58 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('web', '0003_added_des...
Create a template view to show after successful email verification during Signup ### Description When a user registers on EvalAI, he receives an email that contains a unique link to confirm his email id. Whenever he clicks on the link, he should be shown a static page similar to this http://api.evalai.cloudcv.org/ap...
apps/accounts/views.py <|code_start|>from django.contrib.auth import logout from django.urls import reverse from rest_framework.views import APIView from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework import permissions, status from rest_framework.decorators...
apps/accounts/views.py <|code_start|>from django.contrib.auth import logout from rest_framework.response import Response from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, ...
Use Decorator to check permission in Disable Challenge API Currently for the disable challenge API, there is an explicit condition added to check if the user is creator of the challenge or not (https://github.com/Cloud-CV/EvalAI/blob/master/apps/challenges/views.py#L160). This has to be removed and the `isChallengeCrea...
apps/challenges/permissions.py <|code_start|>from rest_framework import permissions from .models import Challenge class IsChallengeCreator(permissions.BasePermission): """ Permission class for edit/delete a challenge. """ message = "Sorry, you are not allowed to perform this operation!" def has_...
apps/challenges/permissions.py <|code_start|>from rest_framework import permissions from .models import Challenge class IsChallengeCreator(permissions.BasePermission): """ Permission class for edit/delete a challenge. """ message = "Sorry, you are not allowed to perform this operation!" def has_...
Modify contact_us api to fetch name and email, if the user is logged in. This issue is related to #853 as discussed with @deshraj .
apps/web/views.py <|code_start|>from django.contrib.auth.models import User from django.shortcuts import render from .models import Team from rest_framework import permissions, status from rest_framework.decorators import (api_view, permission_classes, ...
apps/web/views.py <|code_start|>from django.contrib.auth.models import User from django.shortcuts import render from .models import Team from rest_framework import permissions, status from rest_framework.decorators import (api_view, permission_classes, ...
Add default field in test_annotation field of ChallengePhase model. Please add `default=False` in the test_annotation field of ChallengePhase model.
apps/challenges/models.py <|code_start|>from __future__ import unicode_literals from django.utils import timezone from django.contrib.postgres.fields import JSONField from django.db import models from base.models import (TimeStampedModel, ) from base.utils import RandomFileName from participants.models import (Partic...
apps/challenges/models.py <|code_start|>from __future__ import unicode_literals from django.utils import timezone from django.contrib.postgres.fields import JSONField from django.db import models from base.models import (TimeStampedModel, ) from base.utils import RandomFileName from participants.models import (Partic...
Log change in Challenge and Challenge Phase model when file fields are updated __Problem__ We need a way to figure out if the `evaluation_script`field value is changed for Challenge Model or not. Same goes for `test_annotation` field in ChallengePhase Model. __Please be more clear__ ? When ever a model is save...
apps/base/models.py <|code_start|>from __future__ import unicode_literals from django.db import models class TimeStampedModel(models.Model): """ An abstract base class model that provides self-managed `created_at` and `modified_at` fields. """ created_at = models.DateTimeField(auto_now_add=True) ...
apps/base/models.py <|code_start|>from __future__ import unicode_literals import logging from django.db import models # Get an instance of a logger logger = logging.getLogger(__name__) class TimeStampedModel(models.Model): """ An abstract base class model that provides self-managed `created_at` and `mo...
Teams: A user can participate in a Challenge through multiple teams ### Observed behaviour #### Steps to reproduce 1. User X participated in Challenge C with team T1 2. User Y created a team T2 3. User Y invited User X to team T2 4. User Y can participate in challenge C with team T2 ### Expected behavior Ste...
apps/challenges/views.py <|code_start|>from django.utils import timezone from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, ...
apps/challenges/views.py <|code_start|>from django.utils import timezone from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, ...
Show number of remaining submissions on Submission Page ### USE CASE Whenever a user tries to make a submission to a particular phase, then we should show these details: - Number of submissions he can do for that particular day - Number of overall remaining submissions he can do in total ### TODO - [ ] Add ...
apps/jobs/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge/(?P<challenge_id>[0-9]+)/' r'challenge_phase/(?P<challenge_phase_id>[0-9]+)/submission/(?P<submission_id>[0-9]+)', views.change_submission_visibility, name='change_submission_visibi...
apps/jobs/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge/(?P<challenge_id>[0-9]+)/' r'challenge_phase/(?P<challenge_phase_id>[0-9]+)/submission/(?P<submission_id>[0-9]+)', views.change_submission_visibility, name='change_submission_visibi...
RabbitMQ: Connection closed problem ### Issue encountered ```shell ConnectionClosed: null File "workers/submission_worker.py", line 504, in <module> main() File "workers/submission_worker.py", line 500, in main channel.start_consuming() File "pika/adapters/blocking_connection.py", line 1681, in sta...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname, join from dja...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname, join from dja...
Add models for creating challenge using zip file. The models must be defined in `apps/challenges/models.py`. **Fields:** - user: ForeignKey to User - challenge : OneToOneField to Challenge - zip_configuration: FileField - is_created: Boolean field - stdout_file: Filefield - stderr_file: Filefield
apps/challenges/admin.py <|code_start|>from django.contrib import admin from base.admin import TimeStampedAdmin from .models import Challenge, ChallengePhase, DatasetSplit, Leaderboard, ChallengePhaseSplit, LeaderboardData @admin.register(Challenge) class ChallengeAdmin(TimeStampedAdmin): list_display = ("title...
apps/challenges/admin.py <|code_start|>from django.contrib import admin from base.admin import TimeStampedAdmin from .models import (Challenge, ChallengeConfiguration, ChallengePhase, ChallengePhaseSplit, DatasetSplit, ...
Add serializers for creating challenge using zip file.
apps/challenges/serializers.py <|code_start|>from rest_framework import serializers from hosts.serializers import ChallengeHostTeamSerializer from .models import ( Challenge, ChallengePhase, ChallengePhaseSplit, DatasetSplit,) class...
apps/challenges/serializers.py <|code_start|>from rest_framework import serializers from hosts.serializers import ChallengeHostTeamSerializer from .models import (Challenge, ChallengeConfiguration, ChallengePhase, ChallengePhaseSplit, ...
Add API endpoint to create challenge by uploading zip file. endpoint: `/challenges/zip/$` method: `POST` success: `200/OK` failure: `400/bad request` or `406/not acceptable` Input: The user must upload a zip file containing the `.yaml` file which describes the challenge configuration. The zip folder will also con...
apps/challenges/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge$', views.challenge_list, name='get_challenge_list'), url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge...
apps/challenges/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge$', views.challenge_list, name='get_challenge_list'), url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge...
Change path of storage of Evaluation Scripts ## Current behaviour Currently, the evaluation scripts are stored in the `submission_files` directory which should not happen ideally. ## Solution Modify the `RandomFile()` method such that the evaluation scripts should be uploaded in the `evaluation_scripts` director...
apps/base/utils.py <|code_start|>import os import uuid from django.conf import settings from django.utils.deconstruct import deconstructible from rest_framework.exceptions import NotFound from rest_framework.pagination import PageNumberPagination class StandardResultSetPagination(PageNumberPagination): page_siz...
apps/base/utils.py <|code_start|>import os import uuid from django.conf import settings from rest_framework.exceptions import NotFound from rest_framework.pagination import PageNumberPagination class StandardResultSetPagination(PageNumberPagination): page_size = 100 page_size_query_param = 'page_size' m...
Create an API Endpoint to show all the submissions to Challenge Host for a particular Challenge ### Objective The aim is to create an API endpoint which fetches all the submissions of a Challenge and and returns as a JSON Response. ### Constraints: - URL: `/api/challenges/<challenge_pk>/submissions/` - Only th...
apps/challenges/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge$', views.challenge_list, name='get_challenge_list'), url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge...
apps/challenges/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge$', views.challenge_list, name='get_challenge_list'), url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge...
Change the pagination limit in leaderboard Currently, in the VQA challenge, only 10 entries are visible on the leaderboard and there is no pagination on the client side. To show all the entries of the leaderboard, there are two ways to do that: 1. Add a pagination on the client side 2. Show all the entries on a singl...
apps/base/utils.py <|code_start|>import os import uuid from django.conf import settings from django.utils.deconstruct import deconstructible from rest_framework.exceptions import NotFound from rest_framework.pagination import PageNumberPagination def paginated_queryset(queryset, request): ''' Return a p...
apps/base/utils.py <|code_start|>import os import uuid from django.conf import settings from django.utils.deconstruct import deconstructible from rest_framework.exceptions import NotFound from rest_framework.pagination import PageNumberPagination class StandardResultSetPagination(PageNumberPagination): page_siz...
A challenge should not be published directly when challenge host creates it. Once the `challenge_host `creates a challenge then it should not be published directly. **The administrator must approve the challenge before it is published.** **Solution:** Add a query parameter `approved_by_admin=True` in `get_all_challe...
apps/challenges/views.py <|code_start|>from django.utils import timezone from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, ...
apps/challenges/views.py <|code_start|>from django.utils import timezone from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, ...
Improve the check for if the user is a host of a challenge Currently, at https://github.com/Cloud-CV/EvalAI/blob/master/apps/hosts/utils.py#L12 we only check if the user has created the challegne and based on that we allow the challenge host to see all the submissions (for example, see this https://github.com/Cloud-CV/...
apps/participants/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'participant_team/(?P<pk>[0-9]+)/invite$', views.invite_participant_to_team, name='invite_participant_to_team'), url(r'remove_self_from_participant_team/(?P<participant_team_pk>[0-9]+)$', ...
apps/participants/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'participant_team/(?P<pk>[0-9]+)/invite$', views.invite_participant_to_team, name='invite_participant_to_team'), url(r'remove_self_from_participant_team/(?P<participant_team_pk>[0-9]+)$', ...
Add support for exporting all the submissions in csv format
apps/challenges/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge$', views.challenge_list, name='get_challenge_list'), url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge...
apps/challenges/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge$', views.challenge_list, name='get_challenge_list'), url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge...
Export my submissions table as csv for a participant. Expected output: The challenge participant must export the my-submissions table as a ` csv` based on the challenge phase.
apps/challenges/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge$', views.challenge_list, name='get_challenge_list'), url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge...
apps/challenges/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge$', views.challenge_list, name='get_challenge_list'), url(r'challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge...
Add approved by admin check in seed script ## Observed Behaviour Currently, when the seed script is ran, then the challenges are created but they are not shown on the client side since the `approved_by_admin` atribute for those challenges is False by default. ## Objective Set `approved_by_admin=True` for the d...
scripts/seed.py <|code_start|># Command to run : python manage.py shell --settings=settings.dev < scripts/seed.py import os from datetime import timedelta from django.conf import settings from django.contrib.auth.models import User from django.core.files.uploadedfile import SimpleUploadedFile from django.utils impor...
scripts/seed.py <|code_start|># Command to run : python manage.py shell --settings=settings.dev < scripts/seed.py import os from datetime import timedelta from django.conf import settings from django.contrib.auth.models import User from django.core.files.uploadedfile import SimpleUploadedFile from django.utils impor...
Add a serializer for challenge phase creation. **Issue:** The` get` and `post` request for challenge phase are validating from the same serializer which exposes the `test_annotation` field. **Solution:** Create a new serializer for post request in `challenges/serializers.py` with all the fields.
apps/challenges/serializers.py <|code_start|>from rest_framework import serializers from hosts.serializers import ChallengeHostTeamSerializer from .models import (Challenge, ChallengeConfiguration, ChallengePhase, ChallengePhaseSplit, ...
apps/challenges/serializers.py <|code_start|>from rest_framework import serializers from hosts.serializers import ChallengeHostTeamSerializer from .models import (Challenge, ChallengeConfiguration, ChallengePhase, ChallengePhaseSplit, ...
Add approved_by_admin check in submission worker script. **Need:** Since we need to only publish those challenges that are approved by admin, so it is also necessary that `submission_worker` should load only admin approved challenges. **Solution:** Make the query parameters [here](https://github.com/Cloud-CV/EvalAI/...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import logging import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname,...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import logging import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname,...
Add models to star a challenge **Deliverable**: - [x] Add a model in `apps/challenges/model.py` for starring a challenge. **Attributes:** 1. `user` - Foreign key to `User` model 2. `challenge` - Foreign key to `Challenge` model. - [x] Add the migration file. - [x] Register the model in django-admin. ...
apps/challenges/admin.py <|code_start|>from django.contrib import admin from base.admin import ImportExportTimeStampedAdmin from .models import (Challenge, ChallengeConfiguration, ChallengePhase, ChallengePhaseSplit, DatasetSplit, ...
apps/challenges/admin.py <|code_start|>from django.contrib import admin from base.admin import ImportExportTimeStampedAdmin from .models import (Challenge, ChallengeConfiguration, ChallengePhase, ChallengePhaseSplit, DatasetSplit, ...
Modify code in jobs app **Current Behaviour:** The code in the function `change_submission_data_and_visibility` was according to the old convention and test cases are also missing. **Expected Behaviour:** Modify the code to follow the new convention and also add the test cases.
apps/jobs/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge/(?P<challenge_id>[0-9]+)/' r'challenge_phase/(?P<challenge_phase_id>[0-9]+)/submission/(?P<submission_id>[0-9]+)', views.change_submission_visibility, name='change_submission_visibi...
apps/jobs/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'challenge/(?P<challenge_pk>[0-9]+)/' r'challenge_phase/(?P<challenge_phase_pk>[0-9]+)/submission/(?P<submission_pk>[0-9]+)', views.change_submission_data_and_visibility, name='change_submissi...
Add Team members column to exported csv file. **Current behaviour:** There is no column for participant team members in the exported `csv` file. **Expected behaviour:** Add a column for `participant team members` in the `csv` file.
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Add API to star a challenge.
apps/challenges/serializers.py <|code_start|>from rest_framework import serializers from hosts.serializers import ChallengeHostTeamSerializer from .models import (Challenge, ChallengeConfiguration, ChallengePhase, ChallengePhaseSplit, ...
apps/challenges/serializers.py <|code_start|>from rest_framework import serializers from hosts.serializers import ChallengeHostTeamSerializer from .models import (Challenge, ChallengeConfiguration, ChallengePhase, ChallengePhaseSplit, ...
Change the message on Challenge Creation Currently, the error message on missing test annotation file for a phase shows the following error: <img width="1440" alt="screen shot 2017-08-17 at 4 55 26 pm" src="https://user-images.githubusercontent.com/2945708/29433427-107e80a8-836d-11e7-9511-d98fc2e11c1c.png"> We want...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Update when made public timestamp. **Current behaviour:** Currently we are not updating `when_made_public` timestamp when a user makes his submission public. **Expected behaviour:** When a user makes his submission public then update this timestamp. The timestamp must be in` UTC`. **Dependency:** Dependent on the ...
apps/jobs/models.py <|code_start|>from __future__ import unicode_literals import datetime import logging from cached_property import cached_property from django.contrib.auth.models import User from django.db import models from django.db.models import Max from django.utils import timezone from rest_framework.exceptio...
apps/jobs/models.py <|code_start|>from __future__ import unicode_literals import datetime import logging from cached_property import cached_property from django.contrib.auth.models import User from django.db import models from django.db.models import Max from django.utils import timezone from rest_framework.exceptio...
Remove pagination from challenge phase split list API ## Observed behavior The Challenge Phase Split list API endpoint currently returns the challenge phase splits in a paginated manner. But while showing the leaderboard, we need the list of all the challenge phase splits requesting once. ## Objective Remove ...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Show only approved by admin challenges in analytics dashboard. Show the challenges `approved_by_admin` and `published` in **Challenges Analytics Home**.
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Add support for filtering challenges on the basis of challenge phase for host. **Current Behaviour**: The filtering of submissions under the `View All Submissions` tab for a challenge host is on the basis of `challenge_pk` only. The results are same even if challenge host selects any `challenge_phase`. **Expected Beha...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Change message after the challenge creation Currently, when a challenge is being created using the zip file feature, then the user is shown something like this: <img width="1440" alt="screen shot 2017-09-06 at 6 10 21 pm" src="https://user-images.githubusercontent.com/2945708/30137037-8cb1bb64-932f-11e7-89dd-7cde192...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Change the font everywhere to Roboto We are planning to switch the font to Roboto for the whole web application. Please let me know if there are concerns/issues.
settings/dev.sample.py <|code_start|>from .common import * # noqa: ignore=F405 # Database # https://docs.djangoproject.com/en/1.10.2/ref/settings/#databases DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'evalai', 'USER': 'postgres', ...
settings/dev.sample.py <|code_start|>from .common import * # noqa: ignore=F405 # Database # https://docs.djangoproject.com/en/1.10.2/ref/settings/#databases DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'evalai', 'USER': 'postgres', ...
Text not being displayed for the 'star challenge feature' Please see the below image for the illustration: <img width="1438" alt="screen shot 2017-09-06 at 6 09 47 pm" src="https://user-images.githubusercontent.com/2945708/30137179-2a443974-9330-11e7-82c2-63658825255c.png">
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Add indexing in database.
apps/challenges/migrations/0031_add_db_index_to_challenge_related_models.py <|code_start|><|code_end|> apps/challenges/models.py <|code_start|>from __future__ import unicode_literals from django.contrib.auth.models import User from django.utils import timezone from django.contrib.postgres.fields import JSONField from ...
apps/challenges/migrations/0031_add_db_index_to_challenge_related_models.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-09-15 02:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ch...
Add indexing in database.
apps/jobs/migrations/0006_add_indexing_to_some_attributes.py <|code_start|><|code_end|> apps/jobs/models.py <|code_start|>from __future__ import unicode_literals import datetime import logging from cached_property import cached_property from django.contrib.auth.models import User from django.db import models from dj...
apps/jobs/migrations/0006_add_indexing_to_some_attributes.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-09-15 03:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('jobs', '0005_adde...
Port the Code to Python 3 and make it Python 2 compatible. If this issue will be accepted I'll be glad to work on this.
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Restrict the update profile API Endpoint from updating username Currently, django-rest-auth provides the functionality to update the username with the update profile API Endpoint. We want to restrict this since we don't want a user to update his username once he has created his account. For more details about the ...
apps/accounts/serializers.py <|code_start|><|code_end|> settings/common.py <|code_start|>""" Django settings for evalai project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings a...
apps/accounts/serializers.py <|code_start|>from django.contrib.auth import get_user_model from rest_framework import serializers class UserDetailsSerializer(serializers.ModelSerializer): """ Make username as a read_only field. """ class Meta: model = get_user_model() fields = ('pk', '...
Disable the Challenge Phase buttons which are inactive while making submissions ## Observed Behaviour Currently, if a challenge phase is inactive then also a participant can select the phase to make submissions. See screenshot for example: <img width="1440" alt="screen shot 2017-08-08 at 7 21 16 pm" src="https://...
apps/participants/serializers.py <|code_start|>from django.contrib.auth.models import User from rest_framework import serializers from challenges.serializers import ChallengeSerializer from .models import (Participant, ParticipantTeam) class ParticipantTeamSerializer(serializers.ModelSerializer): """Serializer ...
apps/participants/serializers.py <|code_start|>from django.contrib.auth.models import User from django.utils import timezone from rest_framework import serializers from challenges.serializers import ChallengeSerializer from .models import (Participant, ParticipantTeam) class ParticipantTeamSerializer(serializers.Mo...
Add a boolean field to challenge to make it featured challenge ## Current behavior Currently, the first challenge is considered as the featured challenge on EvalAI. We would like to change this and the admin should have the functionality to choose which challenge should be featured challenge. ## Deliverables ...
apps/challenges/migrations/0032_adds_featured_field_in_challenge.py <|code_start|><|code_end|> apps/challenges/models.py <|code_start|>from __future__ import unicode_literals from django.contrib.auth.models import User from django.utils import timezone from django.contrib.postgres.fields import JSONField from django.d...
apps/challenges/migrations/0032_adds_featured_field_in_challenge.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-09-29 07:09 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('challenges...
Add challenge filtering using featured parameter. We need to add filtering in challenge model on the basis of `featured` parameter. Add challenge filtering using featured parameter. We need to add filtering in challenge model on the basis of `featured` parameter.
apps/challenges/admin.py <|code_start|>from django.contrib import admin from base.admin import ImportExportTimeStampedAdmin from .models import (Challenge, ChallengeConfiguration, ChallengePhase, ChallengePhaseSplit, DatasetSplit, ...
apps/challenges/admin.py <|code_start|>from django.contrib import admin from base.admin import ImportExportTimeStampedAdmin from .models import (Challenge, ChallengeConfiguration, ChallengePhase, ChallengePhaseSplit, DatasetSplit, ...
Increase the data upload limit. ## Current Behaviour By default django supports only 2.5 MB of the data to be uploaded on the web app. Refer [here](https://docs.djangoproject.com/en/1.10/ref/settings/#data-upload-max-memory-size) for more info. ## Effects Due to the low upload limit the file in challenge creation ...
settings/common.py <|code_start|>""" Django settings for evalai project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1...
settings/common.py <|code_start|>""" Django settings for evalai project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1...
Add support to update the user profile.
apps/accounts/serializers.py <|code_start|>from django.contrib.auth import get_user_model from rest_framework import serializers class UserDetailsSerializer(serializers.ModelSerializer): """ Make username as a read_only field. """ class Meta: model = get_user_model() fields = ('pk', '...
apps/accounts/serializers.py <|code_start|>from django.contrib.auth import get_user_model from rest_framework import serializers class UserDetailsSerializer(serializers.ModelSerializer): """ Make username as a read_only field. """ class Meta: model = get_user_model() fields = ('pk', '...
Remove Stderr file for the successful submissions ## Observed behavior Currently when there is a successful submission, then also a `stderr_file` is created for that submission which leads to the creation of a blank file that is of no use and adds a small overhead in processing the successful submissions. ## Expe...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import logging import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname,...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import logging import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname,...
Remove models from Accounts app **Expected Behaviour** : Remove the `Affiliation` and `UserAffiliation` model from the `Accounts` app. **Deliverables:** - [ ] Remove the `Affiliation` and `UserAffiliation` model from accounts app. - [ ] Create and name the migration.
apps/accounts/migrations/remove_affiliation_model.py <|code_start|><|code_end|> apps/accounts/models.py <|code_start|>from __future__ import unicode_literals from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.dispatch import receiver fro...
apps/accounts/migrations/remove_affiliation_model.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-10-21 07:20 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0002_profile'), ]...
Use IsChallengeCreator decorator in Challenge Phase detail API Endpoint Currently, the check for if the requesting user is Creator of Challenge or not is missing from the `challenge_phase_detail` API View. We would like to add the `IsChallengeCreator` decorator (https://github.com/Cloud-CV/EvalAI/blob/master/apps/chall...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Add the functionality to disable the Challenge ### Objective A challenge host should be able to delete the challenge using the UI. At the backend, set the flag `is_disabled` whenever a challenge host submits a request to delete the challenge.
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Change the logic to show featured challenge ## Current behavior Currently, the challenge whose primary key is 1 is shown as the featured challenge on EvalAI. We would like to change it and show the challenge which has the featured challenge flag set as True in the database. ## Dependency : #1290 ## Deliverabl...
apps/challenges/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'^challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge$', views.challenge_list, name='get_challenge_list'), url(r'^challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challen...
apps/challenges/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'^challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challenge$', views.challenge_list, name='get_challenge_list'), url(r'^challenge_host_team/(?P<challenge_host_team_pk>[0-9]+)/challen...
Add docs precompiled libraries in challenge evaluation scripts Some of the challenge evaluation scripts use precompiled libraries such as MSCOCO (https://github.com/pdollar/coco/). We want to add a section in the documentation where the challenge hosts should be guided to compile those libraries against `Ubuntu 14.04` ...
docs/source/conf.py <|code_start|># -*- coding: utf-8 -*- # # EvalAI documentation build configuration file, created by # sphinx-quickstart on Fri Jul 14 11:32:35 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in...
docs/source/conf.py <|code_start|># -*- coding: utf-8 -*- # # EvalAI documentation build configuration file, created by # sphinx-quickstart on Fri Jul 14 11:32:35 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in...
Add field submitted_at in leaderboard In the leaderboard, add support for showing the field `submitted_at` for each entry on the leaderboard. This will help the participants to keep track of the challenge submissions.
apps/jobs/views.py <|code_start|>import datetime from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_clas...
apps/jobs/views.py <|code_start|>import datetime from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_clas...
Add Feature to notify users about new challenge on EvalAI.
apps/web/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'^contact/$', views.contact_us, name='contact_us'), url(r'^team/$', views.our_team, name='our_team'), ] <|code_end|> apps/web/views.py <|code_start|>from django.contrib.auth.models import User from django....
apps/web/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'^contact/$', views.contact_us, name='contact_us'), url(r'^team/$', views.our_team, name='our_team'), url(r'^notify_users/$', views.notify_users_about_challenge, name='notify_users_about_challenge'), ]...
Improve dataset_split selection logic in submission worker After integrating #1560, there can be multiple dataset_splits with the same name and codename and the code at https://github.com/Cloud-CV/EvalAI/blob/master/scripts/workers/submission_worker.py#L335 will fail as it will return `MultipleObjectsReturned` ...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import logging import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname,...
scripts/workers/submission_worker.py <|code_start|>from __future__ import absolute_import import contextlib import django import importlib import logging import os import pika import requests import shutil import socket import sys import tempfile import traceback import yaml import zipfile from os.path import dirname,...
Add support to create multiple dataset splits with same codename Add support to create multiple dataset splits with same codename
apps/challenges/migrations/0033_delete_unique_constraint_from_datasetsplit_table.py <|code_start|><|code_end|> apps/challenges/models.py <|code_start|>from __future__ import unicode_literals from django.contrib.auth.models import User from django.utils import timezone from django.contrib.postgres.fields import JSONFie...
apps/challenges/migrations/0033_delete_unique_constraint_from_datasetsplit_table.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2018-03-16 20:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ...
Bug in last submission datetime analysis API **IndexError:** list index out of range **Culprit:** /api/analytics/challenge/{challenge_pk}/challenge_phase/{challenge_phase_pk}/last_submission_datetime_analysis/
apps/analytics/views.py <|code_start|>from datetime import timedelta from django.utils import timezone from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classe...
apps/analytics/views.py <|code_start|>from datetime import timedelta from django.utils import timezone from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classe...
Bug in create challenge using zip file **KeyError:** 'evaluation_details' **Culprit:** /api/challenges/challenge/challenge_host_team/{challenge_host_team_pk}/zip_upload/
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Permission denied: '/tmp/logfile' The submission worker currently faces the problem of permission denied due to the dependency on `/tmp/logfile`. Here is the error log: ``` (EvalAI) 137 ubuntu@staging-evalai:~/Projects/EvalAI⟫ python scripts/workers/submission_worker.py settings.prod Traceback (most recent call la...
settings/common.py <|code_start|>""" Django settings for evalai project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1...
settings/common.py <|code_start|>""" Django settings for evalai project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1...
Bug in backend logic to show remaining submissions on submit tab
apps/jobs/views.py <|code_start|>import datetime from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_clas...
apps/jobs/views.py <|code_start|>import datetime from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_clas...
Allow and block particular email domains for a challenge Currently, anyone can participate in a challenge. It would be great to have a functionality to allow/block only particular email domains to participate in a challenge as specified by the challenge host. ## Deliverables - [x] Add a field to Challenge model ...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Modify database seeding method ## Deliverables - [ ] Modify the seed command to accept an argument `-nc` which denotes the number of challenges that a developer wants to create for testing. - [ ] Modify the seed script in such a way that it can be run multiple times (right now, if you run it once and then you try t...
apps/base/management/commands/seed.py <|code_start|>from django.core.management import BaseCommand, call_command class Command(BaseCommand): help = "Seeds the database with random but sensible values." def handle(self, *args, **options): self.stdout.write(self.style.SUCCESS('Starting the database se...
apps/base/management/commands/seed.py <|code_start|>from django.core.management import BaseCommand, call_command class Command(BaseCommand): help = "Seeds the database with random but sensible values." def add_arguments(self, parser): parser.add_argument('-nc', nargs='?', default=1, type=int, help='...
gulp missing gem specification with from-source install Pivoting from #1617 installation failure, I attempted to install from source on a docker image with only postres10. Going through the steps on the main README.md, I hit an error in the npm/gem installation task. Unfortunately, I don't know Ruby so I can't offer ...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import yaml import zipfile from os.path import basename, isfile, join from django.core.files.base import ContentFile from django.db import transaction from django.http import Http...
Add Challenge preview mode for the challenge hosts ## Description The challenge host must be able to view the challenge in preview mode before publishing the challenge. Also, they must be able to make edits and make submissions using their account. ## Proposed Approach - When the challenge `is_active` flag is fa...
apps/jobs/views.py <|code_start|>import datetime from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_clas...
apps/jobs/views.py <|code_start|>import datetime from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_clas...
Limit number of concurrent submissions for a participant ## Current Scenario Currently, a participant can make any number of submissions until he reaches the limit of doing max submissions per day. We would like to add another constraint where a participant can do at max 3 submissions and if he wants to do more the...
apps/challenges/migrations/0035_add_max_concurrent_submissions_allowed_field.py <|code_start|><|code_end|> apps/challenges/models.py <|code_start|>from __future__ import unicode_literals from django.contrib.auth.models import User from django.utils import timezone from django.contrib.postgres.fields import ArrayField,...
apps/challenges/migrations/0035_add_max_concurrent_submissions_allowed_field.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2018-04-20 09:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ...
FIX: Limit number of concurrent submissions for a participant. Fixes #1618
apps/jobs/views.py <|code_start|>import datetime from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_clas...
apps/jobs/views.py <|code_start|>import datetime from rest_framework import permissions, status from rest_framework.decorators import (api_view, authentication_classes, permission_classes, throttle_clas...
Add a feature to show the authentication token to the user on the MyProfile Page **Deliverables:** - [x] Add API endpoint to fetch or create (if doesn't exists) the token from database. - [x] Add Frontend with features to show, copy and download the token in JSON format
apps/accounts/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'^user/disable$', views.disable_user, name='disable_user'), ] <|code_end|> apps/accounts/views.py <|code_start|>from django.contrib.auth import logout from rest_framework.response import Response from ...
apps/accounts/urls.py <|code_start|>from django.conf.urls import url from . import views urlpatterns = [ url(r'^user/disable$', views.disable_user, name='disable_user'), url(r'^user/get_auth_token$', views.get_auth_token, name='get_auth_token'), ] <|code_end|> apps/accounts/views.py <|code_start|>from djang...
Remove RabbitMQ config settings Since we have removed RabbitMQ as a message broker, we would also like to remove the settings for it in the `settings/common.py`.
settings/common.py <|code_start|>""" Django settings for evalai project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1...
settings/common.py <|code_start|>""" Django settings for evalai project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1...
Add feature to export limited columns of submission list ## Current Scenario Currently when the challenge host export the submissions, all the fields are added to it by default. Having the functionality of allowing challenge host to choose which fields he would like to export would be nice. ## Deliverables - ...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.conf import settings from django.contrib.auth.hashers import make_password from djang...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.conf import settings from django.contrib.auth.hashers import make_password from djang...
Improve challenge creation pipeline ## Current Scenario If you directly zip the challenge configuration and upload it on the server, then you see an error saying `zip file has more than one .yaml files` which is mainly the case due to temporary files added to the zip while zipping. ## Deliverables - [ ] Handle...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.contrib.auth.models import User from django.core.files.base import ContentFile from d...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.contrib.auth.models import User from django.core.files.base import ContentFile from d...
Update submission worker to create challenge specific queues. ### Deliverables: The submission worker should be updated so that challenge specific queues can be created instead of one single queue for all the challenges. **Challenge Queue name:** submission_challenge_<challenge_pk> Make sure to use the exchang...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.contrib.auth.models import User from django.core.files.base import ContentFile from d...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.contrib.auth.models import User from django.core.files.base import ContentFile from d...
Viewing challenge stars should not require logging in Without logging in: <img width="287" alt="screen shot 2018-12-16 at 1 35 10 pm" src="https://user-images.githubusercontent.com/1156489/50057373-6f153280-0137-11e9-9bf8-cf6e3db93f84.png"> After logging in: <img width="339" alt="screen shot 2018-12-16 at 1 35 00 ...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.contrib.auth.models import User from django.core.files.base import ContentFile from d...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.contrib.auth.models import User from django.core.files.base import ContentFile from d...
Search submissions by challenge name in submissions table Currently, we support searching the submissions by the `participant team name, challenge phase name, created by name and submission status`. We would like to add searching the submissions by `challenge name` and also add the same to default list filtering option...
apps/jobs/admin.py <|code_start|>import logging from django.contrib import admin from base.admin import ImportExportTimeStampedAdmin from .models import Submission from .sender import publish_submission_message logger = logging.getLogger(__name__) @admin.register(Submission) class SubmissionAdmin(ImportExportTim...
apps/jobs/admin.py <|code_start|>import logging from django.contrib import admin from base.admin import ImportExportTimeStampedAdmin from .models import Submission from .sender import publish_submission_message logger = logging.getLogger(__name__) @admin.register(Submission) class SubmissionAdmin(ImportExportTim...
Add support for Editing Host Team name ### Observed Behaviour Currently , there is no option to edit Host Team name. ### Expected Behaviour Add support for editing challenge host team name. ### Would you like to work on this? Yes. @deshraj @RishabhJain2018 ![img_20181108_004200](https://user-images.github...
apps/hosts/migrations/Add_blank_in_host_team_URL.py <|code_start|><|code_end|> apps/hosts/models.py <|code_start|>from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from base.models import (TimeStampedModel, ) # from challenges.models import (Challenge, ) ...
apps/hosts/migrations/Add_blank_in_host_team_URL.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-01-10 18:37 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hosts', '0003_challengeho...
Incorrect Fields in Jobs serializer *Observed code:* [here](https://github.com/Cloud-CV/EvalAI/blob/master/apps/jobs/serializers.py/#L54) ``` class Meta: model = LeaderboardData fields = "__all__" fields = ('id', 'participant_team_name', 'challenge_phase_split', 'leaderboard_schema', 'resul...
apps/jobs/serializers.py <|code_start|>from django.contrib.auth.models import User from rest_framework import serializers from challenges.models import LeaderboardData from participants.models import Participant, ParticipantTeam from .models import Submission class SubmissionSerializer(serializers.ModelSerializer)...
apps/jobs/serializers.py <|code_start|>from django.contrib.auth.models import User from rest_framework import serializers from challenges.models import LeaderboardData from participants.models import Participant, ParticipantTeam from .models import Submission class SubmissionSerializer(serializers.ModelSerializer)...
Update seed script to add broker url in challenge ## Current Behaviour: Currently, when the challenge is created using the seed script, the `queue` field is not populated. ## Expected Behaviour: When the seed script is run, the `queue` field must be populated with the random string of 75 characters in length.
scripts/seed.py <|code_start|># Command to run : python manage.py shell < scripts/seed.py import os from datetime import timedelta from django.conf import settings from django.contrib.auth.models import User from django.core.files.uploadedfile import SimpleUploadedFile from django.utils import timezone from allauth...
scripts/seed.py <|code_start|># Command to run : python manage.py shell < scripts/seed.py import os import random import string from datetime import timedelta from django.conf import settings from django.contrib.auth.models import User from django.core.files.uploadedfile import SimpleUploadedFile from django.utils i...
Change the submission visibility to public by default ## Current Behaviour Currently, when a submission is made then it is always private by default. A participant has to explicitly make it public to be visible on the leaderboard even if the leaderboard is public. ## Expected Behavior The submission made shoul...
apps/jobs/migrations/0011_Change_submission_visibility_default_to_public.py <|code_start|><|code_end|> apps/jobs/models.py <|code_start|>from __future__ import unicode_literals import logging from django.contrib.auth.models import User from django.db import models from django.db.models import Max from rest_framework....
apps/jobs/migrations/0011_Change_submission_visibility_default_to_public.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-01-21 19:20 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('j...
Add leaderboard description field ## Current Behaviour Currently, we don't display leaderboard description under the leaderboard tab. ## Expected Behaviour A text field which will display the description about the leaderboard. ## Deliverables - [ ] Add a blank and nullable text field in the Challenge model wit...
apps/challenges/migrations/0045_Add_leaderboard_description_field_in_challenge.py <|code_start|><|code_end|> apps/challenges/models.py <|code_start|>from __future__ import unicode_literals from django.contrib.auth.models import User from django.utils import timezone from django.contrib.postgres.fields import ArrayFiel...
apps/challenges/migrations/0045_Add_leaderboard_description_field_in_challenge.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-01-30 16:05 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ...
Modify challenge phase query for displaying challenge phase detail **Current Scenario:** The function [here](https://github.com/Cloud-CV/EvalAI/blob/master/apps/challenges/views.py#L398) will **not** throw the error even if there are no challenge phase corresponding to the challenge. **Steps to Reproduce:** You wil...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.conf import settings from django.contrib.auth.hashers import make_password from djang...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.conf import settings from django.contrib.auth.hashers import make_password from djang...
Update seed script to add challenge slug ## Current Behaviour: Currently, when the challenge is created using the seed script, the `slug` field is not populated. ## Expected Behaviour: When the seed script is run, the `slug` field must be populated with the challenge title and it must include a year in the name to...
scripts/seed.py <|code_start|># Command to run : python manage.py shell < scripts/seed.py import os import random import string from datetime import timedelta from django.conf import settings from django.contrib.auth.models import User from django.core.files.uploadedfile import SimpleUploadedFile from django.utils i...
scripts/seed.py <|code_start|># Command to run : python manage.py shell < scripts/seed.py import datetime import os import random import string from datetime import timedelta from django.conf import settings from django.contrib.auth.models import User from django.core.files.uploadedfile import SimpleUploadedFile fro...
Add feature for filtering the submissions ## Current Scenario If there are a large number of submissions in a challenge and a challenge host wants to view all the submissions for a participant team then they have to scroll through all the submissions. ## Expected The challenge host should be able to filter the...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.conf import settings from django.contrib.auth.hashers import make_password from djang...
apps/challenges/views.py <|code_start|>import csv import logging import random import requests import shutil import string import tempfile import uuid import yaml import zipfile from os.path import basename, isfile, join from django.conf import settings from django.contrib.auth.hashers import make_password from djang...