beat.web.experiments.models.experiment module

beat.web.experiments.models.experiment.validate_environments(experiment, user=None)[source]

Validates the environments throughout the experiment

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

Makes sure the experiment can be run

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

Bases: beat.web.common.storage.OverwriteStorage

class beat.web.experiments.models.experiment.ExperimentManager[source]

Bases: beat.web.common.models.ContributionManager

get_by_natural_key(author_username, toolchain_username, toolchain_name, toolchain_version, name)[source]
from_author(user, author_name, add_public=False)[source]
from_author_and_public(user, author_name)[source]
create_experiment(author, toolchain, name, declaration, short_description='', description='')[source]

Creates a new experiment in pending state

class beat.web.experiments.models.experiment.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. Returns a FieldFile when accessed so you can do stuff like:

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

Assigns a file object on assignment so you can do:

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

The descriptor for the file attribute on the model instance. Returns a FieldFile when accessed so you can do stuff like:

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

Assigns a file object on assignment so you can do:

>>> with open('/path/to/hello.world', 'r') 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]

Saves 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

description
declaration
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

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

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(**morekwargs)
get_status_display(**morekwargs)
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

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