veox 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
veox-0.1.1/PKG-INFO ADDED
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.1
2
+ Name: veox
3
+ Version: 0.1.1
4
+ Summary: A client for the remote machine learning service with sklearn-like API
5
+ Home-page: https://github.com/yourusername/veox-client
6
+ Author: Your Name
7
+ Author-email: your.email@example.com
8
+ License: UNKNOWN
9
+ Platform: UNKNOWN
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.7
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Requires-Python: >=3.7
19
+ Description-Content-Type: text/markdown
20
+
21
+ Veox Client
22
+ Veox Client is a Python package that provides a client for interacting with the Veox remote machine learning service. It offers an sklearn-like API for easy integration into your existing machine learning workflows.
23
+ Installation
24
+ You can install Veox Client using pip:
25
+ Copypip install veox
26
+ Usage
27
+ Here's a basic example of how to use Veox Client:
28
+ pythonCopyimport veox as v
29
+ import numpy as np
30
+ from sklearn.datasets import make_classification
31
+ from sklearn.model_selection import train_test_split
32
+
33
+ # Generate a sample dataset
34
+ X, y = make_classification(n_samples=1000, n_features=20, n_classes=2, random_state=42)
35
+ X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
36
+
37
+ # Initialize the remote model
38
+ model = v.init(key="YOUR_API_KEY", server_url="http://your-server-url:5000")
39
+
40
+ # Train the model
41
+ model.fit(X_train, y_train)
42
+
43
+ # Make predictions
44
+ y_pred = model.predict(X_test)
45
+
46
+ # Get prediction probabilities
47
+ y_prob = model.predict_proba(X_test)
48
+
49
+ # Calculate accuracy
50
+ accuracy = np.mean(y_pred == y_test)
51
+ print(f"Accuracy: {accuracy:.4f}")
52
+ Note
53
+ This package requires access to a running Veox server. Contact your system administrator or the Veox team for server access and API keys.
54
+ License
55
+ This project is licensed under the MIT License - see the LICENSE file for details.
56
+
57
+
veox-0.1.1/README.md ADDED
@@ -0,0 +1,35 @@
1
+ Veox Client
2
+ Veox Client is a Python package that provides a client for interacting with the Veox remote machine learning service. It offers an sklearn-like API for easy integration into your existing machine learning workflows.
3
+ Installation
4
+ You can install Veox Client using pip:
5
+ Copypip install veox
6
+ Usage
7
+ Here's a basic example of how to use Veox Client:
8
+ pythonCopyimport veox as v
9
+ import numpy as np
10
+ from sklearn.datasets import make_classification
11
+ from sklearn.model_selection import train_test_split
12
+
13
+ # Generate a sample dataset
14
+ X, y = make_classification(n_samples=1000, n_features=20, n_classes=2, random_state=42)
15
+ X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
16
+
17
+ # Initialize the remote model
18
+ model = v.init(key="YOUR_API_KEY", server_url="http://your-server-url:5000")
19
+
20
+ # Train the model
21
+ model.fit(X_train, y_train)
22
+
23
+ # Make predictions
24
+ y_pred = model.predict(X_test)
25
+
26
+ # Get prediction probabilities
27
+ y_prob = model.predict_proba(X_test)
28
+
29
+ # Calculate accuracy
30
+ accuracy = np.mean(y_pred == y_test)
31
+ print(f"Accuracy: {accuracy:.4f}")
32
+ Note
33
+ This package requires access to a running Veox server. Contact your system administrator or the Veox team for server access and API keys.
34
+ License
35
+ This project is licensed under the MIT License - see the LICENSE file for details.
veox-0.1.1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
veox-0.1.1/setup.py ADDED
@@ -0,0 +1,33 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+
6
+ setup(
7
+ name="veox",
8
+ version="0.1.1",
9
+ author="Your Name",
10
+ author_email="your.email@example.com",
11
+ description="A client for the remote machine learning service with sklearn-like API",
12
+ long_description=long_description,
13
+ long_description_content_type="text/markdown",
14
+ url="https://github.com/yourusername/veox-client",
15
+ packages=find_packages(),
16
+ classifiers=[
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.7",
23
+ "Programming Language :: Python :: 3.8",
24
+ "Programming Language :: Python :: 3.9",
25
+ ],
26
+ python_requires=">=3.7",
27
+ install_requires=[
28
+ "requests>=2.25.1",
29
+ "python-socketio>=5.3.0",
30
+ "numpy>=1.19.5",
31
+ "joblib>=1.0.1",
32
+ ],
33
+ )
@@ -0,0 +1,4 @@
1
+ from .client import init, RemoteModel
2
+
3
+ __all__ = ['init', 'RemoteModel']
4
+ __version__ = "0.1.1"
@@ -0,0 +1,78 @@
1
+ import requests
2
+ import socketio
3
+ import joblib
4
+ import numpy as np
5
+
6
+ class RemoteModel:
7
+ def __init__(self, session_id, server_url):
8
+ self.session_id = session_id
9
+ self.server_url = server_url
10
+ self.sio = socketio.Client()
11
+ self.sio.connect(server_url)
12
+ self.status = 'initialized'
13
+
14
+ def fit(self, X, y):
15
+ self.sio.emit('fit', {
16
+ 'session_id': self.session_id,
17
+ 'X': joblib.dumps(X),
18
+ 'y': joblib.dumps(y)
19
+ })
20
+
21
+ @self.sio.on('progress')
22
+ def on_progress(data):
23
+ if data['session_id'] == self.session_id:
24
+ print(f"Training progress: {data['progress']:.2f}%")
25
+
26
+ @self.sio.on('fit_complete')
27
+ def on_fit_complete(data):
28
+ if data['session_id'] == self.session_id:
29
+ self.status = 'trained'
30
+ print("Training complete!")
31
+
32
+ self.sio.wait() # Wait for 'fit_complete' event
33
+ return self
34
+
35
+ def predict(self, X):
36
+ if self.status != 'trained':
37
+ raise ValueError("Model is not trained yet. Call fit() first.")
38
+
39
+ self.sio.emit('predict', {
40
+ 'session_id': self.session_id,
41
+ 'X': joblib.dumps(X)
42
+ })
43
+
44
+ result = None
45
+
46
+ @self.sio.on('predictions')
47
+ def on_predictions(data):
48
+ nonlocal result
49
+ result = joblib.loads(data['predictions'])
50
+
51
+ self.sio.wait() # Wait for 'predictions' event
52
+ return result
53
+
54
+ def predict_proba(self, X):
55
+ if self.status != 'trained':
56
+ raise ValueError("Model is not trained yet. Call fit() first.")
57
+
58
+ self.sio.emit('predict_proba', {
59
+ 'session_id': self.session_id,
60
+ 'X': joblib.dumps(X)
61
+ })
62
+
63
+ result = None
64
+
65
+ @self.sio.on('probabilities')
66
+ def on_probabilities(data):
67
+ nonlocal result
68
+ result = joblib.loads(data['probabilities'])
69
+
70
+ self.sio.wait() # Wait for 'probabilities' event
71
+ return result
72
+
73
+ def init(key, server_url='http://localhost:5000'):
74
+ response = requests.post(f'{server_url}/init', json={'key': key})
75
+ if response.status_code != 200:
76
+ raise ValueError(f"Initialization failed: {response.json().get('error', 'Unknown error')}")
77
+ session_id = response.json()['session_id']
78
+ return RemoteModel(session_id, server_url)
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.1
2
+ Name: veox
3
+ Version: 0.1.1
4
+ Summary: A client for the remote machine learning service with sklearn-like API
5
+ Home-page: https://github.com/yourusername/veox-client
6
+ Author: Your Name
7
+ Author-email: your.email@example.com
8
+ License: UNKNOWN
9
+ Platform: UNKNOWN
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.7
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Requires-Python: >=3.7
19
+ Description-Content-Type: text/markdown
20
+
21
+ Veox Client
22
+ Veox Client is a Python package that provides a client for interacting with the Veox remote machine learning service. It offers an sklearn-like API for easy integration into your existing machine learning workflows.
23
+ Installation
24
+ You can install Veox Client using pip:
25
+ Copypip install veox
26
+ Usage
27
+ Here's a basic example of how to use Veox Client:
28
+ pythonCopyimport veox as v
29
+ import numpy as np
30
+ from sklearn.datasets import make_classification
31
+ from sklearn.model_selection import train_test_split
32
+
33
+ # Generate a sample dataset
34
+ X, y = make_classification(n_samples=1000, n_features=20, n_classes=2, random_state=42)
35
+ X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
36
+
37
+ # Initialize the remote model
38
+ model = v.init(key="YOUR_API_KEY", server_url="http://your-server-url:5000")
39
+
40
+ # Train the model
41
+ model.fit(X_train, y_train)
42
+
43
+ # Make predictions
44
+ y_pred = model.predict(X_test)
45
+
46
+ # Get prediction probabilities
47
+ y_prob = model.predict_proba(X_test)
48
+
49
+ # Calculate accuracy
50
+ accuracy = np.mean(y_pred == y_test)
51
+ print(f"Accuracy: {accuracy:.4f}")
52
+ Note
53
+ This package requires access to a running Veox server. Contact your system administrator or the Veox team for server access and API keys.
54
+ License
55
+ This project is licensed under the MIT License - see the LICENSE file for details.
56
+
57
+
@@ -0,0 +1,9 @@
1
+ README.md
2
+ setup.py
3
+ veox/__init__.py
4
+ veox/client.py
5
+ veox.egg-info/PKG-INFO
6
+ veox.egg-info/SOURCES.txt
7
+ veox.egg-info/dependency_links.txt
8
+ veox.egg-info/requires.txt
9
+ veox.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ joblib>=1.0.1
2
+ numpy>=1.19.5
3
+ python-socketio>=5.3.0
4
+ requests>=2.25.1
@@ -0,0 +1 @@
1
+ veox