if isinstance(result, tuple):
if self.postprocess_fn is not None:
result = self.postprocess_fn(*result)
return Result(NumpyTupleDataset(*result), smileses)
else:
if self.postprocess_fn is not None:
result = self.postprocess_fn(result)
return Result(NumpyTupleDataset(result), smileses)
After Change
result = pp.process(filepath)
smileses = numpy.array(smiles_list) if return_smiles else None
parse_result = {}
if isinstance(result, tuple):
if self.postprocess_fn is not None:
result = self.postprocess_fn(*result)
parse_result.update({"dataset": result, "smiles": smileses})
return parse_result
else:
if self.postprocess_fn is not None:
result = self.postprocess_fn(result)
parse_result.update({"dataset": result, "smiles": smileses})
return parse_result