From a Throwaway QC Prototype to PyLossless

In March 2025, I had an idea for improving quality control in PyLossless. I wanted to bring back being able to review an EEG recording to select independent components, choose a time window, and immediately compare the raw signal against the result of removing those components. It had been done in the previous version in MATLAB, but I was less familiar with the inner working of PyLossless at the time. I was also a complete novice when it came to things like Qt 5, PyQt, and the mne-qt-browser. ...

2026-08-28 · 5 min · Tyler Collins

Writing More Code with AI Agents

I recently gave a SHARCNET General Interest Webinar called “Writing More Code with AI Agents.” More than 300 people registered. Attendance was excellent, there were lots of questions, and I’ve had a decent number of follow-up conversations over email. Pretty happy with how it turned out! The response also confirmed why I wanted to give the talk. People are constantly asking me agents and what they should be doing with them. They’re watching other researchers and developers move very quickly with these tools, and there’s a real fear of missing out. They want to try them, but they don’t necessarily know where to start or how much of the output they should trust. ...

2026-08-27 · 6 min · Tyler Collins

Turning a MATLAB EEG Pipeline Into a Container

A MATLAB analysis pipeline can be battle-tested and still be difficult to share. The code can work, but the next platform may have the wrong MATLAB version, missing dependencies, or no MATLAB installation at all. I put together a small MATLAB container template to show that you don’t necessarily need to rewrite the analysis to solve this. MATLAB supports compiling a standalone application and packaging it as a Docker image. The deployed application runs with MATLAB Runtime rather than a full MATLAB installation. ...

2026-08-26 · 2 min · Tyler Collins

Revisiting Cookiecutter in the Age of Coding Agents

A few years ago, I used Cookiecutter to show how to get from import blah to pip install blah. This sounds simple, but it isn’t. A Python script can live almost anywhere, but a formal package needs the right structure to be built into a wheel. It needs dependency metadata, versions, releases, a licence, and some way to test that it still works. Cookiecutter gave us a standard template. Instead of remembering every file and setting and creating them manually, we answered a few questions and started with a working package. I gave a talk about that workflow in 2022. ...

2026-08-24 · 4 min · Tyler Collins

EEGStudyFlow

Starting an EEG study means making dozens of small decisions. Where will the original recordings live? How will they become a BIDS dataset? Which software environment will the study use? Where does preprocessing end and analysis begin? A student has to answer these questions before they’ve had enough experience to know what the consequences will be. Their supervisor then has to review those answers, remember what everyone decided, and figure out whether the project can still be reproduced two years later. ...

2026-05-05 · 3 min · Tyler Collins

PyLossless

In April 2025, I wanted to put PyLossless on the DRAC clusters as an official module. I had at least half a dozen datasets to clean, and I was still managing many projects with separate virtual environments. Reinstalling the same preprocessing package for every dataset made no sense. It turned out that PyLossless was already available as a module. When I asked the internal team to update it, they gave me a list of changes they wanted first, especially if I planned to develop it myself. That request turned into active stewardship of the project and, eventually, co-ownership of its official repository. ...

2026-05-05 · 7 min · Tyler Collins

Serial Farms: Package Options and When to Switch to Farming

Submitting a few small jobs one at a time is fine. Submitting hundreds that way is annoying for you and hard on the scheduler. This webinar compared ways to group lots of serial tasks into manageable jobs. I covered when ordinary submissions stop making sense, how array indexes can drive repeated runs, and when it is time to use a serial farm. Abstract Small jobs are convenient to submit individually, but at scale they can overload a scheduler, inflate queue times, and ultimately reduce throughput. This webinar examines practical strategies for consolidating large numbers of short tasks, including job arrays, task-bundling techniques, and wrapper-based aggregation. We will discuss how these approaches differ in overhead, portability, scheduler behavior, and job-failure handling. The session will also provide guidance on recognizing when packaging options no longer yield sufficient throughput and when transitioning to a serial-farming model becomes advantageous. Serial farms can mitigate scheduler pressure, improve wait times on busy clusters, and offer more predictable performance. Examples will be provided throughout the webinar and shared on GitHub for future reference. ...

2025-12-03 · 1 min · Tyler Collins

Revisiting Cython: Is It Still Effective?

I first presented Cython in 2020. Five years and several major releases later, I wanted to see whether that old advice still held up. This talk looked at what changed in Cython, whether it got faster, and whether it became any easier to use. I worked through a few demo problems and compared the results with modern Python and its performance libraries. Abstract Python is often praised for its speed of development but criticized for its execution speed. However, this has changed significantly in recent years due to major improvements in both Python itself and its most popular libraries. Libraries such as TensorFlow, OpenCV, NumPy, and Pandas all use a tool called Cython. Cython is an extension of Python that allows functions to be compiled into C or C++, mitigating Python’s performance limitations. ...

2025-03-26 · 1 min · Tyler Collins

Diagnosing Wasted Resources from User-Facing Portals

A slow job and a slow queue are different problems. This talk was about using the national cluster portals to figure out which one you’re dealing with. I covered job history, account priority, wait times, and resource-use reports. The examples looked at CPU, memory, and GPU requests that did not match the work being done. The point was to check the evidence before changing a job request. Abstract Researchers often leave resources on the table when specifying their job requirements on the national systems. This talk builds on previous sessions and uses the Digital Research Alliance of Canada’s User Facing Portals to explore what different types of jobs look like when they waste resources. Demonstrations will include interactive jobs, parallel jobs, GPU workflows, and more. With more accurate job specifications, researchers can expect shorter wait times and more throughput on any general-purpose system. ...

2024-08-14 · 1 min · Tyler Collins

Modern Approaches to Profiling in Python with Scalene

Before rewriting slow Python or moving it into Cython, it helps to find out what is actually slow. This Compute Ontario Colloquium was an introduction to Scalene. Scalene separates time spent in Python from time spent in native libraries, and it can also profile memory and GPU use. I ran it on the Alliance systems from a Jupyter notebook, then compared native Python, vectorized code, Cython, and just-in-time compilation. Abstract Python is a language developers choose to write in for convenience rather than speed. However, speed can be recovered by offloading calculations to libraries which leverage lower-level languages like NumPy, Cython, and more. Scalene is a high-performance CPU, GPU, and memory profiler which can illustrate where code should be passing calculations to other libraries for significant increases in speed. Scalene also includes support for Jupyter Notebooks, OpenAI suggestions for vectorizing code, as well as a significantly lower overhead and higher accuracy than other profilers. This talk will introduce the concepts required for understanding why external libraries are faster than native Python, interactions with approaches such as Cython and just-in-time compilers, as well as a live demonstration of Scalene on the Alliance systems inside of a Jupyter Notebook. Familiarity with Python, virtual environments, and Jupyter notebooks will be assumed. ...

2023-05-03 · 2 min · Tyler Collins