diff --git a/CHANGELOG.md b/CHANGELOG.md index ee4f4053..b700d34e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] ### Added ### Changed +- `README.md` updated +- `__init__` function in `PyMiloServer` - Test system modified ### Removed - Python 3.6 support diff --git a/README.md b/README.md index 6312e4ed..b6976d9d 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,8 @@ communicator.run() ``` Now `PymiloServer` runs on port `8000` and exposes REST API to `upload`, `download` and retrieve **attributes** either **data attributes** like `model._coef` or **method attributes** like `model.predict(x_test)`. +ℹ️ By default, `PymiloServer` listens on the loopback interface (`127.0.0.1`). To make it accessible over a local network (LAN), specify your machine’s LAN IP address in the `host` parameter of the `PymiloServer` constructor. + #### Client By using `PymiloClient` you can easily connect to the remote `PymiloServer` and execute any functionalities that the given ML model has, let's say you want to run `predict` function on your remote ML model and get the result: ```python diff --git a/pymilo/streaming/pymilo_server.py b/pymilo/streaming/pymilo_server.py index dfd1103d..568d89f7 100644 --- a/pymilo/streaming/pymilo_server.py +++ b/pymilo/streaming/pymilo_server.py @@ -15,6 +15,7 @@ def __init__( self, model=None, port=8000, + host="127.0.0.1", compressor=Compression.NULL, communication_protocol=CommunicationProtocol.REST, ): @@ -25,6 +26,8 @@ def __init__( :type model: any :param port: the port to which PyMiloServer listens :type port: int + :param host: the url to which PyMilo Server listens + :type host: str :param compressor: the compression method to be used in client-server communications :type compressor: pymilo.streaming.compressor.Compression :param communication_protocol: The communication protocol to be used by PymiloServer @@ -34,7 +37,7 @@ def __init__( self._model = model self._compressor = compressor.value self._encryptor = DummyEncryptor() - self.communicator = communication_protocol.value["SERVER"](ps=self, port=port) + self.communicator = communication_protocol.value["SERVER"](ps=self, host=host, port=port) def export_model(self): """