Skip to content

Commit

Permalink
Check metadata for each view individually
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrohbeck authored Nov 6, 2023
1 parent 13a38f4 commit 830e5c7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mofax/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@ def _load_features_metadata(model):
columns=["feature", "view"],
)
if "features_metadata" in model.model:
if len(list(model.model["features_metadata"][model.views[0]].keys())) > 0:
features_metadata_dict = {
m: pd.concat(
features_metadata_dict = {}
for m in model.views:
if len(list(model.model["features_metadata"][m].keys())) > 0:
features_metadata_dict[m] = pd.concat(
[
pd.Series(model.model["features_metadata"][m][k])
for k in model.model["features_metadata"][m].keys()
],
axis=1,
)
for m in model.views
}


if len(features_metadata_dict) > 0:
for m in features_metadata_dict.keys():
features_metadata_dict[m].columns = list(
model.model["features_metadata"][m].keys()
Expand Down

0 comments on commit 830e5c7

Please sign in to comment.