Training “cat or dog” on Windows without GPU

I was curious to see how much slower the training of chapter 1 of would be on my GPU-less home desktop vs. a basic cloud GPU servers. The first issue was to get the code running after installing torch, torchvision and fastai modules. Apparently, there are some code modifications to make to get things …

Continue reading ‘Training “cat or dog” on Windows without GPU’ »

cannot import name ‘mobilenet_v2’ from ‘torchvision.models’

This was the error I received when trying to import fastbook to study the excellent course. I had Python 3.9.1 installed and used pip to install the latest versions of torch, torchvision, and fastai To spare the reader from boring war stories, here’s the bottom line: Download the latest version of torchvision for your …

Continue reading ‘cannot import name ‘mobilenet_v2’ from ‘torchvision.models’’ »

Compiling PHP 7.3 with MySQL support for AWS Lambda

This is probably easier to do for PHP 7.4, but I wanted PHP 7.3 to make sure everything is compatible with existing code. The code below assumes you are doing this in an interactive shell in a Docker container build for creating binaries for AWS Lambda. Doing this is explained here First, install the necessary …

Continue reading ‘Compiling PHP 7.3 with MySQL support for AWS Lambda’ »

Duplicated log lines using Python in AWS Lambda

The short version: logname = ‘processing’ formatter = logging.Formatter(fmt=’%(asctime)s %(levelname)-8s %(message)s’, datefmt=’%Y-%m-%d %H:%M:%S’) handler = logging.StreamHandler() handler.setFormatter(formatter) logger = logging.getLogger(logname) logger.setLevel(logging.DEBUG) logger.handlers = [] # === Make sure to add this line logger.addHandler(handler) logger.propagate = False # === and this line For details, check out this link

Standard C++ libraries on AWS Lambda

While attempting to compile a test sample together a library I needed, I received the following /usr/bin/ld: cannot find -lstdc++ installing the following solved the issue. I didn’t even check if both installations are necessary – if you have the curiosity to dig further then send your conclusions, but all I wanted was a solution …

Continue reading ‘Standard C++ libraries on AWS Lambda’ »

lupa (LuaJIT/Lua-Python bridge) on AWS Lambda

Last post discussed launching LuaJIT from Python on AWS Lambda. Suppose you want to receive events from the Lua code in the Python code that invoked it. If you don’t have a Python-Lua API then you are left with either using sockets, files or even getting feedback by reading the realtime output from the process …

Continue reading ‘lupa (LuaJIT/Lua-Python bridge) on AWS Lambda’ »

AWS Lambda – running python bundles and arbitrary executables – Part 2

In the previous post I explained how to create your AWS lambda environment using Docker, and how to package a python bundle and launch it on AWS Lambda. In this post I’ll show how you can launch arbitrary executables from an AWS Lambda function. To make this tutorial even more useful, the example of an …

Continue reading ‘AWS Lambda – running python bundles and arbitrary executables – Part 2’ »