beat.web.experiments.models.block module

class beat.web.experiments.models.block.BlockManager[source]

Bases: django.db.models.manager.Manager

get_by_natural_key(name, experiment_author, toolchain_author, toolchain_name, toolchain_version, experiment_name)[source]
class beat.web.experiments.models.block.Block(id, experiment, name, command, status, analyzer, algorithm, creation_date, start_date, end_date, environment, queue, required_slots, channel, execution_order)[source]

Bases: django.db.models.base.Model

PENDING = 'N'
PROCESSING = 'P'
DONE = 'C'
FAILED = 'F'
CANCELLED = 'L'
STATUS = (('N', 'Pending'), ('P', 'Processing'), ('C', 'Done'), ('F', 'Failed'), ('L', 'Cancelled'))
experiment

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.

name

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

command

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.

analyzer

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

algorithm

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.

creation_date

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

start_date

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

end_date

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

environment

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.

queue

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.

required_slots

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

channel

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

dependencies

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

execution_order

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

objects = <beat.web.experiments.models.block.BlockManager object>
natural_key()[source]
save(*args, **kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

first_cache()[source]
error_report()[source]
stdout()[source]
stderr()[source]
speed_up_real()[source]
speed_up_maximal()[source]
linear_execution_time()[source]
queuing_time()[source]
cpu_time()[source]
max_memory()[source]
data_read_size()[source]
data_read_nb_blocks()[source]
data_read_time()[source]
data_written_size()[source]
data_written_nb_blocks()[source]
data_written_time()[source]
property results
done()[source]

Says whether the block has finished or not

is_runnable()[source]

Checks if a block is runnable presently

set_canceled(end_date=None)[source]

Update the block state to canceled

Parameters
  • end_date (datetime) – If provided sets the end_date otherwise

  • will be used. (datetime.now()) –

set_failed(end_date)[source]

Update the block state to failed

Parameters

end_date (datetime) – end date on failure

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

algorithm_id
dependents

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

environment_id
experiment_id
get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

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

inputs

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.

job

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

outputs

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

queue_id