Web-Frontend

Models

This is a collection of all required models.

class webapp.models.Dataset(*args, **kwargs)[source]

Represents a dataset object. It contains of multiple DatasetPoints.

class_labels = None

class_id to label map in JSON format.

default_dimensions = None

Default scatter dimensions.

default_visualization = None

Default visualization type.

dimensions = None

Number of dimensions, where -1 means variable.

name = None

Name of the Dataset

nr_classes = None

Number of different classes

nr_test_points = None

Number of test points.

nr_training_points = None

Number of training points.

nr_validation_points = None

Number of validation points.

class webapp.models.DatasetPoint(*args, **kwargs)[source]

A single Point of a dataset.

class_id = None

The class as integer.

coords = None

The coordinates as JSON array

dataset

The related dataset.

point_type = None

This pont is part of which part of the dataset (training, test, validation)?

class webapp.models.DatasetResultPoints(*args, **kwargs)[source]

Best result with points for a given dataset in a specific round.

dataset

The selected Dataset

job

The related job

points = None

The earned Points

round

The round

score = None

The Validation Score

user

User of this result

class webapp.models.Group(*args, **kwargs)[source]

The Group class represents a group of people.

There could be multiple groups. A group could be a lecture, an event or any other user group.

free_to_enter = None

Is it possible for new users to enter this group?

join_url()[source]

Generate the url to join the group.

name = None

The name of the group. Must be unique

url()[source]

Generate the url to the group page.

users

Set of all users, which are actually in this group

class webapp.models.Job(*args, **kwargs)[source]

Jobs are the units create by user to work in a specific round.

algorithm = None

selected algorithm

created = None

Create time of the job.

dataset

Related Dataset

extra_scores_test = None

A dictionary with further scores (just for information) from the test set in JSON notation

extra_scores_validation = None

A dictionary with further scores (just for information) from the validation set in JSON notation.

fetch_params_ts = None

Timestamp when a worker fetches the params.

finished_ts = None

Timestamp when the calculation are finished.

is_selected = None

Is this job marked as a selected result?

labels_test = None

A list of lables for the test set in JSON notation

labels_training = None

A list of lables for the training set in JSON notation

labels_validation = None

A list of labels for the validation set in JSON notation

message = None

A message from the training set. It could contain more information about the training/test.

modified = None

last modified

params = None

Algorithms parameters as JSON dict

round

Related Round

score_test = None

The score of the test set. Should be in the interval [0,1]

score_validation = None

The score of the validation set. Should be in the interval [0,1]

success = None

True if the learning process was successful

user

Owner of the Job

worker

Worker which handles this job.

class webapp.models.JobPicture(*args, **kwargs)[source]

Pictures to illustrate job details

filename = None

Filename of the image

job

Related Job

class webapp.models.Round(*args, **kwargs)[source]

A Round is a single event for a group.

Each group can define multiple rounds.

algorithms = None

Selected algorithms as JSON list.

datasets

All active datasets for this round.

end_time = None

The end of the round. If the end is in the past, this round is closed. If the end is not set, the round will be open.

get_free_jobs(user, dataset_id)[source]

Return the number of open jobs.

Admin user always get the full number of jobs. Failed jobs are ignored.

Parameters:

user : user object

The requesting user

dataset_id : int

The PK of the selected dataset.

get_free_submits(user, dataset_id)[source]

Return the number of open submits.

Admin user always get the full number of submits.

Parameters:

user : user object

The requesting user

dataset_id : int

The PK of the selected dataset.

group

Group assigned to this round

is_active()[source]

Checks if the current round is active.

limit_jobs = None

Number of allowed jobs.

limit_submit = None

Number of submissions.

name = None

Name representation of this round

start_time = None

The start of the round. If the start time is in future or not set, this round is not active

url()[source]

Generate the url to the group page.

class webapp.models.RoundResultPoints(*args, **kwargs)[source]

Round results.

points = None

Sum of points of all datasets.

round

related round

stars = None

Stars / Big Points for this round

user

related user

class webapp.models.Worker(*args, **kwargs)[source]

A worker is the backend host, which does the calculations

hostname = None

Hostname of the worker

jobs_done = None

Number of finished jobs.

last_heartbeat = None

Is used to check if worker is up

last_job = None

Last Job Timestamp, will be used to select worker

Views

This is a collection of all required views for the web frontend.

webapp.views.add_group(request, *args, **kwargs)[source]

Creates a new group.

The Group parameter are read from the request.REQUEST field. So you can use it with POST and GET.

Parameters:

group_name : str

The name of the new group

public : str

Default is public. Private on the values (‘0’, ‘no’, ‘private’, ‘false’)

webapp.views.admin_only(user)[source]

Test function to check if the user is an admin, and allowed to manage things.

webapp.views.edit_round(request, *args, **kwargs)[source]

updates the round parameters.

webapp.views.join_group(request, *args, **kwargs)[source]

Add the current user to the selected group.

Processors

#TODO: add content descriptions

webapp.processors.general_processor(request)[source]

Add some environment settings to the context variable.