Post

Replies

Boosts

Views

Activity

Reply to error: cannot find 'MLDataTable' in scope
I notice I left a partial line in there, but it does not work when that is removed. Here is the actual code that is failing import CoreML import Foundation import TabularData //let dataset = try MLDataTable(contentsOf: URL(fileURLWithPath: "/Users/vardhanagrawal/Downloads/sentiment_analysis.json")) //let (trainingData, testingData) = dataset.randomSplit(by: 0.8, seed: 5) let jsonFile = Bundle.main.url(forResource: "sentiment_analysis", withExtension: "json")! let dataTable = try MLDataTable(contentsOf: jsonFile) /*: Pass your data table to print() to see a pretty-printed sample of its contents in the console. */ print(dataTable)
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Jul ’23
Reply to error: cannot find 'MLDataTable' in scope
I noticed a partial line left by accident from debugging. Remove that line and all comments and the failure still occurs where MLDataTable is used.
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to error: cannot find 'MLDataTable' in scope
I notice I left a partial line in there, but it does not work when that is removed. Here is the actual code that is failing import CoreML import Foundation import TabularData //let dataset = try MLDataTable(contentsOf: URL(fileURLWithPath: "/Users/vardhanagrawal/Downloads/sentiment_analysis.json")) //let (trainingData, testingData) = dataset.randomSplit(by: 0.8, seed: 5) let jsonFile = Bundle.main.url(forResource: "sentiment_analysis", withExtension: "json")! let dataTable = try MLDataTable(contentsOf: jsonFile) /*: Pass your data table to print() to see a pretty-printed sample of its contents in the console. */ print(dataTable)
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
Jul ’23