Module fontai.io
This module contains classes that form the data interfaces between ML stages and the outside world (read: storage and other ML stages). Most objects are meant to be used internally by other package modules. Submodules are:
formats: allowed file format classes; these classes allow to deserialise objects into concrete file formats such as zip and ttf files.
readers: Batch file readers; each ML stage imposes restrictions on the kind of file that can be read as input, using classes in this module
scrappers: Scrapper classes to retrieve open source font files using the Ingestion stage.
storage: Implements ain abstraction that allows to read files from local and remote storage. At the moment, only GCS and public URLs are supported for remote storage.
writers: Batch file writers
Expand source code
"""This module contains classes that form the data interfaces between ML stages and the outside world (read: storage and other ML stages). Most objects are meant to be used internally by other package modules. Submodules are:
formats: allowed file format classes; these classes allow to deserialise objects into concrete file formats such as zip and ttf files.
readers: Batch file readers; each ML stage imposes restrictions on the kind of file that can be read as input, using classes in this module
scrappers: Scrapper classes to retrieve open source font files using the Ingestion stage.
storage: Implements ain abstraction that allows to read files from local and remote storage. At the moment, only GCS and public URLs are supported for remote storage.
writers: Batch file writers
"""
Sub-modules
fontai.io.formats
-
This module contains classes that deal with encoding/decoding bytestreams from/to the data formats that act as the interface between pipeline stages …
fontai.io.readers
-
This module provides the interfaces between ML pipeline stages and storage media for the purpose of reading input files. They relay on instances …
fontai.io.records
-
This module contains classes that can be serialised/deserialised to/from Tensorflow record files; they are used by the prediction stage for both …
fontai.io.scrappers
-
This module contains logic that was used to scrape three font file sources: google, 1001fonts.com and dafont.com. As of May 2021 at least one of those …
fontai.io.storage
-
This module provides an abstraction fo the storage layer in order to read or write bytestreams to different media. Currently, read/writes are …
fontai.io.writers
-
This module contains the interfaces between ML pipelines and storage for the purpose of output writing. At the moment only zip files and Tensorflow …