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. ...

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). ...

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”. ...

Using the __new__ method in Python classes

The __new__ method is a special method for Python classes. It is essentially the constructor for your class and handles its creation. You may think this is what the __init__ method is for, but the class instance (referred to from here out as “object”) is actually already created by the time __init__ gets called. The __init__ method is just setting initial values for an already created object. The __new__ method is what gets called before the object exists and actually creates and returns the object. ...

Mar 28, 2021 · ⏱ 6 min