genui.models package
Subpackages
- genui.models.extensions package
- genui.models.genuimodels package
- Submodules
- genui.models.genuimodels.algorithms module
- genui.models.genuimodels.bases module
Algorithm
Algorithm.CLASSIFICATION
Algorithm.GENERATOR
Algorithm.MAP
Algorithm.REGRESSION
Algorithm.attachModesToModel()
Algorithm.attachToInstance()
Algorithm.builder
Algorithm.deserialize()
Algorithm.django_file_formats
Algorithm.django_model
Algorithm.django_modes
Algorithm.django_parameters
Algorithm.fit()
Algorithm.getDeserializer()
Algorithm.getDjangoModel()
Algorithm.getFileFormats()
Algorithm.getModes()
Algorithm.getParams()
Algorithm.getSerializer()
Algorithm.model
Algorithm.name
Algorithm.parameters
Algorithm.predict()
Algorithm.serialize()
CompleteBuilder
ModelBuilder
PredictionMixIn
ProgressMixIn
ValidationMetric
ValidationMixIn
- genui.models.genuimodels.builders module
- genui.models.genuimodels.metrics module
- Module contents
- genui.models.migrations package
- Submodules
- genui.models.migrations.0001_initial module
- genui.models.migrations.0002_auto_20200505_0727 module
- genui.models.migrations.0003_roccurvepoint module
- genui.models.migrations.0004_algorithm_corepackage module
- genui.models.migrations.0005_auto_20210108_1130 module
- genui.models.migrations.0006_alter_model_polymorphic_ctype_and_more module
- Module contents
Submodules
genui.models.admin module
genui.models.apps module
genui.models.genuisetup module
genuisetup
Created by: Martin Sicho On: 4/28/20, 4:43 PM
genui.models.helpers module
helpers
Created by: Martin Sicho On: 30-01-20, 13:29
genui.models.models module
- class genui.models.models.Algorithm(id, corePackage, name)[source]
Bases:
ImportableModelComponent
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- corePackage
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- fileFormats
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- metrics
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name
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>
- parameters
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- trainingstrategy_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- validModes
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class genui.models.models.AlgorithmMode(id, name)[source]
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- algorithm_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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- metrics
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name
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>
- trainingstrategy_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class genui.models.models.BasicValidationStrategy(id, polymorphic_ctype, modelInstance, validationstrategy_ptr, cvFolds, validSetSize)[source]
Bases:
ValidationSet
,CV
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- cvFolds
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- validSetSize
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- validationstrategy_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- validationstrategy_ptr_id
- class genui.models.models.CV(*args, **kwargs)[source]
Bases:
ValidationStrategy
- cvFolds
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- validationstrategy_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- validationstrategy_ptr_id
- class genui.models.models.ImportableModelComponent(*args, **kwargs)[source]
Bases:
Model
- corePackage
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.models.models.Model(id, polymorphic_ctype, name, description, created, updated, project, builder)[source]
Bases:
TaskShortcutsMixIn
,TaskMixin
,DataSet
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- builder
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 aForwardManyToOneDescriptor
instance.
- builder_id
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- drugexagent
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 aReverseOneToOneDescriptor
instance.
- drugexnet
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 aReverseOneToOneDescriptor
instance.
- files
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- generator
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
- get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- map
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 aReverseOneToOneDescriptor
instance.
- property modelFile
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <genui.utils.extensions.tasks.models.PolymorphicTaskManager object>
- onFileSave(saved: ModelFile)[source]
This will be called when a file is being saved to this model instance. You can throw the ModelFile.Rejected exception if the file is invalid.
- Parameters
saved –
- Returns
- performance
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- polymorphic_ctype
The model field that stores the
ContentType
reference to the actual class.
- polymorphic_ctype_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- project
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 aForwardManyToOneDescriptor
instance.
- project_id
- qsarmodel
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 aReverseOneToOneDescriptor
instance.
- tasks
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.
- trainingStrategies
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property trainingStrategy
- updated
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- validationStrategies
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property validationStrategy
- class genui.models.models.ModelBuilder(id, corePackage, name)[source]
Bases:
ImportableModelComponent
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- corePackage
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.
- model_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name
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>
- class genui.models.models.ModelFile(id, modelInstance, kind, note, format, file)[source]
Bases:
Model
- AUXILIARY = 'aux'
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- KINDS = [('main', 'Main'), ('aux', 'Auxiliary')]
- MAIN = 'main'
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- 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)
- format
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 aForwardManyToOneDescriptor
instance.
- format_id
- get_kind_display(*, field=<django.db.models.fields.CharField: kind>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- kind
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modelInstance
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 aForwardManyToOneDescriptor
instance.
- modelInstance_id
- note
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>
- property path
- class genui.models.models.ModelFileFormat(id, fileExtension, description)[source]
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- algorithm_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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- description
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- fileExtension
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.
- modelfile_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>
- class genui.models.models.ModelParameter(id, name, algorithm, contentType, defaultValue)[source]
Bases:
Model
- BOOL = 'bool'
- CONTENT_TYPES = [('string', 'String'), ('bool', 'Logical'), ('integer', 'Integer'), ('float', 'Float')]
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- FLOAT = 'float'
- INTEGER = 'integer'
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- STRING = 'string'
- 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 aForwardManyToOneDescriptor
instance.
- algorithm_id
- contentType
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- defaultValue
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 aForwardManyToOneDescriptor
instance.
- defaultValue_id
- get_contentType_display(*, field=<django.db.models.fields.CharField: contentType>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modelparametervalue_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name
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>
- class genui.models.models.ModelParameterBool(id, polymorphic_ctype, parameter, strategy, modelparametervalue_ptr, value)[source]
Bases:
ModelParameterValue
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- modelparametervalue_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- modelparametervalue_ptr_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- value
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.models.models.ModelParameterFloat(id, polymorphic_ctype, parameter, strategy, modelparametervalue_ptr, value)[source]
Bases:
ModelParameterValue
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- modelparametervalue_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- modelparametervalue_ptr_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- value
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.models.models.ModelParameterInt(id, polymorphic_ctype, parameter, strategy, modelparametervalue_ptr, value)[source]
Bases:
ModelParameterValue
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- modelparametervalue_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- modelparametervalue_ptr_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- value
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.models.models.ModelParameterStr(id, polymorphic_ctype, parameter, strategy, modelparametervalue_ptr, value)[source]
Bases:
ModelParameterValue
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- modelparametervalue_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- modelparametervalue_ptr_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- value
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.models.models.ModelParameterValue(id, polymorphic_ctype, parameter, strategy)[source]
Bases:
PolymorphicModel
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modelparameter_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- modelparameterbool
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 aReverseOneToOneDescriptor
instance.
- modelparameterfloat
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 aReverseOneToOneDescriptor
instance.
- modelparameterint
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 aReverseOneToOneDescriptor
instance.
- modelparameterstr
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 aReverseOneToOneDescriptor
instance.
- parameter
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 aForwardManyToOneDescriptor
instance.
- parameter_id
- polymorphic_ctype
The model field that stores the
ContentType
reference to the actual class.
- polymorphic_ctype_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- strategy
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 aForwardManyToOneDescriptor
instance.
- strategy_id
- class genui.models.models.ModelPerfomanceNN(id, polymorphic_ctype, metric, value, model, modelperformance_ptr, epoch, step)[source]
Bases:
ModelPerformance
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- epoch
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modelperformance_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- modelperformance_ptr_id
- modelperformancedrugex
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 aReverseOneToOneDescriptor
instance.
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- step
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.models.models.ModelPerformance(id, polymorphic_ctype, metric, value, model)[source]
Bases:
PolymorphicModel
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- metric
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 aForwardManyToOneDescriptor
instance.
- metric_id
- 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 aForwardManyToOneDescriptor
instance.
- model_id
- modelperfomancenn
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 aReverseOneToOneDescriptor
instance.
- modelperformancecv
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 aReverseOneToOneDescriptor
instance.
- points
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- polymorphic_ctype
The model field that stores the
ContentType
reference to the actual class.
- polymorphic_ctype_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- roccurvepoint
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 aReverseOneToOneDescriptor
instance.
- value
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.models.models.ModelPerformanceCV(id, polymorphic_ctype, metric, value, model, modelperformance_ptr, fold)[source]
Bases:
ModelPerformance
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- fold
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modelperformance_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- modelperformance_ptr_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- class genui.models.models.ModelPerformanceMetric(id, corePackage, name, description)[source]
Bases:
ImportableModelComponent
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- corePackage
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description
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.
- modelperformance_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name
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>
- validAlgorithms
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- validModes
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- validationstrategy_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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class genui.models.models.ROCCurvePoint(id, polymorphic_ctype, metric, value, model, modelperformance_ptr, fpr, auc)[source]
Bases:
ModelPerformance
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- auc
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 aForwardManyToOneDescriptor
instance.
- auc_id
- fpr
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modelperformance_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- modelperformance_ptr_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- property tpr
- class genui.models.models.TrainingStrategy(id, polymorphic_ctype, algorithm, mode, modelInstance)[source]
Bases:
PolymorphicModel
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- 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 aForwardManyToOneDescriptor
instance.
- algorithm_id
- drugexagenttraining
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 aReverseOneToOneDescriptor
instance.
- drugexnettraining
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 aReverseOneToOneDescriptor
instance.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- mappingstrategy
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 aReverseOneToOneDescriptor
instance.
- mode
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 aForwardManyToOneDescriptor
instance.
- mode_id
- modelInstance
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 aForwardManyToOneDescriptor
instance.
- modelInstance_id
- parameters
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- polymorphic_ctype
The model field that stores the
ContentType
reference to the actual class.
- polymorphic_ctype_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- qsartrainingstrategy
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 aReverseOneToOneDescriptor
instance.
- class genui.models.models.ValidationSet(*args, **kwargs)[source]
Bases:
ValidationStrategy
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- validSetSize
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- validationstrategy_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- validationstrategy_ptr_id
- class genui.models.models.ValidationStrategy(id, polymorphic_ctype, modelInstance)[source]
Bases:
PolymorphicModel
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- basicvalidationstrategy
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 aReverseOneToOneDescriptor
instance.
- drugexagentvalidation
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 aReverseOneToOneDescriptor
instance.
- drugexnetvalidation
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 aReverseOneToOneDescriptor
instance.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- metrics
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- modelInstance
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 aForwardManyToOneDescriptor
instance.
- modelInstance_id
- polymorphic_ctype
The model field that stores the
ContentType
reference to the actual class.
- polymorphic_ctype_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
genui.models.serializers module
serializers
Created by: Martin Sicho On: 24-01-20, 14:44
- class genui.models.serializers.AlgorithmModeSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.models.serializers.AlgorithmSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.models.serializers.BasicValidationStrategyInitSerializer(*args, **kwargs)[source]
Bases:
ValidationStrategySerializer
- class genui.models.serializers.ModelFileFormatSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.models.serializers.ModelFileSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class Meta[source]
Bases:
object
- fields = ('id', 'file', 'format', 'kind', 'model', 'note')
- read_only_fields = ('id', 'format')
- create(validated_data)[source]
We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:
return ExampleModel.objects.create(**validated_data)
If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:
example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance
The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit
.create()
method.
- class genui.models.serializers.ModelParameterSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.models.serializers.ModelParameterValueSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.models.serializers.ModelPerformanceMetricSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.models.serializers.ModelPerformanceSerializer(*args, **kwargs)[source]
Bases:
GenericModelSerializerMixIn
,HyperlinkedModelSerializer
- class genui.models.serializers.ModelSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class Meta[source]
Bases:
object
- fields = ('id', 'name', 'description', 'created', 'updated', 'project', 'trainingStrategy', 'validationStrategy', 'modelFile', 'build', 'taskID')
- read_only_fields = ('id', 'created', 'updated', 'modelFile', 'taskID')
- create(validated_data, **kwargs)[source]
We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:
return ExampleModel.objects.create(**validated_data)
If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:
example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance
The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit
.create()
method.
- static saveParameters(strat_instance: TrainingStrategy, strat_data)[source]
- class genui.models.serializers.TrainingStrategyInitSerializer(*args, **kwargs)[source]
Bases:
TrainingStrategySerializer
- class genui.models.serializers.TrainingStrategySerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.models.serializers.ValidationStrategyInitSerializer(*args, **kwargs)[source]
Bases:
ValidationStrategySerializer
genui.models.signals module
signals
Created by: Martin Sicho On: 17-01-20, 10:13
genui.models.tests module
genui.models.urls module
urls
Created by: Martin Sicho On: 5/3/20, 6:13 PM
genui.models.views module
- class genui.models.views.AlgorithmViewSet(**kwargs)[source]
Bases:
ListModelMixin
,RetrieveModelMixin
,GenericViewSet
- queryset
- serializer_class
alias of
AlgorithmSerializer
- class genui.models.views.BuildMixIn[source]
Bases:
object
- build_task = None
- builder_class = None
- init_serializer_class = None
- class genui.models.views.FilterToModelMixin[source]
Bases:
object
- lookup_field = 'model'
- model_class = None
- class genui.models.views.MetricsViewSet(**kwargs)[source]
Bases:
ListModelMixin
,RetrieveModelMixin
,GenericViewSet
- queryset
- serializer_class
alias of
ModelPerformanceMetricSerializer
- class genui.models.views.ModelFileView(**kwargs)[source]
Bases:
FilterToModelMixin
,FilterToUserMixIn
,ListCreateAPIView
- lookup_field = 'modelInstance'
- owner_relation = 'modelInstance__project__owner'
- parser_classes = (<class 'rest_framework.parsers.MultiPartParser'>,)
- queryset
- serializer_class
alias of
ModelFileSerializer
- class genui.models.views.ModelPerformanceListView(**kwargs)[source]
Bases:
FilterToModelMixin
,FilterToUserMixIn
,ListAPIView
- owner_relation = 'model__project__owner'
- pagination_class
alias of
PerformancePagination
- queryset
- serializer_class
alias of
ModelPerformanceSerializer
- class genui.models.views.ModelViewSet(**kwargs)[source]
Bases:
FilterToProjectMixIn
,FilterToUserMixIn
,BuildMixIn
,ModelViewSet
- owner_relation = 'project__owner'
- project_id_param = {'description': 'ID of a project to limit the list of results to.', 'in': 'query', 'name': 'project_id', 'type': 'number'}
- class genui.models.views.PerformancePagination[source]
Bases:
GenuiPagination
- page_size = 10