apple / turicreate

Turi Create simplifies the development of custom machine learning models.
BSD 3-Clause "New" or "Revised" License
11.2k stars 1.14k forks source link

Mac M2 model.export_coreml('.mlmodel') Unable to export model #3461

Open 69Big opened 2 years ago

69Big commented 2 years ago

This is my code: import turicreate as tc image_folder = 'image1/训练集' data = tc.image_analysis.load_images(image_folder, with_path=True) data['label'] = data['path'].apply (lambda path: 'D_4015' if 'D_4015' in path else 'DB_013') data.save('diller.sframe') train_data, test_data = data.random_split(0.8, seed=2) model = tc.image_classifier.create(train_data, target='label') predictions = model.predict(test_data) metrics = model.evaluate(test_data) model.export_coreml('diller.mlmodel') But an error occurred while exporting the model Error code: WARNING:root:scikit-learn version 1.1.2 is not supported. Minimum required version: 0.17. Maximum required version: 0.19.2. Disabling scikit-learn conversion API. zsh: illegal hardware instruction /opt/anaconda3/envs/diller/bin/python How can I solve this problem? Apple computers do not support Apple modules, which surprised me.

69Big commented 2 years ago

M2 cannot return scikit born version 0.19.2; I tried many methods in the evening and asked a great god to help me solve this problem. I'm new