mirror of
https://github.com/InternLM/InternBootcamp.git
synced 2026-04-19 12:58:04 +00:00
fix rdkit version
This commit is contained in:
parent
f4913c6f02
commit
bd2933d3a5
5 changed files with 16 additions and 16 deletions
|
|
@ -21,7 +21,7 @@ class SMILES2logPbootcamp(InChI2logPbootcamp):
|
|||
生成一组数字和目标值。
|
||||
"""
|
||||
self.SMILESGenerator = SMILESGenerator(min_len=self.min_len, max_len=self.max_len, seed=None)
|
||||
return self.SMILESGenerator.generate_n_valid_smiles(10)[random.randint(0, 9)]
|
||||
return self.SMILESGenerator.generate_n_valid_smiles(1)[0]
|
||||
|
||||
def prompt_func(self, SMILES) -> str:
|
||||
|
||||
|
|
@ -63,5 +63,5 @@ class SMILES2logPbootcamp(InChI2logPbootcamp):
|
|||
return 0.0 # Error is too large, score is 0
|
||||
else:
|
||||
# Linear interpolation: score decreases linearly from 1 to 0 as error goes from 0 to max_relative_error
|
||||
return 1.0
|
||||
# return 1.0
|
||||
return 1 - (relative_error / max_relative_error) * 0.5 ## For RL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue