Code Reuse with Modules

Modules form the basic unit of code reuse in Ludwig. If we have a bunch of functionality that we want to make commonly available elsewhere, whether as part of a single compositions or more generally in the style of a library, a module lets us package it all up under a unified namespace so that it can be conveniently imported and used by a consumer.

Modules consist of regular Ludwig source files. A library, like the Fugue Standard Library, which you can examine in the Fugue online documentation,[36] is just a collection of Ludwig modules.

When we write Ludwig code that we want to package up in a module, we just put it all in a single file and name it with the desired module name. Modules are named by the file that ...

Get Scalable Cloud Ops with Fugue now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.