Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"".format(featurizer_type, type(type_tester))
)
dto = DictToObject(
overwrite_data=True, target_col_id=featurizer_type
)
dto.set_n_jobs(self.n_jobs)
df = dto.featurize_dataframe(df, featurizer_type, inplace=False)
# Decorate with oxidstates
if featurizer_type == self.structure_col and self.guess_oxistates:
logger.info(
self._log_prefix
+ "Guessing oxidation states of structures if they were "
"not present in input."
)
sto = StructureToOxidStructure(
target_col_id=featurizer_type,
overwrite_data=True,
return_original_on_error=True,
max_sites=30,
)
sto.set_n_jobs(self.n_jobs)
try:
df = sto.featurize_dataframe(
df,
featurizer_type,
multiindex=self.multiindex,
inplace=False,
)
except Exception as e:
logger.info(
self._log_prefix