Modzy Core provides two ways to serve models server mode and direct mode. Server mode includes a local database so that past inferences can be accessed at a later date. Whereas Direct mode provides no data retention whatsoever. As a result, Direct mode is the fasted way to run inferences but, after an inference result has been returned it disappears.
Depending on how you're building applications at the edge, it may become necessary to change from serving your models from server mode to direct mode, or vice versa.
To change the serving mode that you're in:
Log into your edge device via ssh or remote desktop
Open up a terminal and type
sudo vi /etc/systemd/system/modzy-core.serviceor otherwise prepare to edit the
This will open up a configuration file that should look something like this
[Unit] Description=Service for Modzy Core Requires=docker.service Wants=network.target After=docker.service [Service] EnvironmentFile=-/etc/environment ExecStart=/opt/modzy/bin/modzy-core server --storage.filesystem.path /opt/modzy/core/data SyslogIdentifier=modzy-core Restart=on-failure TimeoutStopSec=60 Type=exec [Install] WantedBy=multi-user.target
ExecStartrow by replace the text
serverwith the text
directif you want to run in direct mode. Alternatively, if your device is already in
directmode, then you can change it back by replacing this text with
Save your edits and close the file (in vi this can be done by hitting the 'esc' key and then typing
:wqbefore finally typing the 'enter' key).
Finally, restart Modzy Core by running the following commands
sudo systemctl daemon-reload
sudo systemctl restart modzy-core
Updated 3 months ago