Package: padl
PADLPipeline Abstractions for Deep LearningFull documentation here:https://lf1-io.github.io/padl/Just asprograms are read more often than they are written, so aredeep learning models used more often than they are trained.The PyTorch ecosystem has many tools for training models. However, this is only the beginning of the journey. Once a model has been trained, it will be shared, and used in a multitude of contexts, often on a daily basis, in operations, evaluation, comparision and experimentation by data scientists. Theuseof the trained model, is how value is extracted out of its weights. Despite this important fact, support for using deep-learning models up to now has been very thin in the PyTorch ecosystem and beyond. PADL is a tool which fills this void.PADLIs great for:serving model predictionsexperimentation with pre-trained models in Jupyter notebooks and interactive sessionsinspecting and visualizing intermediate model featuresevaluating and monitoring model performance on metrics and incoming test datacomputing model outputs as a preprocessing step for further data science tasksThis is how it works:PADL is a pipeline builder forPyTorch.may be used with all of the greatPyTorchfunctionality you're used to for writing layers.allows users to build pre-processing, forward passes, loss functionsandpost-processing into the pipeline.models may have arbitrary topologies and make use of arbitrary packages from the python ecosystem.allows for converting standard functions toPADLcomponents using a single keywordtransform.PADL pipelines:can be trained with minimal boilerplate in PyTorch Lightningcan then be served in one line with TorchServeinteract well with the entire PyTorch ecosystem (for example Hugging Face)PADLwas developed atLF1, an AI innovation lab based in Berlin, Germany.Getting StartedInstallationpip install padlPADL currently supports python3.7,3.8and3.9.Python version >=3.8is preferred because creating and loading transforms (notexecution)
can be slower in3.7.WARNING: PADL transforms do not work in the base Python Interpreter environment because we rely on
the inspect module to find source code (used when saving PADL transforms). Unfortunately, the
source code typed at this interactive prompt is discarded as soon as it is parsed.
Therefore, we recommend using the IPython interpreter or Jupyter Notebooks for interactive sessions.Your first PADL programfrompadlimporttransform,batch,unbatchimporttorchfromtorchimportnnnn=transform(nn)@transformdefprepare(x):returntorch.tensor(x)@transformdefpost(x):returnx.topk(1)[1].item()my_pipeline=prepare>>batch>>nn.Linear(10,20)>>unbatch>>postTry out PADL in Colab notebooksBasic PADLMNISTSimple NLP exampleSentiment Analysis - NLPDC-GAN - Image GenerationCLIP guided diffusion for face editingResourcesRead the documentation athttps://lf1-io.github.io/padl/.Find examples athttps://github.com/lf1-io/padl/tree/main/notebooks.Post issues athttps://github.com/lf1-io/padl/issues.Dev BlogRead more about PADL on thePADL developer's blogContributingCode of conductIf you're interested in contributing to PADL please look at thecurrent issuesLicensingPADL is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.