From 03a2fc5603225b4a15a0d94cce260d762a32fcdb Mon Sep 17 00:00:00 2001 From: AHReccese Date: Mon, 2 Jun 2025 23:17:38 -0400 Subject: [PATCH 1/5] add host to `PymiloServer` constructor - enabling accessiblity on LAN --- pymilo/streaming/pymilo_server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): """ From 7a3b66b92beddce71ccd10e9d0c5a07add9d57b0 Mon Sep 17 00:00:00 2001 From: AHReccese Date: Thu, 5 Jun 2025 23:39:32 -0400 Subject: [PATCH 2/5] `CHANGELOG.md` updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee4f4053..034ef7bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] ### Added ### Changed +- `__init__` function in `PyMiloServer` - Test system modified ### Removed - Python 3.6 support From 4b2b17070c0af570458bae28ffcb50d082480ca3 Mon Sep 17 00:00:00 2001 From: AHReccese Date: Thu, 5 Jun 2025 23:43:59 -0400 Subject: [PATCH 3/5] `README.md` updated --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6312e4ed..983d8cff 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. The default value is `127.0.0.1`. + #### 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 From 235577615c352b254eab5588fec5621585ebbfa8 Mon Sep 17 00:00:00 2001 From: AHReccese Date: Thu, 5 Jun 2025 23:44:26 -0400 Subject: [PATCH 4/5] `CHANGELOG.md` updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 034ef7bf..b700d34e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ 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 From 91fb4130fd79ca6d3e07e06ba124ec0f075c0774 Mon Sep 17 00:00:00 2001 From: AHReccese Date: Mon, 9 Jun 2025 21:31:33 -0400 Subject: [PATCH 5/5] remove last sentence --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 983d8cff..b6976d9d 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ 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. The default value is `127.0.0.1`. +ℹ️ 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: