Commit 001b0c2b authored by mlocatelli's avatar mlocatelli

Preprocess save_output: fixing error in create_dataset

parent 65ff5a39
Pipeline #2532 passed with stages
in 65 minutes and 39 seconds
......@@ -354,7 +354,7 @@ class Preprocess():
raws = np.zeros((chunk, len(orderwords)), dtype=np.int8)
index = 0
saving_features = orderwords
# continuous
else:
# get molecules inchikeys
......@@ -380,12 +380,14 @@ class Preprocess():
hf.create_dataset("features", data=np.array(
features, DataSignature.string_dtype()))
saving_features = features
# if fitting, we also save the features
if method == "fit":
fn = os.path.join(models_path, features_file)
with h5py.File(fn, "w") as hf:
hf.create_dataset("features", data=np.array(
features, DataSignature.string_dtype()))
hf.create_dataset("features", data=np.array(saving_features, DataSignature.string_dtype()))
def to_feature_string(self, signatures, string_func):
"""Covert signature to a string with feature names.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment