I have made the following changes in the model and open PR on it.
(1). Deleted all .dvc folders and files
(2) Update LICENSE file to GNU
(3) Modify src/service.py from predict torunapi and change python {0}/main.py {0}/MODEL_DIR {1} {2} to bash {0}/run.sh {0} {1} {2}
(4) Move MODEL_DIR that contains model file to checkpoints folder
(5) Move molecule_generation folder and main.py to code folder
(6) Add run.sh in framework folder
(7) Initially the number of molecules it is showing in the output is 99 due to this
with open(output_file, 'w') as f:
df['smiles'].iloc[0:99].to_csv(output_file, sep='\t', index=False)
So, i changed it to df['smiles'].iloc[0:100].to_csv(output_file, sep='\t', index=False) in main.py so it returns 100 samples
of generated molecules in the output file
(8) I have modified main.py as it is taking arguments directly as an input using argument parser and not using run.sh before, it is using def get_argparser() -> argparse.ArgumentParser: and def run_from_args(args: argparse.Namespace) -> None: functions to take arguments as an input and then parse it.
To omit arguments and the parser in the code and provide model_dir as an absolute path and input_file & output_file as an argument directly in the script, i modified the main() function and remove the argument parser.
In this modified version, the argument parser has been removed i.e. def get_argparser() and def run_from_args(args: argparse.Namespace) from main.py and simply replaced by
I have made the following changes in the model and open PR on it.
(1). Deleted all .dvc folders and files (2) Update LICENSE file to
GNU
(3) Modify src/service.py frompredict
torun
api and changepython {0}/main.py {0}/MODEL_DIR {1} {2}
tobash {0}/run.sh {0} {1} {2}
(4) MoveMODEL_DIR
that contains model file to checkpoints folder (5) Movemolecule_generation
folder andmain.py
to code folder (6) Addrun.sh
in framework folder (7) Initially the number of molecules it is showing in the output is 99 due to thisSo, i changed it to
df['smiles'].iloc[0:100].to_csv(output_file, sep='\t', index=False)
in main.py so it returns 100 samples of generated molecules in the output file (8) I have modified main.py as it is taking arguments directly as an input usingargument parser
and not usingrun.sh
before, it is usingdef get_argparser() -> argparse.ArgumentParser:
anddef run_from_args(args: argparse.Namespace) -> None:
functions to take arguments as an input and then parse it.To omit arguments and the parser in the code and provide
model_dir
as an absolute path andinput_file
&output_file
as an argument directly in the script, i modified the main() function and remove the argument parser. In this modified version, the argument parser has been removed i.e. defget_argparser()
anddef run_from_args(args: argparse.Namespace)
from main.py and simply replaced byThanks