Comments (12)
Thanks @johnlev, looks like this did not in fact get fixed in 4.1. Sorry for the miscommunication. I'll reopen and we'll make sure the fix gets into 4.2.
from turicreate.
@johnlev Could you please provide detailed steps to reproduce the issue? I tried with the following steps, with synthetic data based on what you pasted above: repro.txt
# Create the model
import turicreate as tc
sf = tc.SFrame.read_csv('repro.txt')
model = tc.boosted_trees_classifier.create(sf, target='room')
model.export_coreml("Model.mlmodel")
# Make predictions
import coremltools
model = coremltools.models.MLModel('Model.mlmodel')
model.predict({'b1': 1, 'b2': 2, 'b3': 3, 'b4': 4, 'b5': 5})
Gives output with no error:
{u'room': 3L, u'roomProbability': {3L: 0.5, 4L: 0.5}}
from turicreate.
Oh, Python is not the problem. Running it with coremltools works fine, but importing into an Xcode project is where it fails to predict
from turicreate.
Interesting. Let me see if I can repro the issue there.
from turicreate.
@johnlev I'm still unable to repro. In Swift in Xcode, I tried the following:
let model = Model()
let output = try! model.prediction(b1: 1, b2: 3, b3: 43, b4: 2, b5: 10)
dump(output)
And it gives me:
▿ repro.ModelOutput #0
- room: 3
▿ roomProbability: 2 key/value pairs
▿ (2 elements)
- key: 3
- value: 0.5
▿ (2 elements)
- key: 4
- value: 0.5
What version of Xcode are you using, and what version of macOS are you running? It's possible this bug is specific to a particular version.
from turicreate.
I am on 10.13.2 using Xcode 9.2. I tried using your repro.txt and it worked just fine, but using the same code but with the expanded dataset I again encountered the error. Any reason you rounded the numbers in repro.txt?
from turicreate.
@johnlev Interesting, I see! Not sure when or how the numbers got rounded (somewhere in copy/paste the way I made a CSV) but I doubt that would affect it. Can you by any chance share your full training data (or a subset of it that also results in the same issue), in CSV format, as a .txt
file here so I can reproduce the issue? Thanks!
from turicreate.
Sure:
all2.txt
from turicreate.
Thanks @johnlev, I'm able to reproduce the issue with the model trained on all2.txt
. I'm not sure yet what the cause is but I'm able to see that this model gives predictions in Python but gives errors when called from Swift. I'll investigate further.
from turicreate.
I might be confused, but after upgrading to 4.1, regenerating the mlmodel, and replacing it in my project, I am still experiencing the same error:
from turicreate.
Thanks @znation. Looking forward to using Turicreate in my project once this is done
from turicreate.
@johnlev We have traced down the bug to the presence of a byte-ordered mark in your file. This is corrupting the read_csv of SFrame resulting in columns that contain non-ascii characters
sf.column_names()
['\xef\xbb\xbfb1', 'b2', 'b3', 'b4', 'b5', 'room']
The simplest work around is for you to remove the marker from the file which you can do with a simple sed script.
awk 'NR==1{sub(/^\xef\xbb\xbf/,"")}1' all2.txt > all2_byte_ordered.txt
We will be fixing the underlying issue in #227. Hopefully that should unblock you to use Turi Create in your application.
from turicreate.
Related Issues (20)
- Object detection - Segfault after a large number of iterations
- available data sets in turicreate
- Mac M2 model.export_coreml('.mlmodel') Unable to export model HOT 1
- TuriCreate still doesn't work on M1 using rosetta terminal HOT 7
- While training object_detector in colab randomly Using CPU/GPU to create model.
- Trying to create a model on a larger dataset - Loss stuck at the same number and not moving, resulting model predictions detect nothing
- Support Python 3.9 HOT 1
- pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
- Simple Image Classification Model gives different confidence level (Between Coreml UI and iOS App)
- pip dependency conflicts: conda-repo-cli 1.0.20 requires nbformat==5.4.0, but you have nbformat 5.7.3 which is incompatible. HOT 1
- AttributeError: module 'numpy' has no attribute 'typeDict' HOT 1
- Cannot install and import TuriCreate HOT 1
- Columns and DataType Not Explicitly Set on line 611 of sgraph.py
- Error While Installing Turicreate to my Windows via WSL HOT 1
- Benzinga error
- when you planning run it on windows natively (not wsl)
- MacOS ,When install dydx-python ,encounter some ERRORS , how to solve the problem? A lot thanks.
- Can't run DreamBooth in Gcolab
- Converting sframe to csv
- TuriCreate: Human Activity Classifier Model Deployment and result on unseen test dataset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turicreate.