beat.web.experiments.models.block module¶
-
class
beat.web.experiments.models.block.BlockManager[source]¶ Bases:
django.db.models.manager.Manager
-
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.parentis aForwardManyToOneDescriptorinstance.
-
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.parentis aForwardManyToOneDescriptorinstance.
-
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.parentis aForwardManyToOneDescriptorinstance.
-
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.parentis aForwardManyToOneDescriptorinstance.
-
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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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>¶
-
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.
-
property
results¶
-
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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.childrenis aReverseManyToOneDescriptorinstance.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.restaurantis aReverseOneToOneDescriptorinstance.
-
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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
queue_id¶
-