Player not loading? Watch on YouTube
This first session introduces Hugging Face Candle through an anomaly detection project in Rust. The speaker describes Candle as a library inspired by PyTorch and uses a course example as a reference for an implementation written during the stream. The work starts with a Hello World project and Cargo dependencies, including candle-core, anyhow and rand.
The setup uses a Mac and enables Metal rather than CUDA. Dependency selection and manifest syntax cause early build errors, which the speaker works through before moving to tensors. Much of the session covers constructing a tensor from numerical data, supplying its shape and device, and resolving Rust type errors. The sample data includes a deliberately unusual value of 76 for the planned outlier detection exercise.
The speaker then explains z-score normalization through the mean, variance and standard deviation. An attempt to add a method directly to Candle's external Tensor type leads to an extension trait approach. By the end, the project has sample data and a normalization placeholder; it does not yet demonstrate a completed anomaly detector. For viewers interested in local AI development, this is an exploratory coding tutorial with substantial debugging and audience chat. The detection algorithm continues in a later session.