In the first example, we’ll use normal operations as a model, but it is deploying on Konduit-Serving. You can give input and get the return of output from the server. This will make your model more straightforward to understand by humans as it can provide direct results.
Viewing directory structure
Let’s run cells with bash in a sub-process by using cell magic command and view files in the current directory that will be used in this demonstration.
%%bash
echo "Current directory $(pwd)" && tree
The following files are present in our simple python script demo.
The scripts contain a simple initialization script for an add function which loads the main function in the init_script.py and executes the incoming input through run_script.py.
%%bash
less init_script.py
You’ll be able to see the following.
def add_function(x, y):
return x + y
Once again, let’s browse through the python script for the calling function from init_script.py.
%%bash
less run_script.py
You’ll notice the script only has a line of code.
c = add_function(a, b)
Viewing the main configuration file
The main configuration should define the inputs as a and b and the output as c, just as we've showed in the run_script.py.