genui.generators.extensions.genuidrugex package
Subpackages
- genui.generators.extensions.genuidrugex.genuimodels package
- Submodules
- genui.generators.extensions.genuidrugex.genuimodels.algorithms module
- genui.generators.extensions.genuidrugex.genuimodels.builders module
- genui.generators.extensions.genuidrugex.genuimodels.metrics module
- genui.generators.extensions.genuidrugex.genuimodels.monitors module
- Module contents
- genui.generators.extensions.genuidrugex.migrations package
- Submodules
- genui.generators.extensions.genuidrugex.migrations.0001_initial module
- genui.generators.extensions.genuidrugex.migrations.0002_drugexagenttraining_drugexagentvalidation_and_more module
- genui.generators.extensions.genuidrugex.migrations.0003_drugexenvironment_created_and_more module
- genui.generators.extensions.genuidrugex.migrations.0004_drugexscorer_created_drugexscorer_description_and_more module
- genui.generators.extensions.genuidrugex.migrations.0005_drugex_inputfile_drugex_molset_and_more module
- genui.generators.extensions.genuidrugex.migrations.0006_alter_drugexenvironment_rewardscheme module
- genui.generators.extensions.genuidrugex.migrations.0007_alter_drugexagenttraining_explorer_and_more module
- genui.generators.extensions.genuidrugex.migrations.0008_clippedscore_smooth module
- genui.generators.extensions.genuidrugex.migrations.0009_smoothhump module
- genui.generators.extensions.genuidrugex.migrations.0010_alter_smoothhump_sigma_alter_smoothhump_upper module
- genui.generators.extensions.genuidrugex.migrations.0011_alter_drugexenvironment_rewardscheme module
- genui.generators.extensions.genuidrugex.migrations.0012_drugexenvironmentscores module
- genui.generators.extensions.genuidrugex.migrations.0013_drugexenvironmentscores_modifierson module
- genui.generators.extensions.genuidrugex.migrations.0014_alter_drugexagenttraining_explorer module
- Module contents
Submodules
genui.generators.extensions.genuidrugex.admin module
genui.generators.extensions.genuidrugex.apps module
genui.generators.extensions.genuidrugex.genuisetup module
genuisetup
Created by: Martin Sicho On: 5/3/20, 6:36 PM
genui.generators.extensions.genuidrugex.models module
- class genui.generators.extensions.genuidrugex.models.ClippedScore(id, polymorphic_ctype, name, description, created, updated, project, scoremodifier_ptr, upper, lower, high, low, smooth)[source]
Bases:
ScoreModifier
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- high
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- low
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- lower
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
- scoremodifier_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.
- scoremodifier_ptr_id
- smooth
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- upper
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.generators.extensions.genuidrugex.models.DrugEx(id, polymorphic_ctype, name, description, created, updated, project, generator_ptr, agent, molset, inputFile)[source]
Bases:
Generator
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- agent
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.
- agent_id
- generator_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.
- generator_ptr_id
- get(n_samples)[source]
All generators should override this. This should return a list of SMILES strings of size N.
- Returns
list of SMILES strings
- inputFile
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)
- molset
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.
- molset_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- 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.
- class genui.generators.extensions.genuidrugex.models.DrugExAgent(id, polymorphic_ctype, name, description, created, updated, project, builder, model_ptr, environment, explorationNet, exploitationNet)[source]
Bases:
Model
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- 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 aForwardManyToOneDescriptor
instance.
- environment_id
- exploitationNet
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.
- exploitationNet_id
- explorationNet
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.
- explorationNet_id
- model_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.
- model_ptr_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- 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.
- class genui.generators.extensions.genuidrugex.models.DrugExAgentTraining(id, polymorphic_ctype, algorithm, mode, modelInstance, trainingstrategy_ptr, explorer)[source]
Bases:
TrainingStrategy
- exception DoesNotExist
Bases:
DoesNotExist
- class ExplorerClass(value)[source]
Bases:
TextChoices
An enumeration.
- graph = 'GE'
- smiles = 'SE'
- smiles_molecules = 'SM'
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- explorer
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_explorer_display(*, field=<django.db.models.fields.CharField: explorer>)
- property modelClass
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- trainingstrategy_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.
- trainingstrategy_ptr_id
- class genui.generators.extensions.genuidrugex.models.DrugExAgentValidation(id, polymorphic_ctype, modelInstance, validationstrategy_ptr, validSetSize)[source]
Bases:
ValidationStrategy
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- 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.generators.extensions.genuidrugex.models.DrugExEnvironment(id, polymorphic_ctype, name, description, created, updated, project, rewardScheme)[source]
Bases:
DataSet
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- class RewardScheme(value)[source]
Bases:
TextChoices
An enumeration.
- paretoCrowding = 'PC'
- paretoSimilarity = 'PS'
- weightedSum = 'WS'
- 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.
- drugexEnviron
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)
- get_rewardScheme_display(*, field=<django.db.models.fields.CharField: rewardScheme>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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
- rewardScheme
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- scorers
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.
- scores
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.
- updated
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.generators.extensions.genuidrugex.models.DrugExEnvironmentScores(id, polymorphic_ctype, name, description, created, updated, project, molecules, activityset_ptr, environment, modifiersOn)[source]
Bases:
ActivitySet
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- activityset_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.
- activityset_ptr_id
- 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 aForwardManyToOneDescriptor
instance.
- environment_id
- modifiersOn
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
- 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.
- class genui.generators.extensions.genuidrugex.models.DrugExNet(id, polymorphic_ctype, name, description, created, updated, project, builder, model_ptr, molset, parent)[source]
Bases:
Model
- CORPUS_FILE_TRAIN_NOTE = 'drugex_corpus_train'
- CORPUS_FILE_VALID_NOTE = 'drugex_corpus_test'
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- VOC_FILE_NOTE = 'drugex_voc'
- property corpusFileTest
- property corpusFileTrain
- property corpusTest
- property corpusTrain
- drugexExploit
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.
- drugexExplore
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.
- drugexnet_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.
- model_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.
- model_ptr_id
- molset
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.
- molset_id
- parent
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.
- parent_id
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- 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.
- property vocFile
- class genui.generators.extensions.genuidrugex.models.DrugExNetTraining(id, polymorphic_ctype, algorithm, mode, modelInstance, trainingstrategy_ptr, modelClass, inputType)[source]
Bases:
TrainingStrategy
- exception DoesNotExist
Bases:
DoesNotExist
- class ModelClass(value)[source]
Bases:
TextChoices
An enumeration.
- graphTrans = 'GT'
- smilesRNNSingle = 'SS'
- smilesTrans = 'ST'
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- class StructureInputType(value)[source]
Bases:
TextChoices
An enumeration.
- frags = 'FS'
- molecules = 'MS'
- get_inputType_display(*, field=<django.db.models.fields.CharField: inputType>)
- get_modelClass_display(*, field=<django.db.models.fields.CharField: modelClass>)
- inputType
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modelClass
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
- trainingstrategy_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.
- trainingstrategy_ptr_id
- class genui.generators.extensions.genuidrugex.models.DrugExNetValidation(id, polymorphic_ctype, modelInstance, validationstrategy_ptr, validSetSize)[source]
Bases:
ValidationStrategy
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- 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.generators.extensions.genuidrugex.models.DrugExScorer(id, polymorphic_ctype, name, description, created, updated, project, environment, modifier, method, threshold)[source]
Bases:
DataSet
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- 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.
- 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 aForwardManyToOneDescriptor
instance.
- environment_id
- 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.
- method
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.
- method_id
- modifier
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.
- modifier_id
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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
- threshold
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.generators.extensions.genuidrugex.models.GenUIModelScorer(id, polymorphic_ctype, name, description, created, updated, project, scoringmethod_ptr, model)[source]
Bases:
ScoringMethod
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- 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
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- scoringmethod_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.
- scoringmethod_ptr_id
- class genui.generators.extensions.genuidrugex.models.ModelPerformanceDrugEx(id, polymorphic_ctype, metric, value, model, modelperformance_ptr, epoch, step, modelperfomancenn_ptr, isOnValidationSet, note)[source]
Bases:
ModelPerfomanceNN
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- isOnValidationSet
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modelperfomancenn_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.
- modelperfomancenn_ptr_id
- note
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
- class genui.generators.extensions.genuidrugex.models.PropertyScorer(id, polymorphic_ctype, name, description, created, updated, project, scoringmethod_ptr, prop)[source]
Bases:
ScoringMethod
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- get_prop_display(*, field=<django.db.models.fields.CharField: prop>)
- polymorphic_primary_key_name = 'id'
- polymorphic_super_sub_accessors_replaced = False
- prop
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- scoringmethod_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.
- scoringmethod_ptr_id
- class genui.generators.extensions.genuidrugex.models.ScoreModifier(id, polymorphic_ctype, name, description, created, updated, project)[source]
Bases:
DataSet
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- clippedscore
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.
- 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.
- drugexscorer_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.
- 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.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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
- smoothhump
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.
- updated
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.generators.extensions.genuidrugex.models.ScoringMethod(id, polymorphic_ctype, name, description, created, updated, project)[source]
Bases:
DataSet
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- 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.
- drugexscorer_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.
- genuimodelscorer
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.
- 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.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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
- propertyscorer
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.
- updated
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class genui.generators.extensions.genuidrugex.models.SmoothHump(id, polymorphic_ctype, name, description, created, updated, project, scoremodifier_ptr, upper, lower, sigma)[source]
Bases:
ScoreModifier
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- lower
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
- scoremodifier_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.
- scoremodifier_ptr_id
- sigma
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- upper
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
genui.generators.extensions.genuidrugex.serializers module
serializers
Created by: Martin Sicho On: 5/3/20, 6:43 PM
- class genui.generators.extensions.genuidrugex.serializers.ClippedSerializer(*args, **kwargs)[source]
Bases:
ModifierSerializer
- class genui.generators.extensions.genuidrugex.serializers.DrugExAgentInitSerializer(*args, **kwargs)[source]
Bases:
DrugExAgentSerializer
- class Meta[source]
Bases:
object
- fields = ['id', 'name', 'description', 'created', 'updated', 'project', 'trainingStrategy', 'validationStrategy', 'modelFile', 'build', 'taskID', 'environment', 'explorationNet', 'exploitationNet']
- model
alias of
DrugExAgent
- 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.
- class genui.generators.extensions.genuidrugex.serializers.DrugExAgentSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
- class Meta[source]
Bases:
object
- fields = ['id', 'name', 'description', 'created', 'updated', 'project', 'trainingStrategy', 'validationStrategy', 'modelFile', 'build', 'taskID', 'environment', 'explorationNet', 'exploitationNet']
- model
alias of
DrugExAgent
- read_only_fields = ['id', 'created', 'updated', 'modelFile', 'taskID']
- class genui.generators.extensions.genuidrugex.serializers.DrugExAgentTrainingStrategyInitSerializer(*args, **kwargs)[source]
- class genui.generators.extensions.genuidrugex.serializers.DrugExAgentTrainingStrategySerializer(*args, **kwargs)[source]
Bases:
TrainingStrategySerializer
- class genui.generators.extensions.genuidrugex.serializers.DrugExAgentValidationStrategyInitSerializer(*args, **kwargs)[source]
- class genui.generators.extensions.genuidrugex.serializers.DrugExAgentValidationStrategySerializer(*args, **kwargs)[source]
Bases:
ValidationStrategySerializer
- class genui.generators.extensions.genuidrugex.serializers.DrugExEnvironmentCalculationSerializer(*args, **kwargs)[source]
Bases:
Serializer
- class genui.generators.extensions.genuidrugex.serializers.DrugExEnvironmentSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.generators.extensions.genuidrugex.serializers.DrugExGeneratorSerializer(*args, **kwargs)[source]
Bases:
GeneratorSerializer
- class genui.generators.extensions.genuidrugex.serializers.DrugExNetInitSerializer(*args, **kwargs)[source]
Bases:
DrugExNetSerializer
- class Meta[source]
Bases:
object
- fields = ['id', 'name', 'description', 'created', 'updated', 'project', 'trainingStrategy', 'validationStrategy', 'modelFile', 'build', 'taskID', 'molset', 'parent']
- 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.
- class genui.generators.extensions.genuidrugex.serializers.DrugExNetSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
- class genui.generators.extensions.genuidrugex.serializers.DrugExScorerSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.generators.extensions.genuidrugex.serializers.DrugExTrainingStrategyInitSerializer(*args, **kwargs)[source]
- class genui.generators.extensions.genuidrugex.serializers.DrugExTrainingStrategySerializer(*args, **kwargs)[source]
Bases:
TrainingStrategySerializer
- class genui.generators.extensions.genuidrugex.serializers.DrugExValidationStrategyInitSerializer(*args, **kwargs)[source]
- class genui.generators.extensions.genuidrugex.serializers.DrugExValidationStrategySerializer(*args, **kwargs)[source]
Bases:
ValidationStrategySerializer
- class genui.generators.extensions.genuidrugex.serializers.ModifierSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.generators.extensions.genuidrugex.serializers.ModifierTestSerializer(*args, **kwargs)[source]
Bases:
Serializer
- class genui.generators.extensions.genuidrugex.serializers.PropertyScorerSerializer(*args, **kwargs)[source]
Bases:
ScoringFunctionSerializer
- class genui.generators.extensions.genuidrugex.serializers.QSARScorerSerializer(*args, **kwargs)[source]
Bases:
ScoringFunctionSerializer
- class genui.generators.extensions.genuidrugex.serializers.ScoringFunctionSerializer(*args, **kwargs)[source]
Bases:
HyperlinkedModelSerializer
- class genui.generators.extensions.genuidrugex.serializers.SmoothHumpSerializer(*args, **kwargs)[source]
Bases:
ModifierSerializer
genui.generators.extensions.genuidrugex.tasks module
tasks
Created by: Martin Sicho On: 28-01-20, 13:52
genui.generators.extensions.genuidrugex.tests module
- class genui.generators.extensions.genuidrugex.tests.DrugExFromFileTestCase(methodName='runTest')[source]
Bases:
SetUpDrugExGeneratorsMixIn
,APITestCase
- class genui.generators.extensions.genuidrugex.tests.DrugExGeneratorInitTestCase(methodName='runTest')[source]
Bases:
SetUpDrugExGeneratorsMixIn
,APITestCase
- class genui.generators.extensions.genuidrugex.tests.SetUpDrugExGeneratorsMixIn[source]
Bases:
QSARModelInit
- class genui.generators.extensions.genuidrugex.tests.UseDefaultNetTestCase(methodName='runTest')[source]
Bases:
SetUpDrugExGeneratorsMixIn
,APITestCase
genui.generators.extensions.genuidrugex.torchutils module
torchutils
Created by: Martin Sicho On: 6/2/20, 9:13 AM
- genui.generators.extensions.genuidrugex.torchutils.dump_tensors(gpu_only=True)[source]
Prints a list of the Tensors being tracked by the garbage collector.
By user machinethink: https://forums.fast.ai/t/gpu-memory-not-being-freed-after-training-is-over/10265/7
- genui.generators.extensions.genuidrugex.torchutils.pretty_size(size)[source]
Pretty prints a torch.Size object
By user machinethink: https://forums.fast.ai/t/gpu-memory-not-being-freed-after-training-is-over/10265/7
genui.generators.extensions.genuidrugex.urls module
urls
Created by: Martin Sicho On: 5/3/20, 6:51 PM
genui.generators.extensions.genuidrugex.views module
- class genui.generators.extensions.genuidrugex.views.ClippedViewSet(**kwargs)[source]
Bases:
ModifierViewSet
- basename = None
- description = None
- detail = None
- name = None
- queryset
- serializer_class
alias of
ClippedSerializer
- suffix = None
- class genui.generators.extensions.genuidrugex.views.DrugExAgentViewSet(**kwargs)[source]
Bases:
ModelViewSet
- basename = None
- build_task = <@task: BuildDrugExModel of genui>
- builder_class
alias of
DrugExAgentBuilder
- description = None
- detail = None
- init_serializer_class
alias of
DrugExAgentInitSerializer
- name = None
- queryset
- serializer_class
alias of
DrugExAgentSerializer
- suffix = None
- class genui.generators.extensions.genuidrugex.views.DrugExNetViewSet(**kwargs)[source]
Bases:
ModelViewSet
- basename = None
- build_task = <@task: BuildDrugExModel of genui>
- builder_class
alias of
DrugExNetBuilder
- description = None
- detail = None
- init_serializer_class
alias of
DrugExNetInitSerializer
- name = None
- queryset
- serializer_class
alias of
DrugExNetSerializer
- suffix = None
- class genui.generators.extensions.genuidrugex.views.EnvironmentViewSet(**kwargs)[source]
Bases:
FilterToProjectMixIn
,FilterToUserMixIn
,ModelViewSet
- basename = None
- calculation_serializer_class
- description = None
- detail = None
- get_serializer_class()[source]
Return the class to use for the serializer. Defaults to using
self.serializer_class
.You may want to override this if you need to provide different serializations depending on the incoming request.
(Eg. admins get full serialization, others get basic serialization)
- name = None
- owner_relation = 'project__owner'
- queryset
- serializer_class
alias of
DrugExEnvironmentSerializer
- suffix = None
- class genui.generators.extensions.genuidrugex.views.GeneratorViewSet(**kwargs)[source]
Bases:
FilterToProjectMixIn
,FilterToUserMixIn
,ModelViewSet
- basename = None
- description = None
- detail = None
- name = None
- owner_relation = 'project__owner'
- queryset
- serializer_class
alias of
DrugExGeneratorSerializer
- suffix = None
- class genui.generators.extensions.genuidrugex.views.HumpViewSet(**kwargs)[source]
Bases:
ModifierViewSet
- basename = None
- description = None
- detail = None
- name = None
- queryset
- serializer_class
alias of
SmoothHumpSerializer
- suffix = None
- class genui.generators.extensions.genuidrugex.views.ModifierViewSet(**kwargs)[source]
Bases:
FilterToProjectMixIn
,FilterToUserMixIn
,ModelViewSet
- basename = None
- description = None
- detail = None
- get_serializer_class()[source]
Return the class to use for the serializer. Defaults to using
self.serializer_class
.You may want to override this if you need to provide different serializations depending on the incoming request.
(Eg. admins get full serialization, others get basic serialization)
- name = None
- owner_relation = 'project__owner'
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]
- queryset
- serializer_class
alias of
ModifierSerializer
- suffix = None
- test_serializer_class
alias of
ModifierTestSerializer
- class genui.generators.extensions.genuidrugex.views.PropertyScorerViewSet(**kwargs)[source]
Bases:
ScoringMethodViewSet
- basename = None
- description = None
- detail = None
- name = None
- queryset
- serializer_class
alias of
PropertyScorerSerializer
- suffix = None
- class genui.generators.extensions.genuidrugex.views.QSARScorerViewSet(**kwargs)[source]
Bases:
ScoringMethodViewSet
- basename = None
- description = None
- detail = None
- name = None
- queryset
- serializer_class
alias of
QSARScorerSerializer
- suffix = None
- class genui.generators.extensions.genuidrugex.views.ScorerViewSet(**kwargs)[source]
Bases:
FilterToProjectMixIn
,FilterToUserMixIn
,ModelViewSet
- basename = None
- description = None
- detail = None
- name = None
- owner_relation = 'project__owner'
- queryset
- serializer_class
alias of
DrugExScorerSerializer
- suffix = None
- class genui.generators.extensions.genuidrugex.views.ScoringMethodViewSet(**kwargs)[source]
Bases:
FilterToProjectMixIn
,FilterToUserMixIn
,ModelViewSet
- basename = None
- description = None
- detail = None
- name = None
- owner_relation = 'project__owner'
- queryset
- serializer_class
alias of
ScoringFunctionSerializer
- suffix = None