Info

Testing and Issues

You can test this entry and submit issues during the testing period of the ML Competition contest.

Entries with serious issues will not be able to win the contest, but even minor issues might be important for overall results.

Voting

Comments

Hello. This issue is well known on old, outdated systems (or docker containers).

The issue is caused by the https://github.com/nlohmann/json library (the most popular library used for JSON parsing for C++), the only additional library I have used.
That is, this is not the issue with my implementation but rather with using the Nlohmann JSON library on outdated systems.
It happens because of the old gcc versions or outdated built-in packages.
I have used the systems with the latest updates; hence, I have never faced this issue.
The possible solutions for the issue:
Since you have not provided any detailed information on the system you have used (except for stating "Debian GNU/Linux 10 (buster)"), as well as any information on the pre-installed default packages that are provided with this system, I cannot state for sure what the solution of the problem should be on your system.

Hence, I provide an example of how to fix this issue on the docker container debian:10.13 (that has Debian GNU/Linux 10 (buster) - exactly the system stated in the requirements to the contest). It has no recent updates, as well.

Here is how to update on an old docker image debian:10.13 to be able to run my program (do not skip any line!!!):
```
apt update -y
apt install -y cmake

echo 'deb http://deb.debian.org/debian testing main' >> /etc/apt/sources.list
apt update -y

# This next line may cause error on old systems, so run all the next lines in case of error. BUT DO NOT SKIP THIS LINE IN ANY CASE!
apt install -y gcc

# This is fix of libcrypt1, run only in case of error. It will not work, if previous line has not failed. Note, apt download may download package with the different name, adjust accordingly!
cd /tmp
apt download libcrypt1
dpkg-deb -x libcrypt1_1%3a4.4.36-2_amd64.deb .
cp -av lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/
apt --fix-broken install -y
apt install -y gcc

# Verify it works
cd /contest
LD_LIBRARY_PATH=. ./tglang-tester tglang.h
```
You can see the attached log file with the shell output, proof that the problem is indeed easily fixed and is caused only by an old system. (NOTE: I can't attach .log file, so here is the link to Google Drive with the file: https://drive.google.com/file/d/1xRdDucwFU8XATLFvyNVgtxhYMnlo71jh/view?usp=sharing)
Final notes:

It is disrespectful of you not to provide any data about the system on which the solution will be tested. You could add the name of the docker container or system image used. I also want to draw your attention to the insufficiently accurate data regarding the program structure (under the conditions of the competition); in case of questions, read my README in the src folder.


Since I am not sure you will read the README, and this is not specified in the terms of the competition, here is one more note:
It takes the class (singleton) up to 3 seconds to load the model for the first time.
Then, the interference speed on texts of 4096 characters is less than five milliseconds.
So, you would better test the models without re-running the tglang-tester for every file (which is highly inefficient and unprofessional), but implement all the testing in one program, not reload the library every time.
You have not added any comments yet...
by rating

Issues

Fair Leopard Nov 7, 2023 at 18:53
Unfortunately, this submission has been disqualified after our preliminary tests for exceeding the 500ms limit per text sample.
10
Fair Quokka Oct 26, 2023 at 23:24
This is an important message regarding your submission. The following issues have been discovered during preliminary testing:
/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by ./libtglang.so)

You can provide further clarifications within the next 24 hours. 
Bossy Sloth Oct 27, 2023 at 09:48
Hello. This issue is well known on old, outdated systems (or docker containers).

See the reason of the error and details in the next messages (because of the text size limit here).

Fix:
```
apt update -y
apt install -y cmake

echo 'deb http://deb.debian.org/debian testing main' >> /etc/apt/sources.list
apt update -y

apt install -y gcc

cd /tmp
apt download libcrypt1
dpkg-deb -x libcrypt1_1%3a4.4.36-2_amd64.deb .
cp -av lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/
apt --fix-broken install -y
apt install -y gcc

# Verify
cd /contest
LD_LIBRARY_PATH=. ./tglang-tester tglang.h
```
Nobody added any issues yet...