Posts

Post marked as solved
3 Replies
0 Views
Just a quick follow up, it’s is working now - your code works, not sure why it didn’t the first time. I deleted the app and started a new project, and it’s all working now. one quick question - should I clean/wipe the session directory after each model training, to free up space? And where would the best practice be for storing the complied models? thanks again for your help, I will hopefully release this feature soon in my app!
Post marked as solved
3 Replies
0 Views
Hi, Thank you for the reply. I am following the tutorial on "Control training in CreateMl with Swift" to set up the training on the device. So to create the sessionsDirectory I used the following code. let experimentID = "test4" let sessionDirectory = URL(fileURLWithPath: "\(NSTemporaryDirectory())WWDC-\(experimentID)") What appears in the console is that the model is trained (iterations are shown to be completed), but then nothing else happens. I wonder if it is a problem with how I am using Combine to retrieve the results and checkpoints - none of the test print statements fire inside the closures, which suggests the code block has not run. job.result.sink { result in             print("result", result)         }         receiveValue: { model in print("result", model)         }         .store(in: &subscriptions) Your above code suggestion did not seem to run either. I am new to coding, and to combine, so I am sure this is a something simple. Any further help would be appreciated. Thanks again