Multilingual Text Detoxification (TextDetox 2024) Forum

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

> requests.exceptions.InvalidJSONError: Out of range float values are not JSON compliant

I have encounter this error while I am only download a sample tsv file and fill the en lang in second column. How can I solve it?

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-29 21:53:49,559 - INFO - Input directory: /tmp/codalab/tmpib9vjk/run/input
2024-04-29 21:53:49,559 - INFO - Output directory: /tmp/codalab/tmpib9vjk/run/output
2024-04-29 21:53:49,559 - DEBUG - ['test_with_answers.tsv']
2024-04-29 21:53:49,559 - DEBUG - ['processed_inputs_multilingual.tsv', 'metadata']
2024-04-29 21:53:49,580 - INFO - References file: 5400
2024-04-29 21:53:49,594 - INFO - Predictions file: 3600
2024-04-29 21:53:49,601 - INFO - Sending predictions to remote 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/tmpib9vjk/run/program/./evaluate.py", line 98, 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: maryam.najafi @ April 29, 2024, 10:03 p.m.

the same error and solution were in here -> https://codalab.lisn.upsaclay.fr/forums/18187/2518/

Posted by: d1n910 @ April 30, 2024, 9:03 a.m.

But I upload the original files given in GitHub and still Got the same error

Posted by: maryam.najafi @ April 30, 2024, 9:10 a.m.

according to
```
2024-04-29 21:53:49,580 - INFO - References file: 5400
2024-04-29 21:53:49,594 - INFO - Predictions file: 3600
```
It looked like you upload your dev file(which only have 3600 items) to test file~

Posted by: d1n910 @ April 30, 2024, 9:39 a.m.

according to
```
2024-04-29 21:53:49,580 - INFO - References file: 5400
2024-04-29 21:53:49,594 - INFO - Predictions file: 3600
```
or maybe you uploaded your test file to dev program~
please check it out~

Posted by: d1n910 @ April 30, 2024, 9:40 a.m.

No I have change the data and again I got this error:
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-30 09:04:09,047 - INFO - Input directory: /tmp/codalab/tmp_T7iaz/run/input
2024-04-30 09:04:09,047 - INFO - Output directory: /tmp/codalab/tmp_T7iaz/run/output
2024-04-30 09:04:09,062 - INFO - References file: 3600
2024-04-30 09:04:09,077 - INFO - Predictions file: 3600
2024-04-30 09:04:09,084 - 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/tmp_T7iaz/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: maryam.najafi @ April 30, 2024, 9:43 a.m.

the above error is for the original TSV submission file in Github.

Posted by: maryam.najafi @ April 30, 2024, 9:43 a.m.

i haven't try dev's pipline. could you try test's pipline ?

Posted by: d1n910 @ April 30, 2024, 10:34 a.m.

I had tried dev's pipline. and~ I got the same error like yours!
i think the https://github.com/pan-webis-de/pan-code/blob/master/clef24/text-detoxification/data/sample_submission_dev.tsv had error.
maybe you can try test's pipline and get some confidentšŸ„¹

Posted by: d1n910 @ April 30, 2024, 10:37 a.m.

I also encountered this problem. The same error occurred when submitting files to codalab and github. Is there any solution? Please contact me. Thank you very much. mail:luozhongyu2799@163.com

Posted by: ZhongyuLuo @ May 6, 2024, 1:28 p.m.

Error:
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-05-06 13:33:29,100 - INFO - Input directory: /tmp/codalab/tmpKXittq/run/input
2024-05-06 13:33:29,100 - INFO - Output directory: /tmp/codalab/tmpKXittq/run/output
2024-05-06 13:33:29,128 - INFO - References file: 3600
2024-05-06 13:33:29,131 - INFO - Predictions file: 400
2024-05-06 13:33:29,138 - 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/tmpKXittq/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: ZhongyuLuo @ May 6, 2024, 1:36 p.m.

According to the information blow, it seem you upload an error file
``` bash
2024-05-06 13:33:29,128 - INFO - References file: 3600
2024-05-06 13:33:29,131 - INFO - Predictions file: 400
```

Posted by: d1n910 @ May 6, 2024, 11:20 p.m.
Post in this thread