Commit e8469f26 authored by nd-02110114's avatar nd-02110114
Browse files

🚨 fuix lint

parent de94704f
Loading
Loading
Loading
Loading
+14 −4
Original line number Original line Diff line number Diff line
@@ -73,10 +73,20 @@ class Featurizer(object):
    raise NotImplementedError('Featurizer is not defined.')
    raise NotImplementedError('Featurizer is not defined.')




# callback function for apply_async
def _featurize_callback(
# NOTE : apply_async() : nested function is not executed
    featurizer,
# https://stackoverflow.com/questions/56533827/pool-apply-async-nested-function-is-not-executed
    mol_pdb_file,
def _featurize_callback(featurizer, mol_pdb_file, protein_pdb_file, log_message):
    protein_pdb_file,
    log_message,
):
  """Callback function for apply_async in ComplexFeaturizer.

  This callback function must be defined globally
  because `apply_async` doesn't execute a nested function.

  See the details from the following link.
  https://stackoverflow.com/questions/56533827/pool-apply-async-nested-function-is-not-executed
  """
  logging.info(log_message)
  logging.info(log_message)
  return featurizer._featurize(mol_pdb_file, protein_pdb_file)
  return featurizer._featurize(mol_pdb_file, protein_pdb_file)