Skip to content

Conversation

@bbearce
Copy link
Collaborator

@bbearce bbearce commented Jun 21, 2023

@ mention of reviewers

@Didayolo
@ihsaan-ullah

A brief description of the purpose of the changes contained in this PR.

Adding the ability to add/edit public_data and starting_kit in phase.

Status:

  • Starting Kit and Public Data need to be phase level objects. - DONE
  • Need to see in Files list. - DONE
  • Need to add phase edit ability to see datasets as options to be selected and associated to phase. - DONE
  • Need to save to database on competition edit save. - DONE
  • Then need to adjust unpacker to allow them through via yaml for both v1 and v2. - DONE
  • [FOR NEXT PR] Need to be able to decide what datasets are public. - NOT DONE
    DISCLAIMER NOT DONE --> separated PR

Issues this PR resolves

A checklist for hand testing

Make competition upload bundle

  • Upload a V1 bundle with starting kit and public data and check it's there
  • Upload a V2 bundle with starting kit and public data as ZIP files and check it's there
  • Upload a V2 bundle with starting kit and public data as folders and check it's there
  • Add Phase with public_data and starting_kit with at least one task with other 4 datasets (id, rf, ip, sp)
  • Add Phase with no public_data or starting_kit with at least one task with other 4 datasets (id, rf, ip, sp)
  • Add Phase with public_data only with at least one task with other 4 datasets (id, rf, ip, sp)
  • Add Phase with starting_kit only with at least one task with other 4 datasets (id, rf, ip, sp)
  • Try with more than one phase as well with at least one task with other 4 datasets (id, rf, ip, sp) with both tasks with other 4 datasets (id, rf, ip, sp)
  • Check competition has data you expect in Files list under Get Started and in Competition editor under phases

Make manual competition

  • * Add Phase with public_data and starting_kit with at least one task with other 4 datasets (id, rf, ip, sp)
  • * Add Phase with no public_data or starting_kit with at least one task with other 4 datasets (id, rf, ip, sp)
  • * Add Phase with public_data only with at least one task with other 4 datasets (id, rf, ip, sp)
  • * Add Phase with starting_kit only with at least one task with other 4 datasets (id, rf, ip, sp)
  • Try with more than one phase as well with at least one task with other 4 datasets (id, rf, ip, sp) with both tasks with other 4 datasets (id, rf, ip, sp)
  • Save and check competition has data you expect in Files list under Get Started and in Competition editor under phases

Edit pre-existing competition

  • * Edit Phase with public_data and starting_kit and change both to none
  • * Edit Phase with no public_data or starting_kit and change both to something
  • * Edit Phase with public_data only and make starting_kit only
  • * Edit Phase with starting_kit only and make public_data only
  • Try with more than one phase as well
  • Save and check competition has data you expect in Files list under Get Started and in Competition editor under phases

Double Check

  • In Competition go under Get Started \ Files and check that the files visible match the files in:
  • * All datasets attached to each task
  • * public_data and or starting_kit associated with each phase

Any relevant files for testing

...I can make a variation on classify wheat seeds for this testing

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@bbearce bbearce force-pushed the download_buttons branch from 3e6e6e9 to 4a18694 Compare June 26, 2023 00:09
@bbearce
Copy link
Collaborator Author

bbearce commented Jun 28, 2023

comments from Adrien 06/28/2023

pd - public_data

sk - starting_kit

  • allow the multiselect of pd and sk
  • red stars by pd and sk don't need to be there.
  • ref data always hidden.
  • everything shown for admin\organizers
  • (v1 bundles can upload 1 pd or sk)

New PR\Issue

  • competition level option to hide\show programs (scoring\ingestion)
  • competition level option to hide\show input_data
  • allow multiple public_data and starting_kits in yaml
  • (v2 bundles should handle multiple.)

@Didayolo
Copy link
Member

Didayolo commented Jul 18, 2023

  • Before the second PR, scoring program, ingestion program and input data should be unavailable by default (we do not want to force it to be public)
  • If there is no public data, starting kit, and everything else is not available, there should be a default sentence inside the table, like for the leaderboard (No files are available for download or something like this):
Capture d’écran 2023-07-18 à 17 27 20

@Didayolo
Copy link
Member

Hi @bbearce, I am testing this PR.

I can see the download buttons for starting kit and public data even if I am not logged in the platform nor registered for the competition.

As a reminder:

  • For non-approved participants: Not accessible
  • For approved participants: Showing objects made available by organizers

@Didayolo Didayolo self-assigned this Jul 21, 2023
@bbearce
Copy link
Collaborator Author

bbearce commented Jul 24, 2023

Let me take a look.

@bbearce
Copy link
Collaborator Author

bbearce commented Jul 25, 2023

Ok here are the fixes:

  • Not logged in:
    image
  • For non-approved participants: Not accessible:
    image
  • For approved participants:
    image
  • Showing objects made available by organizers. Organizers can unselect starting_kit and public_data and it won't be available:

image

@Didayolo
Copy link
Member

@bbearce That is great! Thank you for the detailed screenshots. I'll review it as soon as possible.

@Didayolo
Copy link
Member

Didayolo commented Jul 25, 2023

EDIT: seems good after restarting the containers.

It is working fine. However, I see this in the logs, which seems to be related to the changes:

django.db.utils.ProgrammingError: column competitions_phase.public_data_id does not exist

Strangely, when I tried to run the migrations, no changes were detected.

More logs:

codabench-site_worker-1  | [2023-07-25 09:05:20,223: ERROR/ForkPoolWorker-3] Task competitions.tasks.submission_status_cleanup[3a1d70b5-8fb2-48b2-8bda-817340ebeb68] raised unexpected: ProgrammingError('column competitions_phase.public_data_id does not exist\nLINE 1: ...r_person", "competitions_phase"."leaderboard_id", "competiti...\n                                                             ^\n')
codabench-site_worker-1  | Traceback (most recent call last):
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
codabench-site_worker-1  |     return self.cursor.execute(sql, params)
codabench-site_worker-1  | psycopg2.errors.UndefinedColumn: column competitions_phase.public_data_id does not exist
codabench-site_worker-1  | LINE 1: ...r_person", "competitions_phase"."leaderboard_id", "competiti...
codabench-site_worker-1  | Traceback (most recent call last):
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/celery/app/trace.py", line 382, in trace_task
codabench-site_worker-1  |     R = retval = fun(*args, **kwargs)
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/celery/app/trace.py", line 641, in __protected_call__
codabench-site_worker-1  |     return self.run(*args, **kwargs)
codabench-site_worker-1  |   File "/app/src/apps/competitions/tasks.py", line 754, in submission_status_cleanup
codabench-site_worker-1  |     for sub in submissions:
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 274, in __iter__
codabench-site_worker-1  |     self._fetch_all()
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 1242, in _fetch_all
codabench-site_worker-1  |     self._result_cache = list(self._iterable_class(self))
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 55, in __iter__
codabench-site_worker-1  |     results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
codabench-site_worker-1  |     cursor.execute(sql, params)
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 67, in execute
codabench-site_worker-1  |     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
codabench-site_worker-1  |     return executor(sql, params, many, context)
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
codabench-site_worker-1  |     return self.cursor.execute(sql, params)
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/django/db/utils.py", line 89, in __exit__
codabench-site_worker-1  |     raise dj_exc_value.with_traceback(traceback) from exc_value
codabench-site_worker-1  |   File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
codabench-site_worker-1  |     return self.cursor.execute(sql, params)
codabench-site_worker-1  | django.db.utils.ProgrammingError: column competitions_phase.public_data_id does not exist
codabench-site_worker-1  | LINE 1: ...r_person", "competitions_phase"."leaderboard_id", "competiti...

@Didayolo
Copy link
Member

What is the YAML syntax for starting kit and public data? We need to update the documentation

@Didayolo
Copy link
Member

All files are shown as available:

Capture d’écran 2023-07-25 à 11 38 47

I'll merge anyway so we can start testing the feature on codabench-test, but this needs to be addressed.

@Didayolo Didayolo merged commit 958071f into develop Jul 25, 2023
@Didayolo Didayolo deleted the download_buttons branch July 25, 2023 09:41
@Didayolo
Copy link
Member

I added the remaining TODOs in #764 ("second PR")

@Didayolo
Copy link
Member

Solutions are available even if not logged in, and the table shows "No Files Available Yet"

Capture d’écran 2023-07-25 à 12 32 10

@bbearce
Copy link
Collaborator Author

bbearce commented Jul 25, 2023

Bah! Ok. Working on the Solution and No Files Yet issue.

Didayolo added a commit that referenced this pull request Jul 25, 2023
* do not show hidden column in leaderboard, unpacker v1 to handle hidden column

* LEADERBOARD_V1 data updated with hidden attribute

* filter: hidden condition removed

* analytics download fixed

* default profile avatar changed

* Detailed results displayed for each task on leaderboard (#967)

* Detailed results displayed for each task on leaderboard

* more explanation added to detailed result fetching. url commented

* detailed results removed from factsheets

* Download buttons (#970)

* download_buttons progress 06_03_2023

* List the Files on Files Tab

* download buttons update

* dataset download added to UI.

* 06_24_2023 progress

* unpackers, polishing and fixing test errors

* last bit of test fixes.

* flake issues

* pytest errors

* single select and final touches

* flake and fixing tests

* remove dev docker-compose file

* hide all but public_startingkit data for no admin

* Don't show non-registered\unlogged-in participants

* Improve display

---------

Co-authored-by: didayolo <adrien.pavao@gmail.com>

---------

Co-authored-by: Ihsan Ullah <ihsan2131@gmail.com>
Co-authored-by: Benjamin Bearce <bbearce@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants