src.jobs package

Subpackages

Submodules

src.jobs.admin module

src.jobs.apps module

class src.jobs.apps.JobsConfig(app_name, app_module)

Bases: django.apps.config.AppConfig

name = 'src.jobs'

src.jobs.job_creator module

src.jobs.job_creator.generate(split, payload)
src.jobs.job_creator.generate_labelling(split, payload)
src.jobs.job_creator.get_prediction_method_config(predictive_model, prediction_method, payload)
src.jobs.job_creator.update(split, payload, generation_type='classification')

src.jobs.json_renderer module

class src.jobs.json_renderer.CustomJSONEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)

Bases: rest_framework.utils.encoders.JSONEncoder

iterencode(o, _one_shot=False)

Encode the given object and yield each string representation as available.

For example:

for chunk in JSONEncoder().iterencode(bigobject):
    mysocket.write(chunk)
class src.jobs.json_renderer.PalJSONRenderer

Bases: rest_framework.renderers.JSONRenderer

encoder_class

alias of CustomJSONEncoder

src.jobs.models module

class src.jobs.models.Job(id, created_date, modified_date, error, status, type, create_models, split, encoding, labelling, clustering, predictive_model, evaluation, hyperparameter_optimizer, incremental_train)

Bases: src.common.models.CommonModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

base_model

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

clustering

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

clustering_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

create_models

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

encoding

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

encoding_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

error

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

evaluation

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

evaluation_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=True, **kwargs)
get_next_by_modified_date(*, field=<django.db.models.fields.DateTimeField: modified_date>, is_next=True, **kwargs)
get_previous_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=False, **kwargs)
get_previous_by_modified_date(*, field=<django.db.models.fields.DateTimeField: modified_date>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
get_type_display(*, field=<django.db.models.fields.CharField: type>)
hyperparameter_optimizer

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

hyperparameter_optimizer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

incremental_train

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

incremental_train_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

labelling

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

labelling_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

modified_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
predictive_model

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

predictive_model_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

split

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

split_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

to_dict()
Return type:dict
type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class src.jobs.models.JobStatuses

Bases: enum.Enum

An enumeration.

COMPLETED = 'completed'
CREATED = 'created'
ERROR = 'error'
RUNNING = 'running'
class src.jobs.models.JobTypes

Bases: enum.Enum

An enumeration.

LABELLING = 'labelling'
PREDICTION = 'prediction'
UPDATE = 'update'
class src.jobs.models.ModelType

Bases: enum.Enum

An enumeration.

CLASSIFIER = 'classification'
CLUSTERER = 'clusterer'
REGRESSOR = 'regression'
TIME_SERIES_PREDICTOR = 'time_series_prediction'

src.jobs.serializers module

class src.jobs.serializers.JobSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)

Bases: rest_framework.serializers.ModelSerializer

class Meta

Bases: object

fields = ('id', 'created_date', 'modified_date', 'error', 'status', 'type', 'config')
model

alias of src.jobs.models.Job

get_config(job)

src.jobs.tasks module

src.jobs.urls module

src.jobs.views module

src.jobs.ws_publisher module

src.jobs.ws_publisher.publish(object)

Publish an object to websocket listeners :param object: A Django predictive_model :return: {type: object class name, data: OBJECT}

Module contents