nbox.lib.arch
Here are some operators that can be used to create different architectural formats.
Classes
classStepOp
[source]function__init__
[source]Convinience operator, add a no output operator using .add_step
and don't write forward
Example:
Python
class InstallPython(StepOp)
def __init__(self, version: str = "3.9):
self.add_step(ShellCommand(f"chmod +x ./scripts/python{version}_install.sh"))
self.add_step(ShellCommand(f"./scripts/python{version}_install.sh"))
install_python = InstallPython() # init op
install_python() # call it without defining the forward function
Loading...
functionadd_step
[source]Add a step to the operator
functionforward
[source]Forward function is not required, but you can define it if you want to.
classSequential
[source]function__init__
[source]Package a list of operators into a sequential pipeline.
functionforward
[source]Forward function for the sequential pipeline