MPSGraph training appears to fail / hangup on sample project

Hello, I started experimenting with MPSGraph and decided to start with the sample project provided from WWDC 2020 session 10677 but I'm experiencing some strange behavior. Without making any alterations, I ran the build in the simulator and everything appears fine until I hit the train button. On first attempt the build crashes with an error indicated at the attempt to commit the command buffer within the runTrainingIterationBatch() function with the message stating "-[MTLDebugCommandBuffer lockPurgeableObjects]:2103: failed assertion `MTLResource 0x600000640880 (label: (null)), referenced in cmd buffer 0x15000f600 (label: (null)) is in volatile or empty purgeable state at commit'". From there I checked the documentation for the graph.encode command in the header file and it states that commitAndContinue might be called and not to rely on the buffer to remain uncommitted. I figured there must have been a change under the hood since the sample was made and commented out the .commit line the error originated from then attempt to run it again. No crash this time but there doesn't appear that the network is training. The loss chart does not populate with any values nor does the operation appear to ever finish. I added one print statement in the updateProgressCubeAndLoss completion to print the iteration number and the loss at that iteration. It showed a loss value of 0.0 at every iteration and no further iterations took place after 63. Occasionally on repeat tests 1-3 iterations would show a loss value other than 0.0 but that's it. Haven't been able to find much elsewhere online or other sample projects for MPSGraph. Any insight or assistance would be appreciated.

Again this is the sample project demonstrated in WWDC 2020 session 10677 and pulled directly from the developer documentation page listed below. https://developer.apple.com/documentation/metalperformanceshadersgraph/training_a_neural_network_using_mps_graph

I'm running Xcode version 13.4.1 and MacOS 12.4 on a 2020 MacBook Pro with an M1 chip. I also tried a 2018 Mac mini with a 3 GHz 6-Core Intel i5 with the same software versions and got the same result.