Help Needed with Code Submission for Task 1

Following the steps on the example github for touche-code/clef25/advertisement-detection
/subtask-1-generation/
Can’t upload the baseline model currently.
The following is the error I am facing:-


Can anyone help me out?

Edit: Currently the run uploads work so I am uploading using that for the Task-1…but since Task-2 needs code submission so, any help is appreciated.

Dear arka,

Thanks for reaching out and for participating in the task!
The problem is that the software did not produce valid outputs.

The reason is:

python3\r: No such file or directory

This might be a problem with the line breaks in windows vs. line breaks in linux.
The submission in the baseline uses the shebang, and there the line break is wrongly interpreted.

You should be able to resolve this by changing the entrypoint of the docker image.

I.e., from:

ENTRYPOINT ["/generate.py"]

To:

ENTRYPOINT ["python3", "/generate.py"]

(the difference is that the first entrypoint tries to read how to execute the file from the file itself, and there it interprets the non-linux linebreak \r as part of the executable, this is resolved in the second entrypoint where we directly specify that it should run python3.

Does this help resolve the problem?

Best regards,

Maik

Hi Malik,
Nope, this doesn’t seem to help. Hitting the same error as before
Also, adding the updated docker config

Regards,
Arka

Could you please share the tira-cli command that you execute?

Thanks in advance!

Best regads,

Maik

Hi Malik,
the command was this:-
tira-cli code-submission --path . --task advertisement-in-retrieval-augmented-generation-2025 --dataset ads-in-rag-task-1-generation-spot-check-20250423_1-training --command ‘/generate.py’

Oki doki, the problem is the --command '/generate.py'. If this command is passed, it does not use the entrypoint. I.e., in this case, you would need to use --command 'python3 /generate.py'

Hi Malik,
This is the error after changing the command

✓ You are registered and will submit as team ju-nlp to task advertisement-in-retrieval-augmented-generation-2025.
✓ The dataset ads-in-rag-task-1-generation-spot-check-20250423_1-training is available locally.
✓ The code is in a git repository D:\subtask-1-generation.
✓ The git repository D:\subtask-1-generation is clean.
✓ The code is embedded into the docker image subtask-1-generation-04b6c.
✓ The docker image produced valid outputs on the dataset ads-in-rag-task-1-generation-spot-check-20250423_1-training.
✓ The meta data is uploaded to TIRA.
Push Docker image to TIRA...
Push Docker image
WARNING:root:Error occured while fetching /api/task/advertisement-in-retrieval-augmented-generation-2025/user/ju-nlp. Code: 500. I will sleep 15 seconds and continue.
Traceback (most recent call last):
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 1249, in json_response
    raise ValueError(f"Got statuscode {resp.status_code} for {endpoint}. Got {resp}")
ValueError: Got statuscode 500 for /api/task/advertisement-in-retrieval-augmented-generation-2025/user/ju-nlp. Got <Response [500]>
WARNING:root:Error occured while fetching /api/task/advertisement-in-retrieval-augmented-generation-2025/user/ju-nlp. Code: 500. I will sleep 3 seconds and continue.
Traceback (most recent call last):
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 1249, in json_response
    raise ValueError(f"Got statuscode {resp.status_code} for {endpoint}. Got {resp}")
ValueError: Got statuscode 500 for /api/task/advertisement-in-retrieval-augmented-generation-2025/user/ju-nlp. Got <Response [500]>
WARNING:root:Error occured while fetching /api/task/advertisement-in-retrieval-augmented-generation-2025/user/ju-nlp. Code: 500. I will sleep 5 seconds and continue.
Traceback (most recent call last):
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 1249, in json_response
    raise ValueError(f"Got statuscode {resp.status_code} for {endpoint}. Got {resp}")
ValueError: Got statuscode 500 for /api/task/advertisement-in-retrieval-augmented-generation-2025/user/ju-nlp. Got <Response [500]>
WARNING:root:Error occured while fetching /api/task/advertisement-in-retrieval-augmented-generation-2025/user/ju-nlp. Code: 500. I will sleep 11 seconds and continue.
Traceback (most recent call last):
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 1249, in json_response
    raise ValueError(f"Got statuscode {resp.status_code} for {endpoint}. Got {resp}")
ValueError: Got statuscode 500 for /api/task/advertisement-in-retrieval-augmented-generation-2025/user/ju-nlp. Got <Response [500]>
WARNING:root:Error occured while fetching /api/task/advertisement-in-retrieval-augmented-generation-2025/user/ju-nlp. Code: 500. I will sleep 10 seconds and continue.
Traceback (most recent call last):
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 1249, in json_response
    raise ValueError(f"Got statuscode {resp.status_code} for {endpoint}. Got {resp}")
ValueError: Got statuscode 500 for /api/task/advertisement-in-retrieval-augmented-generation-2025/user/ju-nlp. Got <Response [500]>
Traceback (most recent call last):
  File "d:\subtask-1-generation\.venv\Lib\site-packages\requests\models.py", line 974, in json
    return complexjson.loads(self.text, **kwargs)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\arka0\AppData\Local\Programs\Python\Python313\Lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "C:\Users\arka0\AppData\Local\Programs\Python\Python313\Lib\json\decoder.py", line 345, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\arka0\AppData\Local\Programs\Python\Python313\Lib\json\decoder.py", line 363, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\subtask-1-generation\.venv\Scripts\tira-cli.exe\__main__.py", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\tira_cli.py", line 360, in main
    return args.executable(**vars(args))
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\tira_cli.py", line 235, in code_submission_command
    client.submit_code(
    ~~~~~~~~~~~~~~~~~~^
        Path(path),
        ^^^^^^^^^^^
    ...<5 lines>...
        mount_hf_model=mount_hf_model,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\tira_client.py", line 417, in submit_code
    pushed_image = push_image(self, docker_tag, task_id, user_id)
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\tira_run.py", line 321, in push_image
    return client.local_execution.push_image(image, registry_prefix, tira_task_id, tira_vm_id)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\local_execution_integration.py", line 623, in push_image
    self.login_docker_client(task_name, team_name, client)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\local_execution_integration.py", line 232, in login_docker_client
    docker_user, docker_password, docker_registry = self.tira_client.docker_credentials(task_name, team_name)
                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 236, in docker_credentials
    ret = self.metadata_for_task(task_name, team_name)
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 255, in metadata_for_task
    return self.json_response(f"/api/task/{task_name}/user/{team_name}")
           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 1271, in json_response
    return resp.json()
           ~~~~~~~~~^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\requests\models.py", line 978, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 2 column 1 (char 1)

Oki doki, this was an configuration error for your team, I fixed this, could you please try it again?

Hi Malik,
New Error :slight_smile:

✓ The Docker image is pushed to TIRA.
Configure code submission in TIRA...
Upload of software failed with error 
<!doctype html>
<html lang="en">
<head>
  <title>Server Error (500)</title>
</head>
<body>
  <h1>Server Error (500)</h1><p></p>
</body>
</html>
 and response code 500.
Traceback (most recent call last):
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 317, in add_docker_software
    ret = json.loads(ret)
  File "C:\Users\arka0\AppData\Local\Programs\Python\Python313\Lib\json\__init__.py", line 346, in loads      
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "C:\Users\arka0\AppData\Local\Programs\Python\Python313\Lib\json\decoder.py", line 345, in decode      
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\arka0\AppData\Local\Programs\Python\Python313\Lib\json\decoder.py", line 363, in raw_decode  
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\subtask-1-generation\.venv\Scripts\tira-cli.exe\__main__.py", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\tira_cli.py", line 360, in main
    return args.executable(**vars(args))
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\tira_cli.py", line 235, in code_submission_command
    client.submit_code(
    ~~~~~~~~~~~~~~~~~~^
        Path(path),
        ^^^^^^^^^^^
    ...<5 lines>...
        mount_hf_model=mount_hf_model,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\tira_client.py", line 421, in submit_code
    upload = self.add_docker_software(
        pushed_image,
    ...<9 lines>...
        mount_hf_model=mount_hf_model,
    )
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 321, in add_docker_software
    raise ValueError(msg)
ValueError: Upload of software failed with error
<!doctype html>
<html lang="en">
<head>
  <title>Server Error (500)</title>
</head>
<body>
  <h1>Server Error (500)</h1><p></p>
</body>
</html>
 and response code 500.

Alright, I just double checked it on my machine, for me it worked.

Maybe some old things are cached.

Could you please delete the .tira directory in your home directory and then authenticate again? (i.e., with tira-cli login).

Furthermore, can you also delete the registry.webis.de entry from your config.json in your .docker folder?

This should be everything that is cached.

If this does not resolve the problem, then we can continue in a private message as this would then require sharing some auth tokens.

Best regards,

Maik

Hi Maik,
The error is still not quite fixed,

TIRA Code Submission:
✓ You are registered and will submit as team ju-nlp to task advertisement-in-retrieval-augmented-generation-2025.
✓ The dataset ads-in-rag-task-1-generation-spot-check-20250423_1-training is available locally.
✓ The code is in a git repository D:\subtask-1-generation.
✓ The git repository D:\subtask-1-generation is clean.
✓ The code is embedded into the docker image subtask-1-generation-e9e69.
✓ The docker image produced valid outputs on the dataset ads-in-rag-task-1-generation-spot-check-20250423_1-training.
Upload Code Submission image...
I check that the submission in directory 'C:\Users\arka0\AppData\Local\Temp\tira-ixb11r8b' is valid...
        ✓ The jsonl file has the correct format.


Upload C:\Users\arka0\AppData\Local\Temp\tira-ixb11r8b to TIRA: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 14.1k/14.1k [02:25<00:00, 96.9B/s]


Failed to upload to TIRA, got statuscode 502. Details: <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\subtask-1-generation\.venv\Scripts\tira-cli.exe\__main__.py", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\tira_cli.py", line 360, in main
    return args.executable(**vars(args))
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\tira_cli.py", line 235, in code_submission_command
    client.submit_code(
    ~~~~~~~~~~~~~~~~~~^
        Path(path),
        ^^^^^^^^^^^
    ...<5 lines>...
        mount_hf_model=mount_hf_model,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\tira_client.py", line 410, in submit_code
    metadata_uuid = self.upload_run_anonymous(tmp_dir, dataset_id)["uuid"]
                    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "d:\subtask-1-generation\.venv\Lib\site-packages\tira\rest_api_client.py", line 1032, in upload_run_anonymous
    raise ValueError(message)
ValueError: Failed to upload to TIRA, got statuscode 502. Details: <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>

Alright, lets resolve this in a private chat :slight_smile: