Switching from PyCharm to VS Code for Maya Development

If you’ve been around here before, you might have seen my post on setting up PyCharm for Maya Python development. It’s been one of my more practical posts, and for a long time it reflected how I actually worked. PyCharm was my IDE of choice for Maya scripting, and I didn’t have much reason to look elsewhere. I’d tried VS Code over the years and never really landed on it. Getting it properly configured for Maya — pointing it at the right interpreter, getting reasonable autocomplete — always felt like more friction than it was worth. PyCharm just worked, and once you had a good setup going, it was hard to argue with. ...

SymPy to Solve a Low Level ML Training Loop

A few months ago, I overcame a challenging hurdle in my spare time passion project. It seemed like I reached a dead end, but I got past it thanks to discovering a new Python package, SymPy. The Background After going down the rabbit hole with reinforcement learning, I conceded my problem was best solved using a regression algorithm. Still, the best results I saw came from exploiting the training loop in the early days. ...

The Best PyCharm MayaPy Interpreter Setup

There’s no denying - Maya makes development hard. Python is one of the most popular programming languages in the world as of 2022. The language supports many great workflows, but most are off-limits when working with Maya. Even just setting up an IDE with MayaPy has been a challenge through the years. Today I will share how I set up PyCharm to work with MayaPy and how it enables a super-slick workflow for unit testing. ...

CoreData Swift Scalar Optionals

The project I am currently working on has an input form that takes doubles for some of its fields. I am using CoreData to persist my data and was surprised to find optional scalars are not supported. Regardless of whether or not Optional is checked, the type in the Swift codegen will always be Double and never be optional. This behaviour is not a bug, but rather just a difference in how Optionals work in CoreData - it refers to optional at save time. ...

My SwiftUI Currency Field

I’ve been spending a lot of time in SwiftUI lately and, so far, I love it. While it is remarkably flexible and powerful, it is still very young. There are still pain points from what seems to be a lack of coverage in the framework. Worse still, because it is changing and updating so rapidly, I am finding that much advice on StackOverflow and many blog posts are outdated already. ...

Loss vs. reward in reinforcement learning

Reinforcement learning is my area of focus so far when it comes to deep learning. RL is probably not the first stop for most on the machine learning education circuit, but it just happens to be where the problem I am trying to solve has taken me. When starting down the RL road, I was immediately confused by the concept of reward. Nothing was confusing about what it was - giving a dog a treat when it sits after you’ve asked it to sums things up pretty well. Instead, I was confused by its relation to the loss function. Both, at a high level, help inform when the correct thing is happening. ...

Tensorflow to PyTorch

My journey into machine learning is still in its relatively early stages. I began by familiarizing myself with Tensorflow. It was an excellent introduction, whetting my appetite for AI, but I am now ready to make the switch to PyTorch. There are two key drivers behind my decision to make this change. Debugging Process transparency Debugging Debugging in Tensorflow has been problematic, to say the least, being most painful when writing custom loss functions. I’d feed dummy data to the loss function while writing it, pre-vetting what I was creating. However, when something didn’t work as expected during training, troubleshooting was near impossible. Tensors at training time are opaque, acting in some “virtual” fashion if my memory serves (this was a while ago now). ...

Kaggle Courses

I have been dabbling in deep learning recently, and I have completed a few courses and read through and watched many resources during that time. It can be hard to find good help, so I wanted to share my experience with Kaggle quickly. If you’re not familiar with Kaggle, it is an excellent source of datasets for training your models. I believe this is what they are most well known for. They also have a complete set of courses relating to many things data science-related. The topics include data visualization, how to use the Pandas library, and more. ...

Python logging in Maya

The logging module, while something I’ve been using for years, is not something I can say I’ve been clear on. I’ve dug in more recently and thought I would share some quick learnings. Logger Hierarchy The first item to note is that Python’s logging module behaves as an inheritance hierarchy. This hierarchy will automatically kick in by using dot notation in the naming of your logger. For example, “eh.bee.sea” inherits from “eh.bee”, which inherits from “eh”. ...

Applied Software Development Retrospective

Recently, I completed the Applied Software Development part-time studies program at BCIT. It has been a three-year journey, and so I thought I would do a quick write-up about some of my favourite courses and my takeaways. Why go back to school? I had been established in the industry for over ten years, was well experienced with Python, and had some experience in other languages. Why go back to school? Well, I was entirely self-taught through my years on the job. ...