Multilingual Text Detoxification (TextDetox 2024) Forum

Go back to competition Back to thread list Post in this thread

> If the remote service can't used now?

WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
2024-04-25 18:40:10,757 - INFO - Input directory: /tmp/codalab/tmpso7Eyt/run/input
2024-04-25 18:40:10,757 - INFO - Output directory: /tmp/codalab/tmpso7Eyt/run/output
2024-04-25 18:40:10,776 - INFO - References file: 3600
2024-04-25 18:40:10,785 - INFO - Predictions file: 3600
2024-04-25 18:40:10,795 - INFO - Sending predictions to remove evaluation server
Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/requests/models.py", line 473, in prepare_body
body = complexjson.dumps(json, allow_nan=False)
File "/opt/conda/lib/python3.9/json/__init__.py", line 234, in dumps
return cls(
File "/opt/conda/lib/python3.9/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/opt/conda/lib/python3.9/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
ValueError: Out of range float values are not JSON compliant

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/tmp/codalab/tmpso7Eyt/run/program/./evaluate.py", line 95, in
result = requests.post(
File "/opt/conda/lib/python3.9/site-packages/requests/api.py", line 117, in post
return request('post', url, data=data, json=json, **kwargs)
File "/opt/conda/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/opt/conda/lib/python3.9/site-packages/requests/sessions.py", line 515, in request
prep = self.prepare_request(req)
File "/opt/conda/lib/python3.9/site-packages/requests/sessions.py", line 443, in prepare_request
p.prepare(
File "/opt/conda/lib/python3.9/site-packages/requests/models.py", line 321, in prepare
self.prepare_body(data, files, json)
File "/opt/conda/lib/python3.9/site-packages/requests/models.py", line 475, in prepare_body
raise InvalidJSONError(ve, request=self)
requests.exceptions.InvalidJSONError: Out of range float values are not JSON compliant

Posted by: d1n910 @ April 25, 2024, 6:41 p.m.

Dear participant,

from the logs you have provided it appears to be an error on the data side. Please make sure your submission does not contain `NaN`s, double tabular symbols and other encoding errors.

Posted by: etomoscow @ April 26, 2024, 6:40 a.m.

Dear participant,

according to the last submission you have provided (file name `public_dat (3).zip`) there is an empty `neutral_sentence` column. Please make sure that the column is filled with predictions. All the details of how to make a proper submission can be found when you click `Participate` then `Submit/View Results`. I will copy-paste the instruction here for your convenience:

Development phase - you are given a multilingual corpus of toxic sentences for 9 different languages. The data is to be downloaded as a .tsv file. The column `neutral_sentence` is empty. Please, fill this column with your predictions (detoxification) and submitted the .tsv file zipped in a .zip archive. Note that you can find detailed evaluation results if you download scoring error log. In case of errors please first check error log. Feel free to contact organizers through Google Group e-mail: textdetox-clef2024@googlegroups.com

Posted by: etomoscow @ April 26, 2024, 6:44 a.m.

Is there any way to check this automatically? Checking manually seems tedious

Posted by: mkrisnai @ April 26, 2024, 2:53 p.m.

is there any script to verify whether the file contains encoding error? I find it too tedious checking it one by one manually

Posted by: mkrisnai @ April 26, 2024, 2:58 p.m.

@mkrisnai I still finding how to deal this question. If you had successed, pls contact me your method(so do i)! Thx!!!
my email: wyd1n910@gmail.com 🌹

Posted by: d1n910 @ April 26, 2024, 2:59 p.m.

I used the code whit followed and finally made it😭😭:
import pandas as pd

# read file
sample_submission_test = pd.read_csv('sample_submission_test.tsv', sep='\t')
test_with_answers = pd.read_csv('test_with_answers.tsv', sep='\t')

assert len(sample_submission_test) == len(test_with_answers), "The two files must have the same number of rows."

# find sample_submission_test lang == en
en_rows_index = sample_submission_test[sample_submission_test['lang'] == 'en'].index

# from test_with_answers get neutral_sentence
updated_neutral_sentences = test_with_answers.loc[en_rows_index, 'neutral_sentence']

# upadate sample_submission_test neutral_sentence
sample_submission_test.loc[en_rows_index, 'neutral_sentence'] = updated_neutral_sentences

# save
sample_submission_test.to_csv('sample_submission_test_en.tsv', sep='\t', index=False)

Posted by: d1n910 @ April 26, 2024, 4:28 p.m.

yea, seems like using the sample files in the github is the way rather than using files provided in the codalab.

Posted by: mkrisnai @ April 26, 2024, 4:47 p.m.

your provided code seems doesnt work on me.

Posted by: mkrisnai @ April 26, 2024, 5:55 p.m.

I found you had uploaded your submission successfully. could you share your method?

Posted by: d1n910 @ April 26, 2024, 6:16 p.m.

i just filled the "neutral_sentence" column with my predictions in the sample tsv but this method doesnt work for other models.

Posted by: mkrisnai @ April 26, 2024, 6:20 p.m.

thanks you !

Posted by: d1n910 @ April 27, 2024, 5:32 a.m.
Post in this thread