deepmodeling / Uni-Mol

Official Repository for the Uni-Mol Series Methods
MIT License
726 stars 127 forks source link

fix multilabel datareader bug #205

Closed liuzan-info closed 10 months ago

liuzan-info commented 10 months ago

Demo

from unimol_tools import MolTrain
import numpy as np
custom_data ={'target':np.random.randint(2, size=(100, 10)),  # multilabel
            'atoms':[['C','C','H','H','H','H'] for _ in range(100)],
            'coordinates':[np.random.randn(6,3) for _ in range(100)],
            }

clf = MolTrain(
    task = 'multilabel_classification',
    save_path = 'tmp_exp'
    )
clf.fit(custom_data)

ValueError: Per-column arrays must each be 1-dimensional