You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*hopsworks* is the python API for interacting with a Hopsworks cluster. Don't have a Hopsworks cluster just yet? Register an account on [Hopsworks Serverless](https://app.hopsworks.ai/) and get started for free. Once connected to your project, you can:
35
-
- Insert dataframes into the online or offline Store, create training datasets or *serve real-time* feature vectors in the Feature Store via the [Feature Store API](https://github.com/logicalclocks/feature-store-api). Already have data somewhere you want to import, checkout our [Storage Connectors](https://docs.hopsworks.ai/latest/user_guides/fs/storage_connector/) documentation.
36
-
- register ML models in the model registry and *deploy* them via model serving via the [Machine Learning API](https://gitub.com/logicalclocks/machine-learning-api).
37
-
- manage environments, executions, kafka topics and more once you deploy your own Hopsworks cluster, either on-prem or in the cloud. Hopsworks is open-source and has its own [Community Edition](https://github.com/logicalclocks/hopsworks).
39
+
40
+
- Insert dataframes into the online or offline Store, create training datasets or *serve real-time* feature vectors in the Feature Store via the Feature Store API. Already have data somewhere you want to import, checkout our [Storage Connectors](https://docs.hopsworks.ai/latest/user_guides/fs/storage_connector/) documentation.
41
+
- register ML models in the model registry and *deploy* them via model serving via the Machine Learning API.
42
+
- manage environments, executions, kafka topics and more once you deploy your own Hopsworks cluster, either on-prem or in the cloud. Hopsworks is open-source and has its own [Community Edition](https://github.com/logicalclocks/hopsworks).
38
43
39
44
Our [tutorials](https://github.com/logicalclocks/hopsworks-tutorials) cover a wide range of use cases and example of what *you* can build using Hopsworks.
40
45
@@ -43,26 +48,29 @@ Our [tutorials](https://github.com/logicalclocks/hopsworks-tutorials) cover a wi
43
48
Once you created a project on [Hopsworks Serverless](https://app.hopsworks.ai) and created a new [Api Key](https://docs.hopsworks.ai/latest/user_guides/projects/api_key/create_api_key/), just use your favourite virtualenv and package manager to install the library:
44
49
45
50
```bash
46
-
pip install hopsworks
51
+
pip install "hopsworks[python]"
47
52
```
48
53
49
54
Fire up a notebook and connect to your project, you will be prompted to enter your newly created API key:
55
+
50
56
```python
51
57
import hopsworks
52
58
53
59
project = hopsworks.login()
54
60
```
55
61
62
+
### Feature Store API
63
+
56
64
Access the Feature Store of your project to use as a central repository for your feature data. Use *your* favourite data engineering library (pandas, polars, Spark, etc...) to insert data into the Feature Store, create training datasets or serve real-time feature vectors. Want to predict likelyhood of e-scooter accidents in real-time? Here's how you can do it:
Or you can use the Machine Learning API to register models and deploy them for serving:
114
+
The API enables interaction with the Hopsworks Feature Store. It makes creating new features, feature groups and training datasets easy.
115
+
116
+
The API is environment independent and can be used in two modes:
117
+
118
+
- Spark mode: For data engineering jobs that create and write features into the feature store or generate training datasets. It requires a Spark environment such as the one provided in the Hopsworks platform or Databricks. In Spark mode, HSFS provides bindings both for Python and JVM languages.
119
+
120
+
- Python mode: For data science jobs to explore the features available in the feature store, generate training datasets and feed them in a training pipeline. Python mode requires just a Python interpreter and can be used both in Hopsworks from Python Jobs/Jupyter Kernels, Amazon SageMaker or KubeFlow.
121
+
122
+
Scala API is also available, here is a short sample of it:
Or you can use the Machine Learning API to interact with the Hopsworks Model Registry and Model Serving. The API makes it easy to export, manage and deploy models. For example, to register models and deploy them for serving you can do:
135
+
107
136
```python
108
137
mr = project.get_model_registry()
109
138
# or
110
-
ms = project.get_model_serving()
139
+
ms = connection.get_model_serving()
140
+
141
+
# Create a new model:
142
+
model = mr.tensorflow.create_model(name="mnist",
143
+
version=1,
144
+
metrics={"accuracy": 0.94},
145
+
description="mnist model description")
146
+
model.save("/tmp/model_directory") # or /tmp/model_file
Need more inspiration or want to learn more about the Hopsworks platform? Check out our [tutorials](https://github.com/logicalclocks/hopsworks-tutorials).
169
+
Need more inspiration or want to learn more about the Hopsworks platform? Check out our [tutorials](https://github.com/logicalclocks/hopsworks-tutorials).
116
170
117
171
## Documentation
118
172
@@ -124,7 +178,17 @@ For general questions about the usage of Hopsworks and the Feature Store please
124
178
125
179
Please report any issue using [Github issue tracking](https://github.com/logicalclocks/hopsworks-api/issues).
126
180
181
+
### Related to Feautre Store API
182
+
183
+
Please attach the client environment from the output below to your issue, if it is related to Feature Store API:
184
+
185
+
```python
186
+
import hopsworks
187
+
import hsfs
188
+
hopsworks.login().get_feature_store()
189
+
print(hsfs.get_env())
190
+
```
191
+
127
192
## Contributing
128
193
129
194
If you would like to contribute to this library, please see the [Contribution Guidelines](CONTRIBUTING.md).
0 commit comments