EQSDebugger saves the day! Kinda.

I wanted to share a short story of fixing a bug in EQS.

A colleague for the Paragon dev team IMed me asking what the EnvQueryManager is and sent me this image:

The number marked in red is the single call cost in milliseconds. Yeah, it’s pretty high. It’s enormous in fact! With EQS supporting time slicing I knew this had to be a bug so I’ve started digging. By looking at the code my hunch was that the unexpected cost was related to the new-ish EQS profiling functionality since time it takes is not included in the loop’s time budget. So I’ve added stats to the EQS debugger functions to confirm my hunch. Here’s what I gotten:

The last column is the call count within a frame.. I’m pretty sure we’re not suppose to try to log over 600k queries a tick ;)

The core issue turned out to be us not accounting for EQS queries that have been aborted before the main EQS loop had been triggered. This way if we finished all active queries, and skipping the aborted ones, the loop “thought” there was still some more work to do, up until it run out of time budget. Only thanks to a minor bug in EQS debugger’s usage (the fact that it can end up logging the same query multiple times after the query has finished) and it causing such a huge performance drop, the core, deeper EQS bug has been found. So, in essence, EQS Debugger uncovered and helped nail down the bug. Well done, EQSDebugger!

Setup notes: installing TensorFlow on a Mac

I’ve recently had to wipe my old-ish mac (it was getting annoyingly slow) and figured that since I’m still using it I can just as well install the TensorFlow on it and take notes on this install-from-scratch process. And when I say “from scratch” I meant it – see 1.

1. Install Python

It’s trivial (just pick one from here, I’ve got latest, at the moment of writing it’s 3.6.1) and the only reason I’m mentioning it is because once you get python you get pip, and pip is the easiest way to install TensorFlow (and all things python).

While at installing python 3.6.1, just in case (because I remember I had some issues related to that in the past, you might not need this) I’ve installed ActiveTLC 8.5.18 (as recommended by python installer and here)

2. Installing TensorFlow

After installing said packages and quick testing (run pip3 and python3 – in the terminal python on macOS Sierra points to the default python 2.7 installation) I’ve proceeded to installing TensorFlow. This page lists couple of ways of doing that. Like I said, I’m using pip approach.

Done :D

A quick test (again, using python3) proves it right:

And that’s pretty much it…

Note that this is a CPU installation of TensorFlow, not GPU (my poor old Mac doesn’t have an eligible gpu). At some point I’m going to post my notes on installing a GPU version on a Windows system.