Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 22 18:59
    andreyv closed #1146
  • Nov 22 18:59
    andreyv commented #1146
  • Nov 22 18:29
    andreyv commented #1158
  • Nov 22 16:40

    andreyv on master

    Make PrintingService translatab… (compare)

  • Nov 22 16:40
    andreyv closed #1152
  • Nov 22 16:40
    andreyv commented #1152
  • Nov 22 16:17
    andreyv commented #1151
  • Nov 22 15:20

    andreyv on master

    Don't open title page input fil… (compare)

  • Nov 22 15:20
    andreyv closed #1150
  • Nov 22 15:20
    andreyv commented #1150
  • Nov 15 20:37
    CristianCantoro closed #1166
  • Nov 15 20:37
    CristianCantoro commented #1166
  • Nov 15 20:36
    CristianCantoro closed #1168
  • Nov 15 20:36
    CristianCantoro commented #1168
  • Nov 15 11:52
    wil93 commented #1168
  • Nov 15 11:48
    CristianCantoro opened #1168
  • Nov 15 11:44
    CristianCantoro reopened #1166
  • Nov 15 11:44
    CristianCantoro commented #1166
  • Nov 15 11:35
    CristianCantoro commented #1166
  • Nov 15 11:30
    CristianCantoro closed #1166
MacTin
@MacTin
Is there examples about Contests,
MacTin
@MacTin
or, where can i find example tasks?
Andrey Vihrov
@andreyv
@MacTin The simplest way is just to create the tasks yourself. For example, you can use the AdminWebServer interface to create a "Sum" task where, given two numbers, you need to output their sum. After setting task type (Batch) and limits, you can add it to a contest, and then the task will appear in the contestant interface.
MacTin
@MacTin
Thank you
Edoardo Morassutto
@edomora97

any tutorials how to create a distributed setup for cms . web server and multiple worker servers and remote database setup

A while ago I made a step-by-step tutorial for deploying cms on Google Cloud Platform. It's a little bit out of date, but can be useful for starting up from scratch.

https://docs.google.com/presentation/d/1GA6UNPa9wBrihoATKHcINNlCOgcmQrBCAX9yk85d4Tk/

Enjoy!

@mostafaammar79_twitter

MacTin
@MacTin
At now the rankingWebServer do not show users, and when a user submit a program, the rankingWebServer process show this output:

umactin@vUbuntu:~/cms/scripts$ cmsRankingWebServer
2020-09-30 04:45:40.870 INF Using config file /usr/local/etc/cms.ranking.conf.

2020-09-30 04:46:30.466 INF Unauthorized request.
http://localhost:8890/submissions/

{'username': 'usern4me', 'password': 'passw0rd'}

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/gevent/pywsgi.py", line 935, in handle_one_response
self.run_application()
File "/usr/local/lib/python3.6/dist-packages/gevent/pywsgi.py", line 908, in run_application
self.result = self.application(self.environ, self.start_response)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 766, in call
return self.app(environ, start_response)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 826, in call
return app(environ, start_response)
File "/usr/local/lib/python3.6/dist-packages/cms-1.4rc1-py3.6.egg/cmsranking/RankingWebServer.py", line 102, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 48, in <lambda>
return update_wrapper(lambda a: f(a)(*a[-2:]), f)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/exceptions.py", line 155, in call
response = self.get_response(environ)
File "/usr/local/lib/python3.6/dist-packages/cms-1.4rc1-py3.6.egg/cmsranking/RankingWebServer.py", line 76, in get_response
response = Unauthorized.get_response(self, environ)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/exceptions.py", line 141, in get_response
if self.response is not None:
AttributeError: 'CustomUnauthorized' object has no attribute 'response'
Wed Sep 30 04:46:30 2020 {'REMOTE_ADDR': '::ffff:127.0.0.1', 'REMOTE_PORT': '43486', 'HTTP_HOST': 'localhost:8890', (hidden keys: 24)} failed with AttributeError

::ffff:127.0.0.1 - - [2020-09-30 04:46:30] "PUT /submissions/ HTTP/1.1" 500 161 0.003792

Andrey Vihrov
@andreyv
@MacTin Please check that the ranking credentials in cms.ranking.conf match the rankings URL in cms.conf
MacTin
@MacTin
ok , the match was incorrect, but now cmsRankingWebserve show this output

2020-09-30 12:18:34.725 WRN Invalid data.
http://localhost:8890/submissions/

{'9': {'task': 'Suma_20a_2bb', 'time': 1601486302, 'user': 'MacTinStudent'}}

Exception cmsranking.Entity.InvalidData:

    [entity 9] Inconsistent data

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/cms-1.4rc1-py3.6.egg/cmsranking/RankingWebServer.py", line 216, in put_list
    self.store.merge_list(data)
  File "/usr/local/lib/python3.6/dist-packages/cms-1.4rc1-py3.6.egg/cmsranking/Store.py", line 256, in merge_list
    raise exc
  File "/usr/local/lib/python3.6/dist-packages/cms-1.4rc1-py3.6.egg/cmsranking/Store.py", line 250, in merge_list
    raise InvalidData("Inconsistent data")

::ffff:127.0.0.1 - - [2020-09-30 12:18:34] "PUT /submissions/ HTTP/1.1" 400 303 0.026695

.
MacTin
@MacTin
.
Andrey Vihrov
@andreyv
@MacTin Probably you need to remove old data, see https://cms.readthedocs.io/en/v1.4/RankingWebServer.html#removing-data
MacTin
@MacTin
thanks, andrey vihrov
RezwanArefin01
@RezwanArefin01
Is the current tps loader compatible with ioi-2017/tps? I am getting some key errors when trying to load the examples there..
MacTin
@MacTin
Thanks Andrey Vihrov@andreyv, I can watch the cms working very well, but I have to learn more about it , is there any book? or Resources?
RezwanArefin01
@RezwanArefin01
Hello!
I am facing a problem. The ranking web server is not updating the scores for OutputOnly Tasks. However, the 'Ranking' page in admin web server shows the correct scores.
I have tried dropping the ranking web server's data and restarting the contest + ranking web server, still the same issue. The ranking web server is updating all other tasks' scores but not the output only.
What could be the problem?
I am on version 1.4.rc1.
Score Type for the OutputOnly Task is 'Sum'. If it matters.
Andrey Vihrov
@andreyv
@RezwanArefin01 First check ProxyService and RWS logs for anything suspicious
AutocompleteFailed
@AutocompleteFailed
Hi, I have installed CMS and created a new contest as described in the documentation. However I can't add any tasks since none are available in the 'select new task' drop down menu on the web admin page. Have I made a mistake in installation?
AutocompleteFailed
@AutocompleteFailed
I have subsequently worked out how to import the example contest with its tasks.
Does CMS have support for the Learning Tools Interoperability protocol?
Andrey Vihrov
@andreyv
@AutocompleteFailed First you need to create a task under Tasks, then you can add it on the contest page
AutocompleteFailed
@AutocompleteFailed
Ah, that was a bit silly of me. Thank you
AutocompleteFailed
@AutocompleteFailed
Is there any way to shut down the system?
MacTin
@MacTin

Please, help me, about the problem shoes of ioi 2019

It has this score and test cases

{"score": 10, "testcases": ["1-01", "1-02"]}
{"score": 20, "testcases": ["1-01", "1-02", "3-01", "3-02", "3-03", "3-04", "3-05", "3-06", "3-07", "3-08", "3-09", "3-10", "3-11", "3-12", "3-13", "3-14", "3-15", "3-16", "3-17", "3-18", "3-19", "3-20", "3-21", "3-22", "3-23", "3-24", "3-25", "3-26", "3-27", "3-28", "3-29", "3-30", "3-31", "3-32", "3-33", "3-34", "3-35", "3-36", "3-37"]}
{"score": 20, "testcases": ["1-01", "1-02", "3-01", "3-02", "3-03", "3-04", "3-05", "3-06", "3-07", "3-08", "3-09", "3-10", "3-11", "3-12", "3-13", "3-14", "3-15", "3-16", "3-17", "3-18", "3-19", "3-20", "3-21", "3-22", "3-23", "3-24", "3-25", "3-26", "3-27", "3-28", "3-29", "3-30", "3-31", "3-32", "3-33", "3-34", "3-35", "3-36", "3-37"]}

But when I Try to set the score paramters the cms shoy error as "invalid fromat"

Anyone knows how I upload that type the problem in de cms?

RezwanArefin01
@RezwanArefin01
You need to format the test cases separately to import in cms.
The score parameters in CMS works like this:
If you give [[m1, t2], [m2, t2]], it means first t1 tests have point m1, next t2 tests have point m2.
Andrey Vihrov
@andreyv
@AutocompleteFailed Depends on how you started it, if you ran cmsResourceService, then type Ctrl+C to interrupt it
liangfeng-source
@liangfeng-source
hi, everyone, is it possible to configure the BatchTask to link to a xxx.a libraray during compliation?
Andrey Vihrov
@andreyv
@liangfeng-source You can add a grader source file to be linked together with user code, see https://cms.readthedocs.io/en/latest/Task%20types.html#batch
liangfeng-source
@liangfeng-source
@andreyv hi, Andrey, thank you for the reply. But my problem is: our grader is not a "xxx.c" source file, but a "xxx.a" library, we need to use -l commend to link the source file to it.
gcc -I . contest.c libxxx.a -o contest
something like this.
I want CMS to allow me to configure my batch task like this.
is it possible
Andrey Vihrov
@andreyv
@liangfeng-source Is there any reason not to supply the grader in source format?
I don't think there is a ready way to use a static library, but you could hack CMS so that .a is allowed alongside .c/.cpp as a grader
liangfeng-source
@liangfeng-source
@andreyv the grader is too complex. it contains too many files to be included in a single file.
hacking CMS can be a good idea. Also I found out that they allow to implement "Custom task types". Have you used this?
Andrey Vihrov
@andreyv
@liangfeng-source: You could try to concatenate your files when preparing the batch task. Something like this: cat *.h > grader.h, cat *.cpp > grader.cpp, and then upload grader.h and grader.cpp as graders
liangfeng-source
@liangfeng-source
OK, I will check this.
how about the “Custom task types”
do you think it will work if I implement my own task types?
Andrey Vihrov
@andreyv
Yes, you could also create a custom task type. Copy cms/grading/tasktypes/Batch.py, modify it as needed (look for GRADER_BASENAME, you need to allow the .o extension) and register it in setup.py. I don't know if it would work, e.g., you also need to ensure that the user source comes before your library in the language compilation command. Also there is a problem that .o is not discernible if you have multiple programming languages enabled.
In general, this would be a "hack"
liangfeng-source
@liangfeng-source
I only need to support C
liangfeng-source
@liangfeng-source
@andreyv thank you, Andrey, I will try it first.
Edoardo Morassutto
@edomora97

Hi all!
Here in Italy we are about to have some new contests (including a practice round spanning few days). Keeping the admin page open all the time is not really feasible so I implemented a suuuuper simple Telegram bot that sends notifications when a new question arrives.
Before opening a PR I'd like to test it a bit more (next Monday we have an online contest on which we plan to use it). If you have any suggestions or comments you can find the source in my fork:

edomora97/cms@20273fa

Edoardo Morassutto
@edomora97

Now I'm working on a Prometheus exporter for building some interesting Grafana dashboards.
I'm thinking about opening a PR also for that, hoping not to be the only one with this interest!

About which metrics to include I'm still not sure, if you have any suggestions I'm very open to them!