saicharan2804 commited on
Commit
389f170
·
1 Parent(s): cad7bde

Removed some metrics

Browse files
Files changed (1) hide show
  1. molgenevalmetric.py +5 -1
molgenevalmetric.py CHANGED
@@ -78,11 +78,14 @@ class molgenevalmetric(evaluate.Metric):
78
  )
79
 
80
  def _compute(self, generated_smiles, train_smiles = None):
81
-
82
  Results = metrics.get_all_metrics(gen = generated_smiles, train= train_smiles)
83
 
 
 
84
  evaluator = Evaluator(name = 'KL_Divergence')
85
  KL_Divergence = evaluator(generated_smiles, train_smiles)
 
86
  Results.update({
87
  "KL_Divergence": KL_Divergence,
88
  })
@@ -112,3 +115,4 @@ class molgenevalmetric(evaluate.Metric):
112
  Results.pop(key, None)
113
 
114
  return {"results": Results}
 
 
78
  )
79
 
80
  def _compute(self, generated_smiles, train_smiles = None):
81
+
82
  Results = metrics.get_all_metrics(gen = generated_smiles, train= train_smiles)
83
 
84
+ generated_smiles = [s for s in generated_smiles if s != '']
85
+
86
  evaluator = Evaluator(name = 'KL_Divergence')
87
  KL_Divergence = evaluator(generated_smiles, train_smiles)
88
+
89
  Results.update({
90
  "KL_Divergence": KL_Divergence,
91
  })
 
115
  Results.pop(key, None)
116
 
117
  return {"results": Results}
118
+