duckietown / duckietown-shell

Other
3 stars 6 forks source link

Issue with challenges submit #59

Closed saryazdi closed 5 years ago

saryazdi commented 5 years ago

Getting the following error when running dts challenges submit in the "3_submit" directory of the provided ros baseline. I've tried both pip3 uninstall duckietown-shell; pip3 install --no-cache-dir --user -U duckietown-shell and deleting "~/.dt-shell" (still getting "An updated version of the commands is available" after running dts as posted below, which is a bit concerning), I've also done dts tok set and docker login and dts challenges config --docker-username <USERNAME>.

(base) Sorooshs-MacBook-Pro:3_submit Soroosh$ dts challenges submit --challenge aido3-LF-sim-validation
INFO:dts:duckietown-shell 5.1.2

dts :  Problems with a command?
    :  
    :      Report here: https://github.com/duckietown/duckietown-shell-commands/issues
    :  
    :      Troubleshooting:
    :  
    :      - If some commands update fail, delete ~/.dt-shell/commands
    :  
    :      - To reset the shell to "factory settings", delete ~/.dt-shell
    :  
    :        (Note: you will have to re-configure.)
INFO:dts:Commands version: daffy
INFO:dts:looking at /Users/Soroosh/.dt-shell/commands-multi/daffy

dts :  An updated version of the commands is available.
    :  
    :  Attempting auto-update.

dts :  Updating commands...

dts :  OK
INFO:dts:duckietown-shell-commands 4.1.8
INFO:duckietown-challenges:duckietown-challenges 5.0.7

dts :  message from server: Last blog post:
    :                     : 
    :                     :   Round 3 of the the AI Driving Olympics is underway!
    :                     : https://www.duckietown.org/archives/44514

dts :  message from server: Last blog post:
    :                     : 
    :                     :   Round 3 of the the AI Driving Olympics is underway!
    :                     : https://www.duckietown.org/archives/44514

dts :  Traceback (most recent call last):
    :    File "/Users/Soroosh/.local/lib/python3.7/site-packages/dt_shell/main.py", line 38, in cli_main
    :      cli_main_()
    :    File "/Users/Soroosh/.local/lib/python3.7/site-packages/dt_shell/main.py", line 175, in cli_main_
    :      shell.onecmd(cmdline)
    :    File "/anaconda3/lib/python3.7/cmd.py", line 217, in onecmd
    :      return func(arg)
    :    File "/Users/Soroosh/.local/lib/python3.7/site-packages/dt_shell/cli.py", line 287, in <lambda>
    :      do_command_lam = lambda s, w: do_command(klass, s, w)
    :    File "/Users/Soroosh/.local/lib/python3.7/site-packages/dt_shell/dt_command_abs.py", line 42, in do_command
    :      cls.commands[word], shell, " ".join(parts[1:])
    :    File "/Users/Soroosh/.local/lib/python3.7/site-packages/dt_shell/dt_command_abs.py", line 50, in do_command
    :      cls.command(shell, args)
    :    File "/Users/Soroosh/.dt-shell/commands-multi/daffy/challenges/submit/command.py", line 110, in command
    :      submission_protocols=sub_info.protocols,
    :    File "/Users/Soroosh/.local/lib/python3.7/site-packages/duckietown_challenges/rest_methods.py", line 327, in dtserver_get_compatible_challenges
    :      challenges = dtserver_get_challenges(token=token, impersonate=impersonate)
    :    File "/Users/Soroosh/.local/lib/python3.7/site-packages/duckietown_challenges/rest_methods.py", line 286, in dtserver_get_challenges
    :      cd = ChallengeDescription.from_yaml(challenge_desc)
    :    File "</anaconda3/lib/python3.7/site-packages/decorator.py:decorator-gen-674>", line 2, in from_yaml
    :    File "/Users/Soroosh/.local/lib/python3.7/site-packages/duckietown_challenges/utils.py", line 141, in wrap_config_reader2
    :      raise InvalidConfiguration(msg)
    :  duckietown_challenges.exceptions.InvalidConfiguration: Unused fields ['closure', 'dependencies'] 
    :  
    :    > {
    :    >     "challenge": "aido1_LF1_r3-v3",
    :    >     "title": "LF - Lane following (rev. 3) ",
    :    >     "description": "Lane following challenge.\n\nThis challenge is described in the detail [in the book](http://docs.duckietown.org/DT18/AIDO/out/index.html).\n",
    :    >     "protocol": "aido1_remote3-v3",
    :    >     "date-open": "2018-10-01T00:00:00",
    :    >     "date-close": "2018-12-31T06:00:00",
    :    >     "transitions": {},
    :    >     "steps": {},
    :    >     "closure": [],
    :    >     "tags": [
    :    >         "visible",
    :    >         "aido1",
    :    >         "aido1-embodied",
    :    >         "ml-validation",
    :    >         "LF",
    :    >         "v3"
    :    >     ],
    :    >     "scoring": {
    :    >         "scores": [
    :    >             {
    :    >                 "description": "This is the median distance traveled, *along a lane*.\n(That is, going in circles will not make this metric increase.)\n\nThis is discretized to tiles.\n",
    :    >                 "name": "driven_lanedir_median",
    :    >                 "order": "higher-is-better",
    :    >                 "discretization": 0.62,
    :    >                 "short": "Traveled distance"
    :    >             },
    :    >             {
    :    >                 "description": "This is the median survival time. The simulation\nis terminated when the car goes outside of the road\nor it crashes with an obstacle.\n",
    :    >                 "name": "survival_time_median",
    :    >                 "order": "higher-is-better",
    :    >                 "discretization": 2,
    :    >                 "short": "Survival time"
    :    >             },
    :    >             {
    :    >                 "description": "This is the median lateral deviation from the center line.\n",
    :    >                 "name": "deviation-center-line_median",
    :    >                 "order": "lower-is-better",
    :    >                 "discretization": 0.01,
    :    >                 "short": "Lateral deviation"
    :    >             },
    :    >             {
    :    >                 "description": "This is the median of the time spent outside of the drivable zones.\nFor example this penalizes driving in the wrong lane.\n",
    :    >                 "name": "in-drivable-lane_median",
    :    >                 "order": "lower-is-better",
    :    >                 "discretization": 0.2,
    :    >                 "short": "Major infractions"
    :    >             }
    :    >         ]
    :    >     },
    :    >     "dependencies": {
    :    >         "$schema": {
    :    >             "type": "object",
    :    >             "title": "Dict[str,ChallengeDependency]",
    :    >             "$schema": "http://json-schema.org/draft-07/schema#",
    :    >             "properties": {
    :    >                 "$schema": {}
    :    >             },
    :    >             "additionalProperties": {
    :    >                 "$id": "http://invalid.json-schema.org/ChallengeDependency#",
    :    >                 "type": "object",
    :    >                 "order": [
    :    >                     "description",
    :    >                     "min_threshold",
    :    >                     "scores",
    :    >                     "comparisons"
    :    >                 ],
    :    >                 "title": "ChallengeDependency",
    :    >                 "$schema": "http://json-schema.org/draft-07/schema#",
    :    >                 "required": [
    :    >                     "comparisons",
    :    >                     "description",
    :    >                     "min_threshold",
    :    >                     "scores"
    :    >                 ],
    :    >                 "__module__": "duckietown_challenges.challenge",
    :    >                 "properties": {
    :    >                     "scores": {
    :    >                         "type": "object",
    :    >                         "title": "Dict[str,DepScore]",
    :    >                         "$schema": "http://json-schema.org/draft-07/schema#",
    :    >                         "properties": {
    :    >                             "$schema": {}
    :    >                         },
    :    >                         "additionalProperties": {
    :    >                             "$id": "http://invalid.json-schema.org/DepScore#",
    :    >                             "type": "object",
    :    >                             "order": [
    :    >                                 "description",
    :    >                                 "importance",
    :    >                                 "score_name",
    :    >                                 "score_min",
    :    >                                 "score_max"
    :    >                             ],
    :    >                             "title": "DepScore",
    :    >                             "$schema": "http://json-schema.org/draft-07/schema#",
    :    >                             "required": [
    :    >                                 "description",
    :    >                                 "importance",
    :    >                                 "score_max",
    :    >                                 "score_min",
    :    >                                 "score_name"
    :    >                             ],
    :    >                             "__module__": "duckietown_challenges.challenge",
    :    >                             "properties": {
    :    >                                 "score_max": {
    :    >                                     "type": "number",
    :    >                                     "title": "float",
    :    >                                     "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                                 },
    :    >                                 "score_min": {
    :    >                                     "type": "number",
    :    >                                     "title": "float",
    :    >                                     "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                                 },
    :    >                                 "importance": {
    :    >                                     "type": "number",
    :    >                                     "title": "float",
    :    >                                     "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                                 },
    :    >                                 "score_name": {
    :    >                                     "type": "string",
    :    >                                     "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                                 },
    :    >                                 "description": {
    :    >                                     "type": "string",
    :    >                                     "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                                 }
    :    >                             },
    :    >                             "description": "DepScore(description:str, importance:float, score_name:str, score_min:float, score_max:float)",
    :    >                             "__qualname__": "DepScore"
    :    >                         }
    :    >                     },
    :    >                     "comparisons": {
    :    >                         "type": "object",
    :    >                         "title": "Dict[str,DepBetter]",
    :    >                         "$schema": "http://json-schema.org/draft-07/schema#",
    :    >                         "properties": {
    :    >                             "$schema": {}
    :    >                         },
    :    >                         "additionalProperties": {
    :    >                             "$id": "http://invalid.json-schema.org/DepBetter#",
    :    >                             "type": "object",
    :    >                             "order": [
    :    >                                 "description",
    :    >                                 "importance",
    :    >                                 "username",
    :    >                                 "sub_label"
    :    >                             ],
    :    >                             "title": "DepBetter",
    :    >                             "$schema": "http://json-schema.org/draft-07/schema#",
    :    >                             "required": [
    :    >                                 "description",
    :    >                                 "importance",
    :    >                                 "sub_label",
    :    >                                 "username"
    :    >                             ],
    :    >                             "__module__": "duckietown_challenges.challenge",
    :    >                             "properties": {
    :    >                                 "username": {
    :    >                                     "type": "string",
    :    >                                     "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                                 },
    :    >                                 "sub_label": {
    :    >                                     "type": "string",
    :    >                                     "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                                 },
    :    >                                 "importance": {
    :    >                                     "type": "number",
    :    >                                     "title": "float",
    :    >                                     "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                                 },
    :    >                                 "description": {
    :    >                                     "type": "string",
    :    >                                     "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                                 }
    :    >                             },
    :    >                             "description": "DepBetter(description:str, importance:float, username:str, sub_label:str)",
    :    >                             "__qualname__": "DepBetter"
    :    >                         }
    :    >                     },
    :    >                     "description": {
    :    >                         "type": "string",
    :    >                         "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                     },
    :    >                     "min_threshold": {
    :    >                         "type": "number",
    :    >                         "title": "float",
    :    >                         "$schema": "http://json-schema.org/draft-07/schema#"
    :    >                     }
    :    >                 },
    :    >                 "description": "ChallengeDependency(description:str, min_threshold:float, scores:Dict[str, duckietown_challenges.challenge.DepScore], comparisons:Dict[str, duckietown_challenges.challenge.DepBetter])",
    :    >                 "__qualname__": "ChallengeDependency"
    :    >             }
    :    >         }
    :    >     }
    :    > }

dts :  If you think this is a bug, please report that you are using:
    :  
    :  duckietown-shell-commands: 4.1.8
    :  duckietown-challenges: 5.0.7
    :  python: "3.7.3 (default, Mar 27 2019, 16:54:48) \n[Clang 4.0.1 (tags/RELEASE_401/final)]"
    :  duckietown-shell: 5.1.2
    :  commands-version: daffy
    :  encodings:
    :    stdout: UTF-8
    :    stderr: UTF-8
    :    locale: UTF-8
(base) Sorooshs-MacBook-Pro:3_submit Soroosh$ 
saryazdi commented 5 years ago

Fixed by removing anything in "/anaconda3/lib/python3.7/site-packages" with "duckietown" in its name. I think I had an incorrect installation of duckietown-shell before.