The Hopsworks Python SDK provides a client library to interact with the Hopsworks Platform, including its Feature Store, Model Registry, and Model Serving capabilities. It allows data scientists and ML engineers to programmatically manage ML artifacts and data. The library is actively maintained, with frequent minor releases (often monthly or bi-monthly) to introduce new features and improvements. The current version is 4.8.1.
pip install hopsworksVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to connect to a Hopsworks instance, retrieve a project, and access its Feature Store using environment variables for sensitive credentials. It includes error handling for common connection issues and accessing a non-existent feature group.
Upgrade `hopsworks` to version 4.6.3 or newer: `pip install --upgrade hopsworks`.
Verify that `HOPSWORKS_HOST` points to your Hopsworks instance URL (e.g., `https://my.hopsworks.ai`) and `HOPSWORKS_API_KEY` contains the correct API key. Ensure no leading/trailing spaces or incorrect characters. When running inside a Hopsworks environment (e.g., a Jupyter notebook on the platform), `login()` without arguments is usually sufficient.
Review the official documentation for schema validation guidelines when writing to feature groups. Upgrade to `hopsworks` 4.7.0 or newer to benefit from improved online schema validation and handling of malformed tags. Ensure your DataFrame schema precisely matches the target feature group schema.
Adhere to the high-level `hopsworks` API for platform interactions and `hsfs` for feature store operations. Consult the latest official documentation for recommended patterns for job orchestration and model deployment.
Double-check the `HOPSWORKS_HOST` value. Ensure your machine has network access to the Hopsworks instance (e.g., VPN, correct DNS). Verify proxy settings if applicable.
Generate a new API key in the Hopsworks UI and ensure it is correctly passed as `api_key_value` to `hopsworks.login()`. Check the project's permissions for the API key.
Verify the feature group name and version. You can list existing feature groups using `fs.get_feature_groups()` or `fs.get_or_create_feature_group(...)` if you intend to create it.
Upgrade your `hopsworks` library to version 4.6.3 or newer to ensure compatibility with both NumPy 1.x and 2.x: `pip install --upgrade hopsworks`.