beat.web.experiments.models package

Module contents

class beat.web.experiments.models.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
class beat.web.experiments.models.BlockInput(id, block, cache, database, channel)[source]

Bases: django.db.models.base.Model

block

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.

cache

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.

database

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.

channel

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_input.BlockInputManager object>
natural_key()[source]
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

block_id
cache_id
database_id
id

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

class beat.web.experiments.models.CachedFile(id, hash, status, linear_execution_time, speed_up_real, speed_up_maximal, queuing_time, stdout, stderr, error_report, cpu_time, max_memory, data_read_size, data_read_nb_blocks, data_read_time, data_written_size, data_written_nb_blocks, data_written_time)[source]

Bases: django.db.models.base.Model

NOT_CACHED = 'N'
PROCESSING = 'P'
CACHED = 'C'
STATUS = (('N', 'Not cached'), ('P', 'Processing'), ('C', 'Cached'))
blocks

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.

hash

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.

linear_execution_time

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

speed_up_real

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

speed_up_maximal

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

queuing_time

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

stdout

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

stderr

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

error_report

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

cpu_time

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

max_memory

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

data_read_size

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

data_read_nb_blocks

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

data_read_time

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

data_written_size

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

data_written_nb_blocks

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

data_written_time

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.cached_file.CachedFileManager object>
natural_key()[source]
path()[source]

Returns the full path prefix to the cached file on disk

absolute_path(cache='/scratch/builds/iJyPBhV4/1/beat/beat.web/doc/api/prefix/cache')[source]

Returns the full path prefix to the cached file on disk

files(cache='/scratch/builds/iJyPBhV4/1/beat/beat.web/doc/api/prefix/cache')[source]

Checks if any file belonging to this cache exist on disk

update(block_status)[source]
exists(cache='/scratch/builds/iJyPBhV4/1/beat/beat.web/doc/api/prefix/cache')[source]

Checks if any file belonging to this cache exist on disk

check_checksums(cache='/scratch/builds/iJyPBhV4/1/beat/beat.web/doc/api/prefix/cache')[source]

Checks if the cached files checksum properly

delete_files(cache='/scratch/builds/iJyPBhV4/1/beat/beat.web/doc/api/prefix/cache')[source]

Delete the files contained in this cache

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

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.

results

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.

class beat.web.experiments.models.DeclarationStorage(*args, **kwargs)[source]

Bases: beat.web.common.storage.OverwriteStorage

class beat.web.experiments.models.Experiment(id, sharing, author, toolchain, name, short_description, status, creation_date, start_date, end_date, declaration_file, description_file, hash)[source]

Bases: beat.web.common.models.Shareable

PENDING = 'P'
SCHEDULED = 'S'
RUNNING = 'R'
DONE = 'D'
FAILED = 'F'
CANCELLING = 'C'
STATUS = (('P', 'Pending'), ('S', 'Scheduled'), ('R', 'Running'), ('D', 'Done'), ('F', 'Failed'), ('C', 'Canceling'))
author

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.

toolchain

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.

short_description

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.

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.

declaration_file

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
description_file

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
hash

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

referenced_datasets

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.

referenced_algorithms

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.

objects = <beat.web.experiments.models.experiment.ExperimentManager object>
natural_key()[source]
fullname()[source]
hashed_path(extension='')[source]

Relative path of a file belonging to the object on the respective storage

declaration_filename()[source]

Relative path of the declaration file on the storage

description_filename()[source]

Relative path of the description file on the storage

has_attestation()[source]
classmethod from_db(db, field_names, values)[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.

email()[source]

e-mails owners and shared parties about this experiment status

share(users=None, teams=None, algorithms_infos={})[source]
update_blocks()[source]

Updates internal block representation of an experiment

is_busy()[source]
is_done()[source]
is_running()[source]
modifiable()[source]
deletable()[source]
core()[source]
job_splits(status=None)[source]
get_absolute_url()[source]
get_api_share_url()[source]
get_api_update_url()[source]
get_admin_change_url()[source]
completion()[source]
all_needed_dataformats()[source]
reset()[source]

Resets an experiment so it can be run again

databases_and_protocols()[source]

A set of all used database/protocol combinations for all datasets

analyzers()[source]

A list of all used analyzers

property description
property declaration
property declaration_string
schedule()[source]

Schedules this experiment for execution at the backend

cancel()[source]

Cancels the execution of this experiment on the backend.

fork(username=None, name=None)[source]

Forks this experiment under a new username or name

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

action_object_actions

Accessor to the related objects manager on the one-to-many relation created by GenericRelation.

In the example:

class Post(Model):
    comments = GenericRelation(Comment)

post.comments is a ReverseGenericManyToOneDescriptor instance.

actor_actions

Accessor to the related objects manager on the one-to-many relation created by GenericRelation.

In the example:

class Post(Model):
    comments = GenericRelation(Comment)

post.comments is a ReverseGenericManyToOneDescriptor instance.

attestation

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.

author_id
blocks

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.

get_sharing_display(*, field=<django.db.models.fields.CharField: sharing>)
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.

leaderboards

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.

rank_set

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.

reports

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.

shared_with

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.

shared_with_team

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.

target_actions

Accessor to the related objects manager on the one-to-many relation created by GenericRelation.

In the example:

class Post(Model):
    comments = GenericRelation(Comment)

post.comments is a ReverseGenericManyToOneDescriptor instance.

toolchain_id
beat.web.experiments.models.validate_experiment(experiment_info, toolchain_info, user=None)[source]

Makes sure the experiment can be run

class beat.web.experiments.models.Result(id, cache, name, type, primary, data_value)[source]

Bases: django.db.models.base.Model

SIMPLE_TYPE_NAMES = ('int32', 'float32', 'bool', 'string')
cache

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.

type

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

primary

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

data_value

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.result.ResultManager object>
natural_key()[source]
value()[source]
is_chart()[source]
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

cache_id
id

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

rank_set

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.