diff --git a/hsfs/.github/pull_request_template.md b/.github/pull_request_template.md similarity index 100% rename from hsfs/.github/pull_request_template.md rename to .github/pull_request_template.md diff --git a/hsfs/.github/workflows/java-ut.yml b/.github/workflows/java.yml similarity index 84% rename from hsfs/.github/workflows/java-ut.yml rename to .github/workflows/java.yml index f83f62caf..616a46773 100644 --- a/hsfs/.github/workflows/java-ut.yml +++ b/.github/workflows/java.yml @@ -3,8 +3,8 @@ name: java on: pull_request jobs: - unit_tests_utc: - name: Java Unit Tests + unit_tests: + name: Unit Tests runs-on: ubuntu-latest steps: @@ -17,8 +17,8 @@ jobs: - name: Set up JDK 8 uses: actions/setup-java@v3 with: - java-version: '8' - distribution: 'adopt' + java-version: "8" + distribution: "adopt" - name: Cache local Maven repository uses: actions/cache@v2 @@ -32,8 +32,8 @@ jobs: working-directory: ./java run: mvn clean test - unit_tests_local: - name: Java Unit Tests (Local TZ) + unit_tests_local_tz: + name: Unit Tests (Local TZ) runs-on: ubuntu-latest steps: @@ -46,8 +46,8 @@ jobs: - name: Set up JDK 8 uses: actions/setup-java@v3 with: - java-version: '8' - distribution: 'adopt' + java-version: "8" + distribution: "adopt" - name: Cache local Maven repository uses: actions/cache@v2 diff --git a/.github/workflows/mkdocs-main.yml b/.github/workflows/mkdocs-main.yml index 001f1fad1..e8e14b4ea 100644 --- a/.github/workflows/mkdocs-main.yml +++ b/.github/workflows/mkdocs-main.yml @@ -24,7 +24,24 @@ jobs: run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[dev] - name: generate autodoc - run: python3 auto_doc.py + run: python3 ./python/auto_doc.py + + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('java/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: "8" + distribution: "adopt" + + - name: Build java doc documentation + working-directory: ./java + run: mvn clean install javadoc:javadoc javadoc:aggregate -DskipTests && cp -r target/site/apidocs ../docs/javadoc - name: setup git run: | diff --git a/.github/workflows/mkdocs-release.yml b/.github/workflows/mkdocs-release.yml index e2b4b2b3f..f1c6bb814 100644 --- a/.github/workflows/mkdocs-release.yml +++ b/.github/workflows/mkdocs-release.yml @@ -2,7 +2,7 @@ name: mkdocs-release on: push: - branches: [branch-*\.*] + branches: [branch-*] jobs: publish-release: @@ -29,7 +29,25 @@ jobs: run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[dev] - name: generate autodoc - run: python3 auto_doc.py + run: python3 ./python/auto_doc.py + + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('java/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: "8" + distribution: "adopt" + + - name: Build java doc documentation + working-directory: ./java + run: + mvn clean install javadoc:javadoc javadoc:aggregate -DskipTests && cp -r target/site/apidocs ../docs/javadoc - name: setup git run: | diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml deleted file mode 100644 index 156847faf..000000000 --- a/.github/workflows/python-lint.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: python - -on: pull_request - -env: - APP_API_KEY: ${{ secrets.APP_API_KEY }} - -jobs: - lint_stylecheck: - name: Lint and Stylecheck - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Get all changed files - id: get-changed-files - uses: tj-actions/changed-files@v44 - with: - files_yaml: | - src: - - 'python/**/*.py' - - '!python/tests/**/*.py' - test: - - 'python/tests/**/*.py' - - - name: install deps - run: pip install ruff==0.4.2 - - - name: ruff on python files - if: steps.get-changed-files.outputs.src_any_changed == 'true' - env: - SRC_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.src_all_changed_files }} - run: ruff check --output-format=github $SRC_ALL_CHANGED_FILES - - - name: ruff on test files - if: steps.get-changed-files.outputs.test_any_changed == 'true' - env: - TEST_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.test_all_changed_files }} - run: ruff check --output-format=github $TEST_ALL_CHANGED_FILES - - - name: ruff format --check $ALL_CHANGED_FILES - env: - ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.all_changed_files }} - run: ruff format $ALL_CHANGED_FILES \ No newline at end of file diff --git a/hsfs/.github/workflows/python-lint.yml b/.github/workflows/python.yml similarity index 78% rename from hsfs/.github/workflows/python-lint.yml rename to .github/workflows/python.yml index f638b0128..0c5f12c32 100644 --- a/hsfs/.github/workflows/python-lint.yml +++ b/.github/workflows/python.yml @@ -2,6 +2,10 @@ name: python on: pull_request +env: + APP_API_KEY: ${{ secrets.APP_API_KEY }} + ENABLE_HOPSWORKS_USAGE: "false" + jobs: lint_stylecheck: name: Lint and Stylecheck @@ -31,22 +35,25 @@ jobs: - name: ruff on python files if: steps.get-changed-files.outputs.src_any_changed == 'true' env: - SRC_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.src_all_changed_files }} + SRC_ALL_CHANGED_FILES: + ${{ steps.get-changed-files.outputs.src_all_changed_files }} run: ruff check --output-format=github $SRC_ALL_CHANGED_FILES - name: ruff on test files if: steps.get-changed-files.outputs.test_any_changed == 'true' env: - TEST_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.test_all_changed_files }} + TEST_ALL_CHANGED_FILES: + ${{ steps.get-changed-files.outputs.test_all_changed_files }} run: ruff check --output-format=github $TEST_ALL_CHANGED_FILES - name: ruff format --check $ALL_CHANGED_FILES env: - ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.all_changed_files }} + ALL_CHANGED_FILES: + ${{ steps.get-changed-files.outputs.all_changed_files }} run: ruff format $ALL_CHANGED_FILES - unit_tests_ubuntu_utc: - name: Unit Testing (Ubuntu) + unit_tests: + name: Unit Tests needs: lint_stylecheck runs-on: ubuntu-latest strategy: @@ -73,12 +80,34 @@ jobs: run: python --version - name: Run Pytest suite - env: - ENABLE_HOPSWORKS_USAGE: "false" run: pytest python/tests - unit_tests_ubuntu_pandas: - name: Unit Testing (Ubuntu) (Pandas 1.x) + unit_tests_no_opt: + name: Unit Tests (No Optional Dependencies) + needs: lint_stylecheck + runs-on: ubuntu-latest + + steps: + - name: Set Timezone + run: sudo timedatectl set-timezone UTC + + - uses: actions/checkout@v4 + - name: Copy README + run: cp README.md python/ + + - uses: actions/setup-python@v5 + name: Setup Python + with: + python-version: "3.10" + cache: "pip" + cache-dependency-path: "python/setup.py" + - run: pip install -e python[python,dev-no-opt] + + - name: Run Pytest suite + run: pytest python/tests + + unit_tests_pandas1: + name: Unit Tests (Pandas 1.x) needs: lint_stylecheck runs-on: ubuntu-latest @@ -102,12 +131,10 @@ jobs: run: python --version - name: Run Pytest suite - env: - ENABLE_HOPSWORKS_USAGE: "false" run: pytest python/tests - unit_tests_ubuntu_local: - name: Unit Testing (Ubuntu) (Local TZ) + unit_tests_local_tz: + name: Unit Tests (Local TZ) needs: lint_stylecheck runs-on: ubuntu-latest @@ -131,12 +158,10 @@ jobs: run: python --version - name: Run Pytest suite - env: - ENABLE_HOPSWORKS_USAGE: "false" run: pytest python/tests - unit_tests_ubuntu_typechecked: - name: Typechecked Unit Testing (Ubuntu) + unit_tests_typechecked: + name: Unit Tests (Typechecked) needs: lint_stylecheck runs-on: ubuntu-latest @@ -155,13 +180,12 @@ jobs: - name: Run Pytest suite env: - ENABLE_HOPSWORKS_USAGE: "false" HOPSWORKS_RUN_WITH_TYPECHECK: "true" run: pytest python/tests continue-on-error: true - unit_tests_windows_utc: - name: Unit Testing (Windows) + unit_tests_windows: + name: Unit Tests (Windows) needs: lint_stylecheck runs-on: windows-latest @@ -185,12 +209,10 @@ jobs: run: python --version - name: Run Pytest suite - env: - ENABLE_HOPSWORKS_USAGE: "false" run: pytest python/tests - unit_tests_windows_local: - name: Unit Testing (Windows) (Local TZ) + unit_tests_windows_local_tz: + name: Unit Tests (Windows) (Local TZ) needs: lint_stylecheck runs-on: windows-latest @@ -217,6 +239,4 @@ jobs: run: pip freeze - name: Run Pytest suite - env: - ENABLE_HOPSWORKS_USAGE: "false" run: pytest python/tests diff --git a/.gitignore b/.gitignore index 6e96d8144..1581db87d 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,8 @@ coverage.xml .hypothesis/ .pytest_cache/ .ruff_cache/ +bigquery.json +metastore_db/ # Translations *.mo @@ -71,6 +73,9 @@ instance/ # Sphinx documentation docs/_build/ +# Mike Javadoc +docs/javadoc + # PyBuilder target/ @@ -128,3 +133,9 @@ target/ # mkdocs intemediate files docs/generated + +docs/CONTRIBUTING.md +docs/index.md + +# Test artifacts +keyFile.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 564734d53..e2801b11b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,16 +1,17 @@ ## Python development setup + --- - Fork and clone the repository -- Create a new Python environment with your favourite environment manager, e.g. virtualenv or conda +- Create a new Python environment with your favourite environment manager (e.g. virtualenv or conda) and Python 3.9 (newer versions will return a library conflict in `auto_doc.py`) - Install repository in editable mode with development dependencies: - ```bash - cd python - pip install -e ".[dev]" - ``` + ```bash + cd python + pip install -e ".[dev]" + ``` - Install [pre-commit](https://pre-commit.com/) and then activate its hooks. pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. The library uses pre-commit to ensure code-style and code formatting through [ruff](https://docs.astral.sh/ruff/). Run the following commands from the `python` directory: @@ -37,75 +38,67 @@ We follow a few best practices for writing the Python documentation: 1. Use the google docstring style: - ```python - """[One Line Summary] + ```python + """[One Line Summary] - [Extended Summary] + [Extended Summary] - [!!! example - import xyz - ] + [!!! example + import xyz + ] - # Arguments - arg1: Type[, optional]. Description[, defaults to `default`] - arg2: Type[, optional]. Description[, defaults to `default`] + # Arguments + arg1: Type[, optional]. Description[, defaults to `default`] + arg2: Type[, optional]. Description[, defaults to `default`] - # Returns - Type. Description. + # Returns + Type. Description. - # Raises - Exception. Description. - """ - ``` - - If Python 3 type annotations are used, they are inserted automatically. + # Raises + Exception. Description. + """ + ``` + If Python 3 type annotations are used, they are inserted automatically. 2. Hopsworks entity engine methods (e.g. ExecutionEngine etc.) only require a single line docstring. -3. Private REST Api implementations (e.g. GitRemoteApi etc.) should be fully documented with docstrings without defaults. -4. Public Api such as metadata objects and public REST Api implementations should be fully documented with defaults. +3. Private REST API implementations (e.g. FeatureGroupApi etc.) should be fully documented with docstrings without defaults. +4. Public API such as metadata objects and public REST API implementations should be fully documented with defaults. #### Setup and Build Documentation We use `mkdocs` together with `mike` ([for versioning](https://github.com/jimporter/mike/)) to build the documentation and a plugin called `keras-autodoc` to auto generate Python API documentation from docstrings. **Background about `mike`:** - `mike` builds the documentation and commits it as a new directory to the gh-pages branch. Each directory corresponds to one version of the documentation. Additionally, `mike` maintains a json in the root of gh-pages with the mappings of versions/aliases for each of the directories available. With aliases you can define extra names like `dev` or `latest`, to indicate stable and unstable releases. +`mike` builds the documentation and commits it as a new directory to the gh-pages branch. Each directory corresponds to one version of the documentation. Additionally, `mike` maintains a json in the root of gh-pages with the mappings of versions/aliases for each of the directories available. With aliases you can define extra names like `dev` or `latest`, to indicate stable and unstable releases. -1. Currently we are using our own version of `keras-autodoc` +1. Install Hopsworks with `dev-docs` extras: - ```bash - pip install git+https://github.com/logicalclocks/keras-autodoc - ``` + ```bash + pip install -e ".[dev-docs]" + ``` -2. Install HOPSWORKS with `docs` extras: - - ```bash - pip install -e .[dev,docs] - ``` +2. To build the docs, first run the auto doc script: -3. To build the docs, first run the auto doc script: - - ```bash - cd .. - python auto_doc.py - ``` + ```bash + python auto_doc.py + ``` ##### Option 1: Build only current version of docs -4. Either build the docs, or serve them dynamically: +3. Either build the docs, or serve them dynamically: - Note: Links and pictures might not resolve properly later on when checking with this build. - The reason for that is that the docs are deployed with versioning on docs.hopsworks.ai and - therefore another level is added to all paths, e.g. `docs.hopsworks.ai/[version-or-alias]`. - Using relative links should not be affected by this, however, building the docs with version - (Option 2) is recommended. + Note: Links and pictures might not resolve properly later on when checking with this build. + The reason for that is that the docs are deployed with versioning on docs.hopsworks.ai and + therefore another level is added to all paths, e.g. `docs.hopsworks.ai/[version-or-alias]`. + Using relative links should not be affected by this, however, building the docs with version + (Option 2) is recommended. - ```bash - mkdocs build - # or - mkdocs serve - ``` + ```bash + mkdocs build + # or + mkdocs serve + ``` ##### Option 2 (Preferred): Build multi-version doc with `mike` @@ -113,34 +106,36 @@ We use `mkdocs` together with `mike` ([for versioning](https://github.com/jimpor On docs.hopsworks.ai we implement the following versioning scheme: -- current master branches (e.g. of hopsworks corresponding to master of Hopsworks): rendered as current Hopsworks snapshot version, e.g. **3.1.0-SNAPSHOT [dev]**, where `dev` is an alias to indicate that this is an unstable version. -- the latest release: rendered with full current version, e.g. **3.0.1 [latest]** with `latest` alias to indicate that this is the latest stable release. -- previous stable releases: rendered without alias, e.g. **3.0.0**. +- current master branches (e.g. of hopsworks corresponding to master of Hopsworks): rendered as current Hopsworks snapshot version, e.g. **4.0.0-SNAPSHOT [dev]**, where `dev` is an alias to indicate that this is an unstable version. +- the latest release: rendered with full current version, e.g. **3.8.0 [latest]** with `latest` alias to indicate that this is the latest stable release. +- previous stable releases: rendered without alias, e.g. **3.4.4**. ###### Build Instructions -4. For this you can either checkout and make a local copy of the `upstream/gh-pages` branch, where -`mike` maintains the current state of docs.hopsworks.ai, or just build documentation for the branch you are updating: +4. For this you can either checkout and make a local copy of the `upstream/gh-pages` branch, where `mike` maintains the current state of docs.hopsworks.ai, or just build documentation for the branch you are updating: Building *one* branch: Checkout your dev branch with modified docs: + ```bash git checkout [dev-branch] ``` Generate API docs if necessary: + ```bash python auto_doc.py ``` Build docs with a version and alias + ```bash mike deploy [version] [alias] --update-alias # for example, if you are updating documentation to be merged to master, # which will become the new SNAPSHOT version: - mike deploy 3.1.0-SNAPSHOT dev --update-alias + mike deploy 4.0.0-SNAPSHOT dev --update-alias # if you are updating docs of the latest stable release branch mike deploy [version] latest --update-alias @@ -158,17 +153,20 @@ On docs.hopsworks.ai we implement the following versioning scheme: ``` You can now checkout the gh-pages branch and serve: + ```bash git checkout gh-pages mike serve ``` You can also list all available versions/aliases: + ```bash mike list ``` Delete and reset your local gh-pages branch: + ```bash mike delete --all @@ -194,7 +192,7 @@ PAGES = { Now you can add a template markdown file to the `docs/templates` directory with the name you specified in the auto-doc script. The `new_template.md` file should contain a tag to identify the place at which the API documentation should be inserted: -``` +```` ## The XYZ package {{module}} @@ -207,7 +205,7 @@ Some extra content here. ``` {{xyz.asd}} -``` +```` Finally, run the `auto_doc.py` script, as decribed above, to update the documentation. diff --git a/hsfs/Dockerfile b/Dockerfile similarity index 100% rename from hsfs/Dockerfile rename to Dockerfile diff --git a/README.md b/README.md index 162c95f97..e523c059d 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ src="https://img.shields.io/pypi/v/hopsworks?color=blue" alt="PyPiStatus" /> + Scala/Java Artifacts Downloads *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: - - 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. - - 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). - - 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). + +- 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. +- register ML models in the model registry and *deploy* them via model serving via the Machine Learning API. +- 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). Our [tutorials](https://github.com/logicalclocks/hopsworks-tutorials) cover a wide range of use cases and example of what *you* can build using Hopsworks. @@ -43,16 +48,19 @@ Our [tutorials](https://github.com/logicalclocks/hopsworks-tutorials) cover a wi 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: ```bash -pip install hopsworks +pip install "hopsworks[python]" ``` Fire up a notebook and connect to your project, you will be prompted to enter your newly created API key: + ```python import hopsworks project = hopsworks.login() ``` +### Feature Store API + 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: ```python @@ -60,9 +68,9 @@ fs = project.get_feature_store() # Write to Feature Groups bike_ride_fg = fs.get_or_create_feature_group( - name="bike_rides", - version=1, - primary_key=["ride_id"], + name="bike_rides", + version=1, + primary_key=["ride_id"], event_time="activation_time", online_enabled=True, ) @@ -73,13 +81,13 @@ fg.insert(bike_rides_df) profile_fg = fs.get_feature_group("user_profile", version=1) bike_ride_fv = fs.get_or_create_feature_view( - name="bike_rides_view", - version=1, + name="bike_rides_view", + version=1, query=bike_ride_fg.select_except(["ride_id"]).join(profile_fg.select(["age", "has_license"]), on="user_id") ) bike_rides_Q1_2021_df = bike_ride_fv.get_batch_data( - start_date="2021-01-01", + start_date="2021-01-01", end_date="2021-01-31" ) @@ -97,22 +105,68 @@ bike_ride_fv.init_serving() while True: new_ride_vector = poll_ride_queue() feature_vector = bike_ride_fv.get_online_feature_vector( - {"user_id": new_ride_vector["user_id"]}, + {"user_id": new_ride_vector["user_id"]}, passed_features=new_ride_vector ) accident_probability = model.predict(feature_vector) ``` -Or you can use the Machine Learning API to register models and deploy them for serving: +The API enables interaction with the Hopsworks Feature Store. It makes creating new features, feature groups and training datasets easy. + +The API is environment independent and can be used in two modes: + +- 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. + +- 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. + +Scala API is also available, here is a short sample of it: + +```scala +import com.logicalclocks.hsfs._ +val connection = HopsworksConnection.builder().build() +val fs = connection.getFeatureStore(); +val attendances_features_fg = fs.getFeatureGroup("games_features", 1); +attendances_features_fg.show(1) +``` + +### Machine Learning API + +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: + ```python mr = project.get_model_registry() # or -ms = project.get_model_serving() +ms = connection.get_model_serving() + +# Create a new model: +model = mr.tensorflow.create_model(name="mnist", + version=1, + metrics={"accuracy": 0.94}, + description="mnist model description") +model.save("/tmp/model_directory") # or /tmp/model_file + +# Download a model: +model = mr.get_model("mnist", version=1) +model_path = model.download() + +# Delete the model: +model.delete() + +# Get the best-performing model +best_model = mr.get_best_model('mnist', 'accuracy', 'max') + +# Deploy the model: +deployment = model.deploy() +deployment.start() + +# Make predictions with a deployed model +data = { "instances": [ model.input_example ] } +predictions = deployment.predict(data) ``` ## Tutorials -Need more inspiration or want to learn more about the Hopsworks platform? Check out our [tutorials](https://github.com/logicalclocks/hopsworks-tutorials). +Need more inspiration or want to learn more about the Hopsworks platform? Check out our [tutorials](https://github.com/logicalclocks/hopsworks-tutorials). ## Documentation @@ -124,7 +178,17 @@ For general questions about the usage of Hopsworks and the Feature Store please Please report any issue using [Github issue tracking](https://github.com/logicalclocks/hopsworks-api/issues). +### Related to Feautre Store API + +Please attach the client environment from the output below to your issue, if it is related to Feature Store API: + +```python +import hopsworks +import hsfs +hopsworks.login().get_feature_store() +print(hsfs.get_env()) +``` + ## Contributing If you would like to contribute to this library, please see the [Contribution Guidelines](CONTRIBUTING.md). - diff --git a/auto_doc.py b/auto_doc.py deleted file mode 100644 index 1fd5b40f8..000000000 --- a/auto_doc.py +++ /dev/null @@ -1,215 +0,0 @@ -# -# Copyright 2022 Logical Clocks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import os -import pathlib -import shutil - -import keras_autodoc - -PAGES = { - "api/login.md": { - "login": ["hopsworks.login"], - "get_current_project": ["hopsworks.get_current_project"], - "fs_api": ["hopsworks.project.Project.get_feature_store"], - "mr_api": ["hopsworks.project.Project.get_model_registry"], - "ms_api": ["hopsworks.project.Project.get_model_serving"], - }, - "api/udf.md": { - "udf": ["hopsworks.udf"], - }, - "api/connection.md": { - "connection_create": ["hopsworks.connection.Connection.connection"], - "connection_properties": keras_autodoc.get_properties( - "hopsworks.connection.Connection" - ), - "connection_methods": keras_autodoc.get_methods( - "hopsworks.connection.Connection", exclude=["from_response_json", "json"] - ), - }, - "api/projects.md": { - "project_create": ["hopsworks.create_project"], - "project_properties": keras_autodoc.get_properties("hopsworks.project.Project"), - "project_methods": keras_autodoc.get_methods( - "hopsworks.project.Project", exclude=["from_response_json", "json"] - ), - }, - "api/jobs.md": { - "job_api_handle": ["hopsworks.project.Project.get_jobs_api"], - "job_create": ["hopsworks.core.job_api.JobsApi.create_job"], - "job_get": ["hopsworks.core.job_api.JobsApi.get_job"], - "job_get_all": ["hopsworks.core.job_api.JobsApi.get_jobs"], - "job_properties": keras_autodoc.get_properties("hopsworks.job.Job"), - "job_config": ["hopsworks.core.job_api.JobsApi.get_configuration"], - "job_methods": keras_autodoc.get_methods( - "hopsworks.job.Job", exclude=["from_response_json", "json"] - ), - }, - "api/executions.md": { - "execution_create": ["hopsworks.job.Job.run"], - "execution_get": ["hopsworks.job.Job.get_executions"], - "execution_properties": keras_autodoc.get_properties( - "hopsworks.execution.Execution" - ), - "execution_methods": keras_autodoc.get_methods( - "hopsworks.execution.Execution", - exclude=["from_response_json", "json", "update_from_response_json"], - ), - }, - "api/flink_cluster.md": { - "flink_api_handle": ["hopsworks.project.Project.get_flink_cluster_api"], - "setup_cluster": [ - "hopsworks.core.flink_cluster_api.FlinkClusterApi.setup_cluster" - ], - "get_cluster": ["hopsworks.core.flink_cluster_api.FlinkClusterApi.get_cluster"], - "start_cluster": ["hopsworks.flink_cluster.FlinkCluster.start"], - "submit_job_to_cluster": ["hopsworks.flink_cluster.FlinkCluster.submit_job"], - "flink_cluster_properties": keras_autodoc.get_properties( - "hopsworks.flink_cluster.FlinkCluster" - ), - "flink_cluster_methods": keras_autodoc.get_methods( - "hopsworks.flink_cluster.FlinkCluster", - exclude=["from_response_json", "json"], - ), - }, - "api/environment.md": { - "env_api_handle": ["hopsworks.project.Project.get_environment_api"], - "env_create": [ - "hopsworks.core.environment_api.EnvironmentApi.create_environment" - ], - "env_get": ["hopsworks.core.environment_api.EnvironmentApi.get_environment"], - "env_methods": keras_autodoc.get_methods( - "hopsworks.environment.Environment", exclude=["from_response_json", "json"] - ), - }, - "api/git_repo.md": { - "git_api_handle": ["hopsworks.project.Project.get_git_api"], - "git_repo_clone": ["hopsworks.core.git_api.GitApi.clone"], - "git_repo_get": ["hopsworks.core.git_api.GitApi.get_repo"], - "git_repo_get_all": ["hopsworks.core.git_api.GitApi.get_repos"], - "git_repo_properties": keras_autodoc.get_properties( - "hopsworks.git_repo.GitRepo" - ), - "git_repo_methods": keras_autodoc.get_methods( - "hopsworks.git_repo.GitRepo", exclude=["from_response_json", "json"] - ), - }, - "api/git_provider.md": { - "git_api_handle": ["hopsworks.project.Project.get_git_api"], - "git_provider_create": ["hopsworks.core.git_api.GitApi.set_provider"], - "git_provider_get": ["hopsworks.core.git_api.GitApi.get_provider"], - "git_provider_get_all": ["hopsworks.core.git_api.GitApi.get_providers"], - "git_provider_properties": keras_autodoc.get_properties( - "hopsworks.git_provider.GitProvider" - ), - "git_provider_methods": keras_autodoc.get_methods( - "hopsworks.git_provider.GitProvider", exclude=["from_response_json", "json"] - ), - }, - "api/git_remote.md": { - "git_api_handle": ["hopsworks.project.Project.get_git_api"], - "git_remote_create": ["hopsworks.git_repo.GitRepo.add_remote"], - "git_remote_get": ["hopsworks.git_repo.GitRepo.get_remote"], - "git_remote_get_all": ["hopsworks.git_repo.GitRepo.get_remotes"], - "git_remote_properties": keras_autodoc.get_properties( - "hopsworks.git_remote.GitRemote" - ), - "git_remote_methods": keras_autodoc.get_methods( - "hopsworks.git_remote.GitRemote", exclude=["from_response_json", "json"] - ), - }, - "api/datasets.md": { - "dataset_api_handle": ["hopsworks.project.Project.get_dataset_api"], - "dataset_methods": keras_autodoc.get_methods( - "hopsworks.core.dataset_api.DatasetApi" - ), - }, - "api/kafka_topic.md": { - "kafka_api_handle": ["hopsworks.project.Project.get_kafka_api"], - "kafka_config": ["hopsworks.core.kafka_api.KafkaApi.get_default_config"], - "kafka_topic_create": ["hopsworks.core.kafka_api.KafkaApi.create_topic"], - "kafka_topic_get": ["hopsworks.core.kafka_api.KafkaApi.get_topic"], - "kafka_topic_get_all": ["hopsworks.core.kafka_api.KafkaApi.get_topics"], - "kafka_topic_properties": keras_autodoc.get_properties( - "hopsworks.kafka_topic.KafkaTopic" - ), - "kafka_topic_methods": keras_autodoc.get_methods( - "hopsworks.kafka_topic.KafkaTopic", - exclude=["from_response_json", "json", "update_from_response_json"], - ), - }, - "api/kafka_schema.md": { - "kafka_api_handle": ["hopsworks.project.Project.get_kafka_api"], - "kafka_schema_create": ["hopsworks.core.kafka_api.KafkaApi.create_schema"], - "kafka_schema_get": ["hopsworks.core.kafka_api.KafkaApi.get_schema"], - "kafka_schema_get_all": ["hopsworks.core.kafka_api.KafkaApi.get_schemas"], - "kafka_schema_get_subjects": ["hopsworks.core.kafka_api.KafkaApi.get_subjects"], - "kafka_schema_properties": keras_autodoc.get_properties( - "hopsworks.kafka_schema.KafkaSchema" - ), - "kafka_schema_methods": keras_autodoc.get_methods( - "hopsworks.kafka_schema.KafkaSchema", - exclude=["from_response_json", "json", "update_from_response_json"], - ), - }, - "api/secrets.md": { - "secret_api_handle": ["hopsworks.get_secrets_api"], - "secret_create": ["hopsworks.core.secret_api.SecretsApi.create_secret"], - "secret_get": ["hopsworks.core.secret_api.SecretsApi.get_secret"], - "secret_get_simplified": ["hopsworks.core.secret_api.SecretsApi.get"], - "secret_get_all": ["hopsworks.core.secret_api.SecretsApi.get_secrets"], - "secret_properties": keras_autodoc.get_properties("hopsworks.secret.Secret"), - "secret_methods": keras_autodoc.get_methods( - "hopsworks.secret.Secret", exclude=["from_response_json", "json"] - ), - }, - "api/opensearch.md": { - "opensearch_api_handle": ["hopsworks.project.Project.get_opensearch_api"], - "opensearch_methods": keras_autodoc.get_methods( - "hopsworks.core.opensearch_api.OpenSearchApi" - ), - }, -} - -hw_dir = pathlib.Path(__file__).resolve().parents[0] -if "GITHUB_SHA" in os.environ: - commit_sha = os.environ["GITHUB_SHA"] - project_url = ( - f"https://github.com/logicalclocks/feature-store-api/tree/{commit_sha}/python" - ) -else: - branch_name = os.environ.get("GITHUB_BASE_REF", "master") - project_url = ( - f"https://github.com/logicalclocks/feature-store-api/blob/{branch_name}/python" - ) - - -def generate(dest_dir): - doc_generator = keras_autodoc.DocumentationGenerator( - PAGES, - project_url=project_url, - template_dir="./docs/templates", - titles_size="###", - extra_aliases={}, - max_signature_line_length=100, - ) - shutil.copyfile(hw_dir / "CONTRIBUTING.md", dest_dir / "CONTRIBUTING.md") - shutil.copyfile(hw_dir / "README.md", dest_dir / "index.md") - - doc_generator.generate(dest_dir / "generated") - - -if __name__ == "__main__": - generate(hw_dir / "docs") diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md deleted file mode 100644 index b97326e6f..000000000 --- a/docs/CONTRIBUTING.md +++ /dev/null @@ -1,215 +0,0 @@ -## Python development setup ---- - -- Fork and clone the repository - -- Create a new Python environment with your favourite environment manager, e.g. virtualenv or conda - -- Install repository in editable mode with development dependencies: - - ```bash - cd python - pip install -e ".[dev]" - ``` - -- Install [pre-commit](https://pre-commit.com/) and then activate its hooks. pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. The Feature Store uses pre-commit to ensure code-style and code formatting through [ruff](https://docs.astral.sh/ruff/). Run the following commands from the `python` directory: - - ```bash - cd python - pip install --user pre-commit - pre-commit install - ``` - - Afterwards, pre-commit will run whenever you commit. - -- To run formatting and code-style separately, you can configure your IDE, such as VSCode, to use `ruff`, or run it via the command line: - - ```bash - # linting - ruff check python --fix - # formatting - ruff format python - ``` - -### Python documentation - -We follow a few best practices for writing the Python documentation: - -1. Use the google docstring style: - - ```python - """[One Line Summary] - - [Extended Summary] - - [!!! example - import xyz - ] - - # Arguments - arg1: Type[, optional]. Description[, defaults to `default`] - arg2: Type[, optional]. Description[, defaults to `default`] - - # Returns - Type. Description. - - # Raises - Exception. Description. - """ - ``` - - If Python 3 type annotations are used, they are inserted automatically. - - -2. Hopsworks entity engine methods (e.g. ExecutionEngine etc.) only require a single line docstring. -3. Private REST Api implementations (e.g. GitRemoteApi etc.) should be fully documented with docstrings without defaults. -4. Public Api such as metadata objects and public REST Api implementations should be fully documented with defaults. - -#### Setup and Build Documentation - -We use `mkdocs` together with `mike` ([for versioning](https://github.com/jimporter/mike/)) to build the documentation and a plugin called `keras-autodoc` to auto generate Python API documentation from docstrings. - -**Background about `mike`:** - `mike` builds the documentation and commits it as a new directory to the gh-pages branch. Each directory corresponds to one version of the documentation. Additionally, `mike` maintains a json in the root of gh-pages with the mappings of versions/aliases for each of the directories available. With aliases you can define extra names like `dev` or `latest`, to indicate stable and unstable releases. - -1. Currently we are using our own version of `keras-autodoc` - - ```bash - pip install git+https://github.com/logicalclocks/keras-autodoc - ``` - -2. Install HOPSWORKS with `docs` extras: - - ```bash - pip install -e .[dev,docs] - ``` - -3. To build the docs, first run the auto doc script: - - ```bash - cd .. - python auto_doc.py - ``` - -##### Option 1: Build only current version of docs - -4. Either build the docs, or serve them dynamically: - - Note: Links and pictures might not resolve properly later on when checking with this build. - The reason for that is that the docs are deployed with versioning on docs.hopsworks.ai and - therefore another level is added to all paths, e.g. `docs.hopsworks.ai/[version-or-alias]`. - Using relative links should not be affected by this, however, building the docs with version - (Option 2) is recommended. - - ```bash - mkdocs build - # or - mkdocs serve - ``` - -##### Option 2 (Preferred): Build multi-version doc with `mike` - -###### Versioning on docs.hopsworks.ai - -On docs.hopsworks.ai we implement the following versioning scheme: - -- current master branches (e.g. of hopsworks corresponding to master of Hopsworks): rendered as current Hopsworks snapshot version, e.g. **3.1.0-SNAPSHOT [dev]**, where `dev` is an alias to indicate that this is an unstable version. -- the latest release: rendered with full current version, e.g. **3.0.1 [latest]** with `latest` alias to indicate that this is the latest stable release. -- previous stable releases: rendered without alias, e.g. **3.0.0**. - -###### Build Instructions - -4. For this you can either checkout and make a local copy of the `upstream/gh-pages` branch, where -`mike` maintains the current state of docs.hopsworks.ai, or just build documentation for the branch you are updating: - - Building *one* branch: - - Checkout your dev branch with modified docs: - ```bash - git checkout [dev-branch] - ``` - - Generate API docs if necessary: - ```bash - python auto_doc.py - ``` - - Build docs with a version and alias - ```bash - mike deploy [version] [alias] --update-alias - - # for example, if you are updating documentation to be merged to master, - # which will become the new SNAPSHOT version: - mike deploy 3.1.0-SNAPSHOT dev --update-alias - - # if you are updating docs of the latest stable release branch - mike deploy [version] latest --update-alias - - # if you are updating docs of a previous stable release branch - mike deploy [version] - ``` - - If no gh-pages branch existed in your local repository, this will have created it. - - **Important**: If no previous docs were built, you will have to choose a version as default to be loaded as index, as follows - - ```bash - mike set-default [version-or-alias] - ``` - - You can now checkout the gh-pages branch and serve: - ```bash - git checkout gh-pages - mike serve - ``` - - You can also list all available versions/aliases: - ```bash - mike list - ``` - - Delete and reset your local gh-pages branch: - ```bash - mike delete --all - - # or delete single version - mike delete [version-or-alias] - ``` - -#### Adding new API documentation - -To add new documentation for APIs, you need to add information about the method/class to document to the `auto_doc.py` script: - -```python -PAGES = { - "connection.md": [ - "hopsworks.connection.Connection.connection" - ] - "new_template.md": [ - "module", - "xyz.asd" - ] -} -``` - -Now you can add a template markdown file to the `docs/templates` directory with the name you specified in the auto-doc script. The `new_template.md` file should contain a tag to identify the place at which the API documentation should be inserted: - -``` -## The XYZ package - -{{module}} - -Some extra content here. - -!!! example - ```python - import xyz - ``` - -{{xyz.asd}} -``` - -Finally, run the `auto_doc.py` script, as decribed above, to update the documentation. - -For information about Markdown syntax and possible Admonitions/Highlighting etc. see -the [Material for Mkdocs themes reference documentation](https://squidfunk.github.io/mkdocs-material/reference/abbreviations/). diff --git a/hsfs/docs/assets/images/hopsworks-logo.png b/docs/assets/images/hopsworks-logo.png similarity index 100% rename from hsfs/docs/assets/images/hopsworks-logo.png rename to docs/assets/images/hopsworks-logo.png diff --git a/hsfs/docs/templates/api/connection_api.md b/docs/templates/api/connection_api.md similarity index 100% rename from hsfs/docs/templates/api/connection_api.md rename to docs/templates/api/connection_api.md diff --git a/hsfs/docs/templates/api/embedding_feature_api.md b/docs/templates/api/embedding_feature_api.md similarity index 100% rename from hsfs/docs/templates/api/embedding_feature_api.md rename to docs/templates/api/embedding_feature_api.md diff --git a/hsfs/docs/templates/api/embedding_index_api.md b/docs/templates/api/embedding_index_api.md similarity index 100% rename from hsfs/docs/templates/api/embedding_index_api.md rename to docs/templates/api/embedding_index_api.md diff --git a/hsfs/docs/templates/api/expectation_api.md b/docs/templates/api/expectation_api.md similarity index 100% rename from hsfs/docs/templates/api/expectation_api.md rename to docs/templates/api/expectation_api.md diff --git a/hsfs/docs/templates/api/expectation_suite_api.md b/docs/templates/api/expectation_suite_api.md similarity index 100% rename from hsfs/docs/templates/api/expectation_suite_api.md rename to docs/templates/api/expectation_suite_api.md diff --git a/hsfs/docs/templates/api/external_feature_group_api.md b/docs/templates/api/external_feature_group_api.md similarity index 100% rename from hsfs/docs/templates/api/external_feature_group_api.md rename to docs/templates/api/external_feature_group_api.md diff --git a/hsfs/docs/templates/api/feature_api.md b/docs/templates/api/feature_api.md similarity index 100% rename from hsfs/docs/templates/api/feature_api.md rename to docs/templates/api/feature_api.md diff --git a/hsfs/docs/templates/api/feature_descriptive_statistics_api.md b/docs/templates/api/feature_descriptive_statistics_api.md similarity index 100% rename from hsfs/docs/templates/api/feature_descriptive_statistics_api.md rename to docs/templates/api/feature_descriptive_statistics_api.md diff --git a/hsfs/docs/templates/api/feature_group_api.md b/docs/templates/api/feature_group_api.md similarity index 100% rename from hsfs/docs/templates/api/feature_group_api.md rename to docs/templates/api/feature_group_api.md diff --git a/hsfs/docs/templates/api/feature_monitoring_config_api.md b/docs/templates/api/feature_monitoring_config_api.md similarity index 100% rename from hsfs/docs/templates/api/feature_monitoring_config_api.md rename to docs/templates/api/feature_monitoring_config_api.md diff --git a/hsfs/docs/templates/api/feature_monitoring_result_api.md b/docs/templates/api/feature_monitoring_result_api.md similarity index 100% rename from hsfs/docs/templates/api/feature_monitoring_result_api.md rename to docs/templates/api/feature_monitoring_result_api.md diff --git a/hsfs/docs/templates/api/feature_monitoring_window_config_api.md b/docs/templates/api/feature_monitoring_window_config_api.md similarity index 100% rename from hsfs/docs/templates/api/feature_monitoring_window_config_api.md rename to docs/templates/api/feature_monitoring_window_config_api.md diff --git a/hsfs/docs/templates/api/feature_store_api.md b/docs/templates/api/feature_store_api.md similarity index 100% rename from hsfs/docs/templates/api/feature_store_api.md rename to docs/templates/api/feature_store_api.md diff --git a/hsfs/docs/templates/api/feature_view_api.md b/docs/templates/api/feature_view_api.md similarity index 100% rename from hsfs/docs/templates/api/feature_view_api.md rename to docs/templates/api/feature_view_api.md diff --git a/hsfs/docs/templates/api/job.md b/docs/templates/api/job.md similarity index 100% rename from hsfs/docs/templates/api/job.md rename to docs/templates/api/job.md diff --git a/hsfs/docs/templates/api/links.md b/docs/templates/api/links.md similarity index 100% rename from hsfs/docs/templates/api/links.md rename to docs/templates/api/links.md diff --git a/hsfs/docs/templates/api/query_api.md b/docs/templates/api/query_api.md similarity index 100% rename from hsfs/docs/templates/api/query_api.md rename to docs/templates/api/query_api.md diff --git a/hsfs/docs/templates/api/rule_api.md b/docs/templates/api/rule_api.md similarity index 100% rename from hsfs/docs/templates/api/rule_api.md rename to docs/templates/api/rule_api.md diff --git a/hsfs/docs/templates/api/rule_definition_api.md b/docs/templates/api/rule_definition_api.md similarity index 100% rename from hsfs/docs/templates/api/rule_definition_api.md rename to docs/templates/api/rule_definition_api.md diff --git a/hsfs/docs/templates/api/similarity_function_type_api.md b/docs/templates/api/similarity_function_type_api.md similarity index 100% rename from hsfs/docs/templates/api/similarity_function_type_api.md rename to docs/templates/api/similarity_function_type_api.md diff --git a/hsfs/docs/templates/api/spine_group_api.md b/docs/templates/api/spine_group_api.md similarity index 100% rename from hsfs/docs/templates/api/spine_group_api.md rename to docs/templates/api/spine_group_api.md diff --git a/hsfs/docs/templates/api/split_statistics_api.md b/docs/templates/api/split_statistics_api.md similarity index 100% rename from hsfs/docs/templates/api/split_statistics_api.md rename to docs/templates/api/split_statistics_api.md diff --git a/hsfs/docs/templates/api/statistics_api.md b/docs/templates/api/statistics_api.md similarity index 100% rename from hsfs/docs/templates/api/statistics_api.md rename to docs/templates/api/statistics_api.md diff --git a/hsfs/docs/templates/api/statistics_config_api.md b/docs/templates/api/statistics_config_api.md similarity index 100% rename from hsfs/docs/templates/api/statistics_config_api.md rename to docs/templates/api/statistics_config_api.md diff --git a/hsfs/docs/templates/api/storage_connector_api.md b/docs/templates/api/storage_connector_api.md similarity index 100% rename from hsfs/docs/templates/api/storage_connector_api.md rename to docs/templates/api/storage_connector_api.md diff --git a/hsfs/docs/templates/api/training_dataset_api.md b/docs/templates/api/training_dataset_api.md similarity index 100% rename from hsfs/docs/templates/api/training_dataset_api.md rename to docs/templates/api/training_dataset_api.md diff --git a/hsfs/docs/templates/api/transformation_functions_api.md b/docs/templates/api/transformation_functions_api.md similarity index 100% rename from hsfs/docs/templates/api/transformation_functions_api.md rename to docs/templates/api/transformation_functions_api.md diff --git a/hsfs/docs/templates/api/validation_api.md b/docs/templates/api/validation_api.md similarity index 100% rename from hsfs/docs/templates/api/validation_api.md rename to docs/templates/api/validation_api.md diff --git a/hsfs/docs/templates/api/validation_report_api.md b/docs/templates/api/validation_report_api.md similarity index 100% rename from hsfs/docs/templates/api/validation_report_api.md rename to docs/templates/api/validation_report_api.md diff --git a/hsml/docs/templates/connection_api.md b/docs/templates/connection_api.md similarity index 100% rename from hsml/docs/templates/connection_api.md rename to docs/templates/connection_api.md diff --git a/hsml/docs/templates/model-registry/links.md b/docs/templates/model-registry/links.md similarity index 100% rename from hsml/docs/templates/model-registry/links.md rename to docs/templates/model-registry/links.md diff --git a/hsml/docs/templates/model-registry/model_api.md b/docs/templates/model-registry/model_api.md similarity index 100% rename from hsml/docs/templates/model-registry/model_api.md rename to docs/templates/model-registry/model_api.md diff --git a/hsml/docs/templates/model-registry/model_registry_api.md b/docs/templates/model-registry/model_registry_api.md similarity index 100% rename from hsml/docs/templates/model-registry/model_registry_api.md rename to docs/templates/model-registry/model_registry_api.md diff --git a/hsml/docs/templates/model-registry/model_schema_api.md b/docs/templates/model-registry/model_schema_api.md similarity index 100% rename from hsml/docs/templates/model-registry/model_schema_api.md rename to docs/templates/model-registry/model_schema_api.md diff --git a/hsml/docs/templates/model-serving/deployment_api.md b/docs/templates/model-serving/deployment_api.md similarity index 100% rename from hsml/docs/templates/model-serving/deployment_api.md rename to docs/templates/model-serving/deployment_api.md diff --git a/hsml/docs/templates/model-serving/inference_batcher_api.md b/docs/templates/model-serving/inference_batcher_api.md similarity index 100% rename from hsml/docs/templates/model-serving/inference_batcher_api.md rename to docs/templates/model-serving/inference_batcher_api.md diff --git a/hsml/docs/templates/model-serving/inference_logger_api.md b/docs/templates/model-serving/inference_logger_api.md similarity index 100% rename from hsml/docs/templates/model-serving/inference_logger_api.md rename to docs/templates/model-serving/inference_logger_api.md diff --git a/hsml/docs/templates/model-serving/model_serving_api.md b/docs/templates/model-serving/model_serving_api.md similarity index 100% rename from hsml/docs/templates/model-serving/model_serving_api.md rename to docs/templates/model-serving/model_serving_api.md diff --git a/hsml/docs/templates/model-serving/predictor_api.md b/docs/templates/model-serving/predictor_api.md similarity index 100% rename from hsml/docs/templates/model-serving/predictor_api.md rename to docs/templates/model-serving/predictor_api.md diff --git a/hsml/docs/templates/model-serving/predictor_state_api.md b/docs/templates/model-serving/predictor_state_api.md similarity index 100% rename from hsml/docs/templates/model-serving/predictor_state_api.md rename to docs/templates/model-serving/predictor_state_api.md diff --git a/hsml/docs/templates/model-serving/predictor_state_condition_api.md b/docs/templates/model-serving/predictor_state_condition_api.md similarity index 100% rename from hsml/docs/templates/model-serving/predictor_state_condition_api.md rename to docs/templates/model-serving/predictor_state_condition_api.md diff --git a/hsml/docs/templates/model-serving/resources_api.md b/docs/templates/model-serving/resources_api.md similarity index 100% rename from hsml/docs/templates/model-serving/resources_api.md rename to docs/templates/model-serving/resources_api.md diff --git a/hsml/docs/templates/model-serving/transformer_api.md b/docs/templates/model-serving/transformer_api.md similarity index 100% rename from hsml/docs/templates/model-serving/transformer_api.md rename to docs/templates/model-serving/transformer_api.md diff --git a/hsfs/.github/workflows/mkdocs-master.yml b/hsfs/.github/workflows/mkdocs-master.yml deleted file mode 100644 index 1c904ad28..000000000 --- a/hsfs/.github/workflows/mkdocs-master.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: mkdocs-master - -on: pull_request - -jobs: - publish-master: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: set dev version - working-directory: ./java - run: echo "DEV_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev 'Download|INFO|WARNING')" >> $GITHUB_ENV - - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - - name: install deps - working-directory: ./python - run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[python,dev] - - - name: generate autodoc - run: python3 auto_doc.py - - - name: Cache local Maven repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('java/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: "8" - distribution: "adopt" - - - name: Build java doc documentation - working-directory: ./java - run: mvn clean install javadoc:javadoc javadoc:aggregate -DskipTests && cp -r target/site/apidocs ../docs/javadoc - - - name: setup git - run: | - git config --global user.name Mike - git config --global user.email mike@docs.hopsworks.ai - - - name: mike deploy docs - run: mike deploy ${{ env.DEV_VERSION }} dev -u diff --git a/hsfs/.github/workflows/mkdocs-release.yml b/hsfs/.github/workflows/mkdocs-release.yml deleted file mode 100644 index 66ca638ae..000000000 --- a/hsfs/.github/workflows/mkdocs-release.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: mkdocs-release - -on: - push: - branches: [branch-*] - -jobs: - publish-release: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: set major/minor/bugfix release version - working-directory: ./java - run: echo "RELEASE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev 'Download|INFO|WARNING')" >> $GITHUB_ENV - - - name: set major/minor release version - run: echo "MAJOR_VERSION=$(echo $RELEASE_VERSION | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/')" >> $GITHUB_ENV - - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - - name: install deps - working-directory: ./python - run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[python,dev] - - - name: generate autodoc - run: python3 auto_doc.py - - - name: Cache local Maven repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('java/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: "8" - distribution: "adopt" - - - name: Build java doc documentation - working-directory: ./java - run: mvn clean install javadoc:javadoc javadoc:aggregate -DskipTests && cp -r target/site/apidocs ../docs/javadoc - - - name: setup git - run: | - git config --global user.name Mike - git config --global user.email mike@docs.hopsworks.ai - - name: mike deploy docs - run: | - mike deploy ${{ env.RELEASE_VERSION }} ${{ env.MAJOR_VERSION }} -u --push - mike alias ${{ env.RELEASE_VERSION }} latest -u --push diff --git a/hsfs/.github/workflows/optional-dependency.yml b/hsfs/.github/workflows/optional-dependency.yml deleted file mode 100644 index 547b02029..000000000 --- a/hsfs/.github/workflows/optional-dependency.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: optional-dependency - -on: pull_request - -jobs: - unit_tests_no_great_expectations: - name: Unit Testing (No Great Expectations) - runs-on: ubuntu-latest - - steps: - - name: Set Timezone - run: sudo timedatectl set-timezone UTC - - - uses: actions/checkout@v4 - - name: Copy README - run: cp README.md python/ - - - uses: actions/setup-python@v5 - name: Setup Python - with: - python-version: "3.10" - cache: "pip" - cache-dependency-path: "python/setup.py" - - run: pip install -e python[python,dev-no-opt] - - - name: Run Pytest suite - env: - ENABLE_HOPSWORKS_USAGE: "false" - run: pytest python/tests \ No newline at end of file diff --git a/hsfs/.gitignore b/hsfs/.gitignore deleted file mode 100644 index a8b4c5683..000000000 --- a/hsfs/.gitignore +++ /dev/null @@ -1,145 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST -python/README.md -python/LICENSE - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ -.ruff_cache/ -bigquery.json -metastore_db/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# Mike Javadoc -docs/javadoc - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# Java -.idea -.vscode -*.iml -target/ - -# Mac -.DS_Store - -# mkdocs intemediate files -docs/generated - -# Test artifacts -keyFile.json - -# delombok dir -delombok - -# dev scripts dir -dev_scripts/ -dev_tools/ diff --git a/hsfs/CONTRIBUTING.md b/hsfs/CONTRIBUTING.md deleted file mode 100644 index 0df3de08e..000000000 --- a/hsfs/CONTRIBUTING.md +++ /dev/null @@ -1,220 +0,0 @@ -## Python development setup - ---- - -- Fork and clone the repository - -- Create a new Python environment with your favourite environment manager (e.g. virtualenv or conda) and Python 3.9 (newer versions will return a library conflict in `auto_doc.py`) - -- Install repository in editable mode with development dependencies: - - ```bash - cd python - pip install -e ".[python,dev]" - ``` - -- Install [pre-commit](https://pre-commit.com/) and then activate its hooks. pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. The Feature Store uses pre-commit to ensure code-style and code formatting through [ruff](https://docs.astral.sh/ruff/). Run the following commands from the `python` directory: - - ```bash - cd python - pip install --user pre-commit - pre-commit install - ``` - - Afterwards, pre-commit will run whenever you commit. - -- To run formatting and code-style separately, you can configure your IDE, such as VSCode, to use `ruff`, or run it via the command line: - - ```bash - # linting - ruff check python --fix - # formatting - ruff format python - ``` - -### Python documentation - -We follow a few best practices for writing the Python documentation: - -1. Use the google docstring style: - - ```python - """[One Line Summary] - - [Extended Summary] - - [!!! example - import xyz - ] - - # Arguments - arg1: Type[, optional]. Description[, defaults to `default`] - arg2: Type[, optional]. Description[, defaults to `default`] - - # Returns - Type. Description. - - # Raises - Exception. Description. - """ - ``` - - If Python 3 type annotations are used, they are inserted automatically. - -2. Feature store entity engine methods (e.g. FeatureGroupEngine etc.) only require a single line docstring. -3. REST Api implementations (e.g. FeatureGroupApi etc.) should be fully documented with docstrings without defaults. -4. Public Api such as metadata objects should be fully documented with defaults. - -#### Setup and Build Documentation - -We use `mkdocs` together with `mike` ([for versioning](https://github.com/jimporter/mike/)) to build the documentation and a plugin called `keras-autodoc` to auto generate Python API documentation from docstrings. - -**Background about `mike`:** -`mike` builds the documentation and commits it as a new directory to the gh-pages branch. Each directory corresponds to one version of the documentation. Additionally, `mike` maintains a json in the root of gh-pages with the mappings of versions/aliases for each of the directories available. With aliases you can define extra names like `dev` or `latest`, to indicate stable and unstable releases. - -1. Currently we are using our own version of `keras-autodoc` - - ```bash - pip install git+https://github.com/logicalclocks/keras-autodoc - ``` - -2. Install HSFS with `docs` extras: - - ```bash - pip install -e ".[python,dev]" && pip install -r ../requirements-docs.txt - ``` - -3. To build the docs, first run the auto doc script: - - ```bash - cd .. - python auto_doc.py - ``` - -##### Option 1: Build only current version of docs - -4. Either build the docs, or serve them dynamically: - - Note: Links and pictures might not resolve properly later on when checking with this build. - The reason for that is that the docs are deployed with versioning on docs.hopsworks.ai and - therefore another level is added to all paths, e.g. `docs.hopsworks.ai/[version-or-alias]`. - Using relative links should not be affected by this, however, building the docs with version - (Option 2) is recommended. - - ```bash - mkdocs build - # or - mkdocs serve - ``` - -##### Option 2 (Preferred): Build multi-version doc with `mike` - -###### Versioning on docs.hopsworks.ai - -On docs.hopsworks.ai we implement the following versioning scheme: - -- current master branches (e.g. of hsfs corresponding to master of Hopsworks): rendered as current Hopsworks snapshot version, e.g. **2.2.0-SNAPSHOT [dev]**, where `dev` is an alias to indicate that this is an unstable version. -- the latest release: rendered with full current version, e.g. **2.1.5 [latest]** with `latest` alias to indicate that this is the latest stable release. -- previous stable releases: rendered without alias, e.g. **2.1.4**. - -###### Build Instructions - -4. For this you can either checkout and make a local copy of the `upstream/gh-pages` branch, where `mike` maintains the current state of docs.hopsworks.ai, or just build documentation for the branch you are updating: - - Building _one_ branch: - - Checkout your dev branch with modified docs: - - ```bash - git checkout [dev-branch] - ``` - - Generate API docs if necessary: - - ```bash - python auto_doc.py - ``` - - Build docs with a version and alias - - ```bash - mike deploy [version] [alias] --update-alias - - # for example, if you are updating documentation to be merged to master, - # which will become the new SNAPSHOT version: - mike deploy 2.2.0-SNAPSHOT dev --update-alias - - # if you are updating docs of the latest stable release branch - mike deploy [version] latest --update-alias - - # if you are updating docs of a previous stable release branch - mike deploy [version] - ``` - - If no gh-pages branch existed in your local repository, this will have created it. - - **Important**: If no previous docs were built, you will have to choose a version as default to be loaded as index, as follows - - ```bash - mike set-default [version-or-alias] - ``` - - You can now checkout the gh-pages branch and serve: - - ```bash - git checkout gh-pages - mike serve - ``` - - You can also list all available versions/aliases: - - ```bash - mike list - ``` - - Delete and reset your local gh-pages branch: - - ```bash - mike delete --all - - # or delete single version - mike delete [version-or-alias] - ``` - -#### Adding new API documentation - -To add new documentation for APIs, you need to add information about the method/class to document to the `auto_doc.py` script: - -```python -PAGES = { - "connection.md": [ - "hsfs.connection.Connection.connection" - ] - "new_template.md": [ - "module", - "xyz.asd" - ] -} -``` - -Now you can add a template markdown file to the `docs/templates` directory with the name you specified in the auto-doc script. The `new_template.md` file should contain a tag to identify the place at which the API documentation should be inserted: - -```` -## The XYZ package - -{{module}} - -Some extra content here. - -!!! example - ```python - import xyz - ``` - -{{xyz.asd}} -```` - -Finally, run the `auto_doc.py` script, as decribed above, to update the documentation. - -For information about Markdown syntax and possible Admonitions/Highlighting etc. see -the [Material for Mkdocs themes reference documentation](https://squidfunk.github.io/mkdocs-material/reference/abbreviations/). diff --git a/hsfs/Jenkinsfile b/hsfs/Jenkinsfile deleted file mode 100644 index d2014d5cb..000000000 --- a/hsfs/Jenkinsfile +++ /dev/null @@ -1,23 +0,0 @@ -pipeline { - agent { - docker { - label "local" - image "docker.hops.works/hopsworks_twine:0.0.1" - } - } - stages { - stage("publish") { - environment { - PYPI = credentials('977daeb0-e1c8-43a0-b35a-fc37bb9eee9b') - } - steps { - dir("python") { - sh "rm -f LICENSE README.md" - sh "cp -f ../LICENSE ../README.md ./" - sh "python3 -m build" - sh "twine upload -u $PYPI_USR -p $PYPI_PSW --skip-existing dist/*" - } - } - } - } -} diff --git a/hsfs/LICENSE b/hsfs/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/hsfs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/hsfs/README.md b/hsfs/README.md deleted file mode 100644 index a13ea2ce5..000000000 --- a/hsfs/README.md +++ /dev/null @@ -1,201 +0,0 @@ -# Hopsworks Feature Store - -

- Hopsworks Community - Hopsworks Feature Store Documentation - python - PyPiStatus - Scala/Java Artifacts - Downloads - Ruff - License -

- -HSFS is the library to interact with the Hopsworks Feature Store. The library makes creating new features, feature groups and training datasets easy. - -The library is environment independent and can be used in two modes: - -- 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. - -- 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. - -The library automatically configures itself based on the environment it is run. -However, to connect from an external environment such as Databricks or AWS Sagemaker, -additional connection information, such as host and port, is required. For more information checkout the [Hopsworks documentation](https://docs.hopsworks.ai/latest/). - -## Getting Started On Hopsworks - -Get started easily by registering an account on [Hopsworks Serverless](https://app.hopsworks.ai/). Create your project and a [new Api key](https://docs.hopsworks.ai/latest/user_guides/projects/api_key/create_api_key/). In a new python environment with Python 3.8 or higher, install the [client library](https://docs.hopsworks.ai/latest/user_guides/client_installation/) using pip: - -```bash -# Get all Hopsworks SDKs: Feature Store, Model Serving and Platform SDK -pip install hopsworks -# or minimum install with the Feature Store SDK -pip install hsfs[python] -# if using zsh don't forget the quotes -pip install 'hsfs[python]' -``` - -You can start a notebook and instantiate a connection and get the project feature store handler. - -```python -import hopsworks - -project = hopsworks.login() # you will be prompted for your api key -fs = project.get_feature_store() -``` - -or using `hsfs` directly: - -```python -import hsfs - -connection = hsfs.connection( - host="c.app.hopsworks.ai", # - project="your-project", - api_key_value="your-api-key", -) -fs = connection.get_feature_store() -``` - -Create a new feature group to start inserting feature values. -```python -fg = fs.create_feature_group("rain", - version=1, - description="Rain features", - primary_key=['date', 'location_id'], - online_enabled=True) - -fg.save(dataframe) -``` - -Upsert new data in to the feature group with `time_travel_format="HUDI"`". -```python -fg.insert(upsert_df) -``` - -Retrieve commit timeline metdata of the feature group with `time_travel_format="HUDI"`". -```python -fg.commit_details() -``` - -"Reading feature group as of specific point in time". -```python -fg = fs.get_feature_group("rain", 1) -fg.read("2020-10-20 07:34:11").show() -``` - -Read updates that occurred between specified points in time. -```python -fg = fs.get_feature_group("rain", 1) -fg.read_changes("2020-10-20 07:31:38", "2020-10-20 07:34:11").show() -``` - -Join features together -```python -feature_join = rain_fg.select_all() - .join(temperature_fg.select_all(), on=["date", "location_id"]) - .join(location_fg.select_all()) -feature_join.show(5) -``` - -join feature groups that correspond to specific point in time -```python -feature_join = rain_fg.select_all() - .join(temperature_fg.select_all(), on=["date", "location_id"]) - .join(location_fg.select_all()) - .as_of("2020-10-31") -feature_join.show(5) -``` - -join feature groups that correspond to different time -```python -rain_fg_q = rain_fg.select_all().as_of("2020-10-20 07:41:43") -temperature_fg_q = temperature_fg.select_all().as_of("2020-10-20 07:32:33") -location_fg_q = location_fg.select_all().as_of("2020-10-20 07:33:08") -joined_features_q = rain_fg_q.join(temperature_fg_q).join(location_fg_q) -``` - -Use the query object to create a training dataset: -```python -td = fs.create_training_dataset("rain_dataset", - version=1, - data_format="tfrecords", - description="A test training dataset saved in TfRecords format", - splits={'train': 0.7, 'test': 0.2, 'validate': 0.1}) - -td.save(feature_join) -``` - -A short introduction to the Scala API: -```scala -import com.logicalclocks.hsfs._ -val connection = HopsworksConnection.builder().build() -val fs = connection.getFeatureStore(); -val attendances_features_fg = fs.getFeatureGroup("games_features", 1); -attendances_features_fg.show(1) -``` - -You can find more examples on how to use the library in our [hops-examples](https://github.com/logicalclocks/hops-examples) repository. - -## Usage - -Usage data is collected for improving quality of the library. It is turned on by default if the backend -is "c.app.hopsworks.ai". To turn it off, use one of the following way: -```python -# use environment variable -import os -os.environ["ENABLE_HOPSWORKS_USAGE"] = "false" - -# use `disable_usage_logging` -import hsfs -hsfs.disable_usage_logging() -``` - -The source code can be found in python/hsfs/usage.py. - -## Documentation - -Documentation is available at [Hopsworks Feature Store Documentation](https://docs.hopsworks.ai/). - -## Issues - -For general questions about the usage of Hopsworks and the Feature Store please open a topic on [Hopsworks Community](https://community.hopsworks.ai/). - -Please report any issue using [Github issue tracking](https://github.com/logicalclocks/feature-store-api/issues). - -Please attach the client environment from the output below in the issue: -```python -import hopsworks -import hsfs -hopsworks.login().get_feature_store() -print(hsfs.get_env()) -``` - -## Contributing - -If you would like to contribute to this library, please see the [Contribution Guidelines](CONTRIBUTING.md). diff --git a/hsfs/auto_doc.py b/hsfs/auto_doc.py deleted file mode 100644 index a98af258b..000000000 --- a/hsfs/auto_doc.py +++ /dev/null @@ -1,384 +0,0 @@ -import os -import pathlib -import shutil - -import keras_autodoc - -PAGES = { - "api/connection_api.md": { - "connection": ["hsfs.connection.Connection"], - "connection_properties": keras_autodoc.get_properties( - "hsfs.connection.Connection" - ), - "connection_methods": keras_autodoc.get_methods("hsfs.connection.Connection"), - }, - "api/spine_group_api.md": { - "fg": ["hsfs.feature_group.SpineGroup"], - "fg_create": ["hsfs.feature_store.FeatureStore.get_or_create_spine_group"], - "fg_get": ["hsfs.feature_store.FeatureStore.get_or_create_spine_group"], - "fg_properties": keras_autodoc.get_properties( - "hsfs.feature_group.SpineGroup", - exclude=[ - "expectation_suite", - "location", - "online_enabled", - "statistics", - "statistics_config", - "subject", - ], - ), - "fg_methods": keras_autodoc.get_methods( - "hsfs.feature_group.SpineGroup", - exclude=[ - "append_features", - "compute_statistics", - "delete_expectation_suite", - "from_response_json", - "get_all_validation_reports", - "get_expectation_suite", - "get_latest_validation_report", - "get_statistics", - "get_validation_history", - "save_expectation_suite", - "save_validation_report", - "update_from_response_json", - "update_statistics_config", - "validate", - ], - ), - }, - "api/training_dataset_api.md": { - "td": ["hsfs.training_dataset.TrainingDataset"], - "td_create": ["hsfs.feature_store.FeatureStore.create_training_dataset"], - "td_get": ["hsfs.feature_store.FeatureStore.get_training_dataset"], - "td_properties": keras_autodoc.get_properties( - "hsfs.training_dataset.TrainingDataset" - ), - "td_methods": keras_autodoc.get_methods( - "hsfs.training_dataset.TrainingDataset" - ), - }, - "api/feature_view_api.md": { - "fv": ["hsfs.feature_view.FeatureView"], - "fv_create": ["hsfs.feature_store.FeatureStore.create_feature_view"], - "fv_get": ["hsfs.feature_store.FeatureStore.get_feature_view"], - "fvs_get": ["hsfs.feature_store.FeatureStore.get_feature_views"], - "fv_properties": keras_autodoc.get_properties("hsfs.feature_view.FeatureView"), - "fv_methods": keras_autodoc.get_methods("hsfs.feature_view.FeatureView"), - }, - "api/feature_api.md": { - "feature": ["hsfs.feature.Feature"], - "feature_properties": keras_autodoc.get_properties("hsfs.feature.Feature"), - "feature_methods": keras_autodoc.get_methods("hsfs.feature.Feature"), - }, - "api/expectation_suite_api.md": { - "expectation_suite": ["hsfs.expectation_suite.ExpectationSuite"], - "expectation_suite_attach": [ - "hsfs.feature_group.FeatureGroup.save_expectation_suite" - ], - "single_expectation_api": [ - "hsfs.expectation_suite.ExpectationSuite.add_expectation", - "hsfs.expectation_suite.ExpectationSuite.replace_expectation", - "hsfs.expectation_suite.ExpectationSuite.remove_expectation", - ], - "expectation_suite_properties": keras_autodoc.get_properties( - "hsfs.expectation_suite.ExpectationSuite" - ), - "expectation_suite_methods": keras_autodoc.get_methods( - "hsfs.expectation_suite.ExpectationSuite" - ), - }, - "api/feature_store_api.md": { - "fs": ["hsfs.feature_store.FeatureStore"], - "fs_get": ["hsfs.connection.Connection.get_feature_store"], - "fs_properties": keras_autodoc.get_properties( - "hsfs.feature_store.FeatureStore" - ), - "fs_methods": keras_autodoc.get_methods("hsfs.feature_store.FeatureStore"), - }, - "api/feature_group_api.md": { - "fg": ["hsfs.feature_group.FeatureGroup"], - "fg_create": [ - "hsfs.feature_store.FeatureStore.create_feature_group", - "hsfs.feature_store.FeatureStore.get_or_create_feature_group", - ], - "fg_get": ["hsfs.feature_store.FeatureStore.get_feature_group"], - "fg_properties": keras_autodoc.get_properties( - "hsfs.feature_group.FeatureGroup" - ), - "fg_methods": keras_autodoc.get_methods("hsfs.feature_group.FeatureGroup"), - }, - "api/external_feature_group_api.md": { - "fg": ["hsfs.feature_group.ExternalFeatureGroup"], - "fg_create": ["hsfs.feature_store.FeatureStore.create_external_feature_group"], - "fg_get": ["hsfs.feature_store.FeatureStore.get_external_feature_group"], - "fg_properties": keras_autodoc.get_properties( - "hsfs.feature_group.ExternalFeatureGroup" - ), - "fg_methods": keras_autodoc.get_methods( - "hsfs.feature_group.ExternalFeatureGroup" - ), - }, - "api/storage_connector_api.md": { - "sc_get": [ - "hsfs.feature_store.FeatureStore.get_storage_connector", - "hsfs.feature_store.FeatureStore.get_online_storage_connector", - ], - "hopsfs_methods": keras_autodoc.get_methods( - "hsfs.storage_connector.HopsFSConnector", exclude=["from_response_json"] - ), - "hopsfs_properties": keras_autodoc.get_properties( - "hsfs.storage_connector.HopsFSConnector" - ), - "s3_methods": keras_autodoc.get_methods( - "hsfs.storage_connector.S3Connector", exclude=["from_response_json"] - ), - "s3_properties": keras_autodoc.get_properties( - "hsfs.storage_connector.S3Connector" - ), - "redshift_methods": keras_autodoc.get_methods( - "hsfs.storage_connector.RedshiftConnector", exclude=["from_response_json"] - ), - "redshift_properties": keras_autodoc.get_properties( - "hsfs.storage_connector.RedshiftConnector" - ), - "adls_methods": keras_autodoc.get_methods( - "hsfs.storage_connector.AdlsConnector", exclude=["from_response_json"] - ), - "adls_properties": keras_autodoc.get_properties( - "hsfs.storage_connector.AdlsConnector" - ), - "snowflake_methods": keras_autodoc.get_methods( - "hsfs.storage_connector.SnowflakeConnector", exclude=["from_response_json"] - ), - "snowflake_properties": keras_autodoc.get_properties( - "hsfs.storage_connector.SnowflakeConnector" - ), - "jdbc_methods": keras_autodoc.get_methods( - "hsfs.storage_connector.JdbcConnector", exclude=["from_response_json"] - ), - "jdbc_properties": keras_autodoc.get_properties( - "hsfs.storage_connector.JdbcConnector" - ), - "gcs_methods": keras_autodoc.get_methods( - "hsfs.storage_connector.GcsConnector", exclude=["from_response_json"] - ), - "gcs_properties": keras_autodoc.get_properties( - "hsfs.storage_connector.GcsConnector" - ), - "bigquery_methods": keras_autodoc.get_methods( - "hsfs.storage_connector.BigQueryConnector", exclude=["from_response_json"] - ), - "bigquery_properties": keras_autodoc.get_properties( - "hsfs.storage_connector.BigQueryConnector" - ), - "kafka_methods": keras_autodoc.get_methods( - "hsfs.storage_connector.KafkaConnector", exclude=["from_response_json"] - ), - "kafka_properties": keras_autodoc.get_properties( - "hsfs.storage_connector.KafkaConnector" - ), - }, - "api/statistics_config_api.md": { - "statistics_config": ["hsfs.statistics_config.StatisticsConfig"], - "statistics_config_properties": keras_autodoc.get_properties( - "hsfs.statistics_config.StatisticsConfig" - ), - }, - "api/transformation_functions_api.md": { - "transformation_function": [ - "hsfs.transformation_function.TransformationFunction" - ], - "transformation_function_properties": keras_autodoc.get_properties( - "hsfs.transformation_function.TransformationFunction" - ), - "transformation_function_methods": keras_autodoc.get_methods( - "hsfs.transformation_function.TransformationFunction", - exclude=[ - "from_response_json", - "update_from_response_json", - "json", - "to_dict", - ], - ), - "create_transformation_function": [ - "hsfs.feature_store.FeatureStore.create_transformation_function" - ], - "get_transformation_function": [ - "hsfs.feature_store.FeatureStore.get_transformation_function" - ], - "get_transformation_functions": [ - "hsfs.feature_store.FeatureStore.get_transformation_functions" - ], - }, - "api/validation_report_api.md": { - "validation_report": ["hsfs.validation_report.ValidationReport"], - "validation_report_validate": [ - "hsfs.feature_group.FeatureGroup.validate", - "hsfs.feature_group.FeatureGroup.insert", - ], - "validation_report_get": [ - "hsfs.feature_group.FeatureGroup.get_latest_validation_report", - "hsfs.feature_group.FeatureGroup.get_all_validation_reports", - ], - "validation_report_properties": keras_autodoc.get_properties( - "hsfs.validation_report.ValidationReport" - ), - "validation_report_methods": keras_autodoc.get_methods( - "hsfs.validation_report.ValidationReport" - ), - }, - "api/job.md": { - "job_configuration": ["hsfs.core.job_configuration.JobConfiguration"], - "job": ["hsfs.core.job.Job"], - "job_methods": [ - "hsfs.core.job.Job.get_state", - "hsfs.core.job.Job.get_final_state", - ], - }, - "api/query_api.md": { - "query_methods": keras_autodoc.get_methods( - "hsfs.constructor.query.Query", - exclude=["json", "to_dict"], - ), - "query_properties": keras_autodoc.get_properties( - "hsfs.constructor.query.Query" - ), - }, - "api/links.md": { - "links_properties": keras_autodoc.get_properties( - "hsfs.core.explicit_provenance.Links" - ), - "artifact_properties": keras_autodoc.get_properties( - "hsfs.core.explicit_provenance.Artifact" - ), - }, - "api/statistics_api.md": { - "statistics": ["hsfs.statistics.Statistics"], - "statistics_properties": keras_autodoc.get_properties( - "hsfs.statistics.Statistics" - ), - }, - "api/split_statistics_api.md": { - "split_statistics": ["hsfs.split_statistics.SplitStatistics"], - "split_statistics_properties": keras_autodoc.get_properties( - "hsfs.split_statistics.SplitStatistics" - ), - }, - "api/feature_descriptive_statistics_api.md": { - "feature_descriptive_statistics": [ - "hsfs.core.feature_descriptive_statistics.FeatureDescriptiveStatistics" - ], - "feature_descriptive_statistics_properties": keras_autodoc.get_properties( - "hsfs.core.feature_descriptive_statistics.FeatureDescriptiveStatistics" - ), - }, - "api/feature_monitoring_config_api.md": { - "feature_monitoring_config": [ - "hsfs.core.feature_monitoring_config.FeatureMonitoringConfig" - ], - "feature_monitoring_config_properties": keras_autodoc.get_properties( - "hsfs.core.feature_monitoring_config.FeatureMonitoringConfig" - ), - "feature_monitoring_config_methods": keras_autodoc.get_methods( - "hsfs.core.feature_monitoring_config.FeatureMonitoringConfig", - exclude=[ - "from_response_json", - "update_from_response_json", - "json", - "to_dict", - ], - ), - # from feature group - "feature_monitoring_config_creation_fg": [ - "hsfs.feature_group.FeatureGroup.create_statistics_monitoring", - "hsfs.feature_group.FeatureGroup.create_feature_monitoring", - ], - # from feature view - "feature_monitoring_config_creation_fv": [ - "hsfs.feature_view.FeatureView.create_statistics_monitoring", - "hsfs.feature_view.FeatureView.create_feature_monitoring", - ], - # retrieval - "feature_monitoring_config_retrieval_fg": [ - "hsfs.feature_group.FeatureGroup.get_feature_monitoring_configs", - ], - "feature_monitoring_config_retrieval_fv": [ - "hsfs.feature_view.FeatureView.get_feature_monitoring_configs", - ], - }, - "api/feature_monitoring_result_api.md": { - "feature_monitoring_result": [ - "hsfs.core.feature_monitoring_result.FeatureMonitoringResult" - ], - "feature_monitoring_result_retrieval": [ - "hsfs.core.feature_monitoring_config.FeatureMonitoringConfig.get_history" - ], - "feature_monitoring_result_properties": keras_autodoc.get_properties( - "hsfs.core.feature_monitoring_result.FeatureMonitoringResult" - ), - }, - "api/feature_monitoring_window_config_api.md": { - "feature_monitoring_window_config": [ - "hsfs.core.monitoring_window_config.MonitoringWindowConfig" - ], - "feature_monitoring_window_config_properties": keras_autodoc.get_properties( - "hsfs.core.monitoring_window_config.MonitoringWindowConfig" - ), - }, - "api/embedding_index_api.md": { - "embedding_index": ["hsfs.embedding.EmbeddingIndex"], - "embedding_index_properties": keras_autodoc.get_properties( - "hsfs.embedding.EmbeddingIndex" - ), - "embedding_index_methods": keras_autodoc.get_methods( - "hsfs.embedding.EmbeddingIndex", exclude=["from_response_json"] - ), - }, - "api/embedding_feature_api.md": { - "embedding_feature": ["hsfs.embedding.EmbeddingFeature"], - "embedding_feature_properties": keras_autodoc.get_properties( - "hsfs.embedding.EmbeddingFeature" - ), - }, - "api/similarity_function_type_api.md": { - "similarity_function_type": ["hsfs.embedding.SimilarityFunctionType"], - }, -} - -hsfs_dir = pathlib.Path(__file__).resolve().parents[0] -if "GITHUB_SHA" in os.environ: - commit_sha = os.environ["GITHUB_SHA"] - project_url = ( - f"https://github.com/logicalclocks/feature-store-api/tree/{commit_sha}/python" - ) -else: - branch_name = os.environ.get("GITHUB_BASE_REF", "master") - project_url = ( - f"https://github.com/logicalclocks/feature-store-api/blob/{branch_name}/python" - ) - - -def generate(dest_dir): - doc_generator = keras_autodoc.DocumentationGenerator( - PAGES, - project_url=project_url, - template_dir="./docs/templates", - titles_size="###", - extra_aliases={ - "hsfs.core.query.Query": "hsfs.Query", - "hsfs.storage_connector.StorageConnector": "hsfs.StorageConnector", - "hsfs.statistics_config.StatisticsConfig": "hsfs.StatisticsConfig", - "hsfs.training_dataset_feature.TrainingDatasetFeature": "hsfs.TrainingDatasetFeature", - "pandas.core.frame.DataFrame": "pandas.DataFrame", - }, - max_signature_line_length=100, - ) - shutil.copyfile(hsfs_dir / "CONTRIBUTING.md", dest_dir / "CONTRIBUTING.md") - shutil.copyfile(hsfs_dir / "README.md", dest_dir / "index.md") - - doc_generator.generate(dest_dir / "generated") - - -if __name__ == "__main__": - generate(hsfs_dir / "docs") diff --git a/hsfs/docs/CONTRIBUTING.md b/hsfs/docs/CONTRIBUTING.md deleted file mode 100644 index 0df3de08e..000000000 --- a/hsfs/docs/CONTRIBUTING.md +++ /dev/null @@ -1,220 +0,0 @@ -## Python development setup - ---- - -- Fork and clone the repository - -- Create a new Python environment with your favourite environment manager (e.g. virtualenv or conda) and Python 3.9 (newer versions will return a library conflict in `auto_doc.py`) - -- Install repository in editable mode with development dependencies: - - ```bash - cd python - pip install -e ".[python,dev]" - ``` - -- Install [pre-commit](https://pre-commit.com/) and then activate its hooks. pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. The Feature Store uses pre-commit to ensure code-style and code formatting through [ruff](https://docs.astral.sh/ruff/). Run the following commands from the `python` directory: - - ```bash - cd python - pip install --user pre-commit - pre-commit install - ``` - - Afterwards, pre-commit will run whenever you commit. - -- To run formatting and code-style separately, you can configure your IDE, such as VSCode, to use `ruff`, or run it via the command line: - - ```bash - # linting - ruff check python --fix - # formatting - ruff format python - ``` - -### Python documentation - -We follow a few best practices for writing the Python documentation: - -1. Use the google docstring style: - - ```python - """[One Line Summary] - - [Extended Summary] - - [!!! example - import xyz - ] - - # Arguments - arg1: Type[, optional]. Description[, defaults to `default`] - arg2: Type[, optional]. Description[, defaults to `default`] - - # Returns - Type. Description. - - # Raises - Exception. Description. - """ - ``` - - If Python 3 type annotations are used, they are inserted automatically. - -2. Feature store entity engine methods (e.g. FeatureGroupEngine etc.) only require a single line docstring. -3. REST Api implementations (e.g. FeatureGroupApi etc.) should be fully documented with docstrings without defaults. -4. Public Api such as metadata objects should be fully documented with defaults. - -#### Setup and Build Documentation - -We use `mkdocs` together with `mike` ([for versioning](https://github.com/jimporter/mike/)) to build the documentation and a plugin called `keras-autodoc` to auto generate Python API documentation from docstrings. - -**Background about `mike`:** -`mike` builds the documentation and commits it as a new directory to the gh-pages branch. Each directory corresponds to one version of the documentation. Additionally, `mike` maintains a json in the root of gh-pages with the mappings of versions/aliases for each of the directories available. With aliases you can define extra names like `dev` or `latest`, to indicate stable and unstable releases. - -1. Currently we are using our own version of `keras-autodoc` - - ```bash - pip install git+https://github.com/logicalclocks/keras-autodoc - ``` - -2. Install HSFS with `docs` extras: - - ```bash - pip install -e ".[python,dev]" && pip install -r ../requirements-docs.txt - ``` - -3. To build the docs, first run the auto doc script: - - ```bash - cd .. - python auto_doc.py - ``` - -##### Option 1: Build only current version of docs - -4. Either build the docs, or serve them dynamically: - - Note: Links and pictures might not resolve properly later on when checking with this build. - The reason for that is that the docs are deployed with versioning on docs.hopsworks.ai and - therefore another level is added to all paths, e.g. `docs.hopsworks.ai/[version-or-alias]`. - Using relative links should not be affected by this, however, building the docs with version - (Option 2) is recommended. - - ```bash - mkdocs build - # or - mkdocs serve - ``` - -##### Option 2 (Preferred): Build multi-version doc with `mike` - -###### Versioning on docs.hopsworks.ai - -On docs.hopsworks.ai we implement the following versioning scheme: - -- current master branches (e.g. of hsfs corresponding to master of Hopsworks): rendered as current Hopsworks snapshot version, e.g. **2.2.0-SNAPSHOT [dev]**, where `dev` is an alias to indicate that this is an unstable version. -- the latest release: rendered with full current version, e.g. **2.1.5 [latest]** with `latest` alias to indicate that this is the latest stable release. -- previous stable releases: rendered without alias, e.g. **2.1.4**. - -###### Build Instructions - -4. For this you can either checkout and make a local copy of the `upstream/gh-pages` branch, where `mike` maintains the current state of docs.hopsworks.ai, or just build documentation for the branch you are updating: - - Building _one_ branch: - - Checkout your dev branch with modified docs: - - ```bash - git checkout [dev-branch] - ``` - - Generate API docs if necessary: - - ```bash - python auto_doc.py - ``` - - Build docs with a version and alias - - ```bash - mike deploy [version] [alias] --update-alias - - # for example, if you are updating documentation to be merged to master, - # which will become the new SNAPSHOT version: - mike deploy 2.2.0-SNAPSHOT dev --update-alias - - # if you are updating docs of the latest stable release branch - mike deploy [version] latest --update-alias - - # if you are updating docs of a previous stable release branch - mike deploy [version] - ``` - - If no gh-pages branch existed in your local repository, this will have created it. - - **Important**: If no previous docs were built, you will have to choose a version as default to be loaded as index, as follows - - ```bash - mike set-default [version-or-alias] - ``` - - You can now checkout the gh-pages branch and serve: - - ```bash - git checkout gh-pages - mike serve - ``` - - You can also list all available versions/aliases: - - ```bash - mike list - ``` - - Delete and reset your local gh-pages branch: - - ```bash - mike delete --all - - # or delete single version - mike delete [version-or-alias] - ``` - -#### Adding new API documentation - -To add new documentation for APIs, you need to add information about the method/class to document to the `auto_doc.py` script: - -```python -PAGES = { - "connection.md": [ - "hsfs.connection.Connection.connection" - ] - "new_template.md": [ - "module", - "xyz.asd" - ] -} -``` - -Now you can add a template markdown file to the `docs/templates` directory with the name you specified in the auto-doc script. The `new_template.md` file should contain a tag to identify the place at which the API documentation should be inserted: - -```` -## The XYZ package - -{{module}} - -Some extra content here. - -!!! example - ```python - import xyz - ``` - -{{xyz.asd}} -```` - -Finally, run the `auto_doc.py` script, as decribed above, to update the documentation. - -For information about Markdown syntax and possible Admonitions/Highlighting etc. see -the [Material for Mkdocs themes reference documentation](https://squidfunk.github.io/mkdocs-material/reference/abbreviations/). diff --git a/hsfs/docs/assets/images/favicon.ico b/hsfs/docs/assets/images/favicon.ico deleted file mode 100644 index ab7573067..000000000 Binary files a/hsfs/docs/assets/images/favicon.ico and /dev/null differ diff --git a/hsfs/docs/assets/images/hops-logo.png b/hsfs/docs/assets/images/hops-logo.png deleted file mode 100644 index d3625ae07..000000000 Binary files a/hsfs/docs/assets/images/hops-logo.png and /dev/null differ diff --git a/hsfs/docs/css/custom.css b/hsfs/docs/css/custom.css deleted file mode 100644 index 45f87459a..000000000 --- a/hsfs/docs/css/custom.css +++ /dev/null @@ -1,114 +0,0 @@ -[data-md-color-scheme="hopsworks"] { - --md-primary-fg-color: #1EB382; - --md-secondary-fg-color: #188a64; - --md-tertiary-fg-color: #0d493550; - --md-quaternary-fg-color: #fdfdfd; - --border-radius-variable: 5px; -} - -.md-footer__inner:not([hidden]) { - display: none -} - -/* Lex did stuff here */ -.svg_topnav{ - width: 12px; - filter: invert(100); -} -.svg_topnav:hover{ - width: 12px; - filter: invert(10); -} - -.md-header[data-md-state=shadow] { - box-shadow: 0 0 0 0; -} - -.md-tabs__item { - min-width: 2.25rem; - min-height: 1.5rem; -} - -.md-tabs__item:hover { - background-color: var(--md-tertiary-fg-color); - transition: background-color 450ms; -} - -/* -.md-sidebar__scrollwrap{ - background-color: var(--md-quaternary-fg-color); - padding: 15px 5px 5px 5px; - border-radius: var(--border-radius-variable); -} -*/ -.md-nav__link:focus{ -} - -.image_logo_02{ - width:450px; -} - -/* End of Lex did stuff here */ - -.md-header__button.md-logo { - margin: .1rem; - padding: .1rem; -} - -.md-header__button.md-logo img, .md-header__button.md-logo svg { - display: block; - width: 1.8rem; - height: 1.8rem; - fill: currentColor; -} - -.md-tabs { - width: 100%; - overflow: auto; - color: var(--md-primary-bg-color); - background-color: var(--md-secondary-fg-color); - transition: background-color 250ms; -} - -.wrapper { - display: grid; - grid-template-columns: repeat(4, 1fr); - gap: 10px; - grid-auto-rows: minmax(100px, auto); -} - -.wrapper * { - border: 2px solid green; - text-align: center; - padding: 70px 0; -} - -.one { - grid-column: 1 / 2; - grid-row: 1; -} -.two { - grid-column: 2 / 3; - grid-row: 1; -} -.three { - grid-column: 3 / 4; - grid-row: 1; -} -.four { - grid-column: 4 / 5; - grid-row: 1; -} -.five { - grid-column: 1 / 3; - grid-row: 2; -} -.six { - grid-column: 3 / 5; - grid-row: 2; -} - -/* Jupyter Stuff */ -.jupyter-wrapper .jp-CodeCell .jp-Cell-inputWrapper .jp-InputPrompt { - display: none !important; -} diff --git a/hsfs/docs/css/dropdown.css b/hsfs/docs/css/dropdown.css deleted file mode 100644 index 531f7b10d..000000000 --- a/hsfs/docs/css/dropdown.css +++ /dev/null @@ -1,55 +0,0 @@ -/* Style The Dropdown Button */ -.dropbtn { - color: white; - border: none; - cursor: pointer; -} - -.md-tabs__list { - contain: inherit; -} - -.md-tabs { - overflow: inherit; -} - - -/* The container
- needed to position the dropdown content */ -.dropdown { - position: absolute; - display: inline-block; -} - -/* Dropdown Content (Hidden by Default) */ -.dropdown-content { - display: none; - font-size: 13px; - position: absolute; - background-color: #f9f9f9; - min-width: 160px; - box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); - z-index: 1000; - border-radius: 2px; - left: -15px; -} - -/* Links inside the dropdown */ -.dropdown-content a { - color: black; - padding: 12px 16px; - text-decoration: none; - display: block; -} - -/* Change color of dropdown links on hover */ -.dropdown-content a:hover { - background-color: #f1f1f1 -} - -/* Show the dropdown menu on hover */ -.dropdown:hover .dropdown-content { - display: block; -} - -/* Change the background color of the dropdown button when the dropdown content is shown */ -.dropdown:hover .dropbtn {} \ No newline at end of file diff --git a/hsfs/docs/css/marctech.css b/hsfs/docs/css/marctech.css deleted file mode 100644 index 8bb58c97b..000000000 --- a/hsfs/docs/css/marctech.css +++ /dev/null @@ -1,1047 +0,0 @@ -:root { - --md-primary-fg-color: #1EB382; - --md-secondary-fg-color: #188a64; - --md-tertiary-fg-color: #0d493550; - --md-quaternary-fg-color: #fdfdfd; - --md-fiftuary-fg-color: #2471cf; - --border-radius-variable: 5px; - --border-width:1px; - } - - .marctech_main a{ - color: var(--md-fiftuary-fg-color); - border-bottom: 1px dotted var(--md-fiftuary-fg-color) !important; - text-decoration: dotted !important;} - - .marctech_main a:hover{ - border-bottom: 1px dotted var(--md-primary-fg-color)!important; - } - - .marctech_main a:visited{ - color: var(--md-tertiary-fg-color); - border-bottom: 1px dotted var(--md-tertiary-fg-color) !important; - - } - - .w-layout-grid { - display: -ms-grid; - display: grid; - grid-auto-columns: 1fr; - -ms-grid-columns: 1fr 1fr; - grid-template-columns: 1fr 1fr; - -ms-grid-rows: auto auto; - grid-template-rows: auto auto; - grid-row-gap: 16px; - grid-column-gap: 16px; - } - - .image_logo{ - width: 69%; - background-color: white; - z-index: 50; - padding: 0px 15px 0px 15px; - margin-bottom: 10px; - } - - .layer_02{ - pointer-events: none; - } - - .round-frame{ - pointer-events: initial; - } - - .marctech_main { - margin-top:-20px; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 55px; - } - - .collumns { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - height: 100%; - -webkit-box-align: stretch; - -webkit-align-items: stretch; - -ms-flex-align: stretch; - align-items: stretch; - } - - .col_heading { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } - - .enterprisefs { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } - - .enterprise_ai { - -webkit-align-self: center; - -ms-flex-item-align: center; - -ms-grid-row-align: center; - align-self: center; - -webkit-box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - } - - .side-content { - z-index: 0; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 240px; - height: 100%; - margin-top: 10px; - margin-bottom: 10px; - padding: 20px 10px; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - -webkit-align-content: flex-start; - -ms-flex-line-pack: start; - align-content: flex-start; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 10px; - background-color:var(--md-quaternary-fg-color); - } - .body { - padding: 40px; - font-family: Roboto, sans-serif; - } - - .green { - color: #1eb182; - font-size: 1.2vw; - } - - .rec_frame { - position: relative; - z-index: 1; - display: inline-block; - min-width: 150px; - margin-top: 10px; - margin-right: 10px; - margin-left: 10px; - padding: 10px 10px; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 10px; - background-color: #fff; - box-shadow: 4px 4px 0 0 rgba(88, 88, 88, 0.16); - -webkit-transition: box-shadow 200ms ease, border-color 200ms ease; - transition: box-shadow 200ms ease, border-color 200ms ease; - color: #585858; - text-align: center; - cursor: pointer; - } - - .rec_frame:hover { - border-color: #c2c2c2; - box-shadow: none; - } - - .name_item { - font-size: 0.7rem; - line-height: 120%; - font-weight: 700; - } - - .name_item.db { - position: relative; - z-index: 3; - text-align: left; - } - - .name_item.small { - font-size: 0.6rem; - font-weight: 500; - } - - .name_item.ingrey { - padding-bottom: 20px; - } - - .db_frame-mid { - position: relative; - z-index: 1; - margin-top: -8px; - padding: 5px 2px; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 0px 0% 50% 50%; - background-color: #fff; - color: #585858; - text-align: center; - } - - .db_frame-top { - position: relative; - z-index: 2; - padding: 5px 2px; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 50%; - background-color: #fff; - color: #585858; - text-align: center; - } - - .icondb { - position: relative; - width: 25px; - min-width: 25px; - margin-right: 10px; - } - - .db_frame { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 150px; - height: 55px; - padding: 20px 10px; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 10px; - background-color: #fff; - box-shadow: 4px 4px 0 0 rgba(88, 88, 88, 0.16); - -webkit-transition: box-shadow 200ms ease, border-color 200ms ease; - transition: box-shadow 200ms ease, border-color 200ms ease; - color: #585858; - text-align: center; - cursor: pointer; - } - - .db_frame:hover { - border-color: #c2c2c2; - box-shadow: none; - } - - .grid { - -ms-grid-rows: auto auto auto; - grid-template-rows: auto auto auto; - } - - .arrowdown { - position: relative; - z-index: 0; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - margin-top: -10px; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - } - - .heading_MT { - margin-top: 0px !important; - margin-bottom: 0px !important; - font-size: 1.3rem !important; - white-space: nowrap !important; - } - - .head_col { - padding-left: 10px; - } - - .MT_heading3 { - margin-top: 0px !important ; - font-size: 0.8rem !important; - } - - .MT_heading3.green { - color: #1eb182 !important; - } - - .column_sides { - position: relative; - z-index: 2; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } - - .hopsicon { - width: 45px; - height: 45px; - } - - .column_center { - z-index: 10; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } - - .center-content { - z-index: -50; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 750px; - height: 670px; - margin-top: 10px; - margin-bottom: 10px; - padding: 20px 10px; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - -webkit-align-content: center; - -ms-flex-line-pack: center; - align-content: center; - border-radius: 10px; - background-color: transparent; - } - - .image { - width: 260px; - } - - .layer_01 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: stretch; - -webkit-align-items: stretch; - -ms-flex-align: stretch; - align-items: stretch; - } - - .name_center { - font-size: 1rem; - font-weight: 700; - } - - .rec_frame_main { - position: relative; - z-index: 1; - margin-top: 10px; - margin-right: 10px; - margin-left: 10px; - padding: 5px 10px; - border-style: solid; - border-width: var(--border-width); - border-color: #1eb182; - border-radius: 10px; - background-color: #e6fdf6; - box-shadow: 4px 4px 0 0 #dcf7ee; - -webkit-transition: box-shadow 200ms ease, border-color 200ms ease; - transition: box-shadow 200ms ease, border-color 200ms ease; - color: #1eb182; - text-align: center; - cursor: pointer; - } - - .rec_frame_main:hover { - border-color: #9fecd4; - box-shadow: none; - } - - .rec_frame_main.no_content { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - height: 100%; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - box-shadow: 4px 4px 0 0 #dcf7ee; - } - - .rec_frame_main.no_content:hover { - border-color: #1eb182; - box-shadow: 4px 4px 0 0 rgba(88, 88, 88, 0.16); - } - - .name_item_02 { - font-size: 0.85rem; - font-weight: 700; - } - - .grid-infra { - padding-top: 20px; - -ms-grid-columns: 1fr 1fr 1fr 1fr; - grid-template-columns: 1fr 1fr 1fr 1fr; - -ms-grid-rows: auto; - grid-template-rows: auto; - } - - .rec_frame_main-white { - position: relative; - z-index: 1; - display: inline-block; - width: 100%; - margin-top: 10px; - margin-bottom: 10px; - padding: 5px 10px; - border-style: solid; - border-width: var(--border-width); - border-color: #1eb182; - border-radius: 10px; - background-color: #fff; - box-shadow: 4px 4px 0 0 rgba(88, 88, 88, 0.16); - -webkit-transition: box-shadow 200ms ease, border-color 200ms ease; - transition: box-shadow 200ms ease, border-color 200ms ease; - color: #1eb182; - text-align: center; - cursor: pointer; - } - - .rec_frame_main-white:hover { - border-color: #c2c2c2; - box-shadow: none; - } - - .rec_frame_main-white.dotted { - border-style: dotted; - } - - .column { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-box-align: stretch; - -webkit-align-items: stretch; - -ms-flex-align: stretch; - align-items: stretch; - } - - .columns_center { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - } - - .non-bold { - font-weight: 400; - } - - .logo-holder { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - } - - .infra { - text-align: center; - position: relative; - z-index: 30; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - padding: 10px; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - border: 1px dashed #000; - border-radius: 6px; - background-color: #fff; - cursor: pointer; - } - - .infra:hover { - border-style: solid; - border-color: #585858; - } - - .text_and_icon { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } - - .svg_icon { - width: 33px; - margin-right: 10px; - margin-left: 10px; - } - - .layer_02 { - position: absolute; - z-index: 10; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 96%; - height: 90%; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: stretch; - -webkit-align-items: stretch; - -ms-flex-align: stretch; - align-items: stretch; - border-style: solid; - border-width: calc (var(--border-width)*2); - border-color: #bbbbbb50 ; - border-radius: 100%; - background-color: transparent; - } - - .round-frame { - position: absolute; - left: 0%; - top: auto; - right: auto; - bottom: 0%; - z-index: 10; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 120px; - height: 120px; - margin: 10px; - padding: 20px; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 100%; - background-color: #fff; - outline-color: #fff; - outline-offset: 0px; - outline-style: solid; - outline-width: 7px; - -webkit-transition: box-shadow 200ms ease, border-color 200ms ease; - transition: box-shadow 200ms ease, border-color 200ms ease; - color: #585858; - text-align: center; - cursor: pointer; - } - - .round-frame:hover { - border-color: #c2c2c2; - box-shadow: none; - } - - .round-frame.top-left { - left: 4%; - top: 15%; - right: auto; - bottom: auto; - } - - .round-frame.bottom-left { - left: 4%; - bottom: 15%; - } - - .round-frame.top-right { - left: auto; - top: 15%; - right: 4%; - bottom: auto; - } - - .round-frame.bottom-right { - left: auto; - top: auto; - right: 4%; - bottom: 15%; - padding: 10px; - } - - .side-holder { - z-index: -1; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - height: 630px; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - } - - .infra-icon { - width: 25px; - height: 25px; - } - - .div-block { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - height: 100%; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - } - - #w-node-a2a9b648-f5dd-74e5-e1c2-f7aaf4fa1fcd-46672785 { - -ms-grid-column: span 1; - grid-column-start: span 1; - -ms-grid-column-span: 1; - grid-column-end: span 1; - -ms-grid-row: span 1; - grid-row-start: span 1; - -ms-grid-row-span: 1; - grid-row-end: span 1; - } - - #w-node-_466aa2bf-88bf-5a65-eab4-fc1eb95e7384-46672785 { - -ms-grid-column: span 1; - grid-column-start: span 1; - -ms-grid-column-span: 1; - grid-column-end: span 1; - -ms-grid-row: span 1; - grid-row-start: span 1; - -ms-grid-row-span: 1; - grid-row-end: span 1; - } - - #w-node-_87009ba3-d9a6-e0b7-4cce-581190a19cf3-46672785 { - -ms-grid-column: span 1; - grid-column-start: span 1; - -ms-grid-column-span: 1; - grid-column-end: span 1; - -ms-grid-row: span 1; - grid-row-start: span 1; - -ms-grid-row-span: 1; - grid-row-end: span 1; - } - - #w-node-_4a479fbb-90c7-9f47-d439-20aa6a224339-46672785 { - -ms-grid-column: span 1; - grid-column-start: span 1; - -ms-grid-column-span: 1; - grid-column-end: span 1; - -ms-grid-row: span 1; - grid-row-start: span 1; - -ms-grid-row-span: 1; - grid-row-end: span 1; - } - - - /* - - - inherited from the original template - - */ - - .w-container .w-row { - margin-left: -10px; - margin-right: -10px; - } - .w-row:before, - .w-row:after { - content: " "; - display: table; - grid-column-start: 1; - grid-row-start: 1; - grid-column-end: 2; - grid-row-end: 2; - } - .w-row:after { - clear: both; - } - .w-row .w-row { - margin-left: 0; - margin-right: 0; - } - .w-col { - position: relative; - float: left; - width: 100%; - min-height: 1px; - padding-left: 10px; - padding-right: 10px; - } - .w-col .w-col { - padding-left: 0; - padding-right: 0; - } - .w-col-1 { - width: 8.33333333%; - } - .w-col-2 { - width: 16.66666667%; - } - .w-col-3 { - width: 25%; - } - .w-col-4 { - width: 33.33333333%; - } - .w-col-5 { - width: 41.66666667%; - } - .w-col-6 { - width: 50%; - } - .w-col-7 { - width: 58.33333333%; - } - .w-col-8 { - width: 66.66666667%; - } - .w-col-9 { - width: 75%; - } - .w-col-10 { - width: 83.33333333%; - } - .w-col-11 { - width: 91.66666667%; - } - .w-col-12 { - width: 100%; - } - .w-hidden-main { - display: none !important; - } - @media screen and (max-width: 991px) { - .w-container { - max-width: 728px; - } - .w-hidden-main { - display: inherit !important; - } - .w-hidden-medium { - display: none !important; - } - .w-col-medium-1 { - width: 8.33333333%; - } - .w-col-medium-2 { - width: 16.66666667%; - } - .w-col-medium-3 { - width: 25%; - } - .w-col-medium-4 { - width: 33.33333333%; - } - .w-col-medium-5 { - width: 41.66666667%; - } - .w-col-medium-6 { - width: 50%; - } - .w-col-medium-7 { - width: 58.33333333%; - } - .w-col-medium-8 { - width: 66.66666667%; - } - .w-col-medium-9 { - width: 75%; - } - .w-col-medium-10 { - width: 83.33333333%; - } - .w-col-medium-11 { - width: 91.66666667%; - } - .w-col-medium-12 { - width: 100%; - } - .w-col-stack { - width: 100%; - left: auto; - right: auto; - } - } - @media screen and (max-width: 767px) { - .w-hidden-main { - display: inherit !important; - } - .w-hidden-medium { - display: inherit !important; - } - .w-hidden-small { - display: none !important; - } - .w-row, - .w-container .w-row { - margin-left: 0; - margin-right: 0; - } - .w-col { - width: 100%; - left: auto; - right: auto; - } - .w-col-small-1 { - width: 8.33333333%; - } - .w-col-small-2 { - width: 16.66666667%; - } - .w-col-small-3 { - width: 25%; - } - .w-col-small-4 { - width: 33.33333333%; - } - .w-col-small-5 { - width: 41.66666667%; - } - .w-col-small-6 { - width: 50%; - } - .w-col-small-7 { - width: 58.33333333%; - } - .w-col-small-8 { - width: 66.66666667%; - } - .w-col-small-9 { - width: 75%; - } - .w-col-small-10 { - width: 83.33333333%; - } - .w-col-small-11 { - width: 91.66666667%; - } - .w-col-small-12 { - width: 100%; - } - } - @media screen and (max-width: 479px) { - .w-container { - max-width: none; - } - .w-hidden-main { - display: inherit !important; - } - .w-hidden-medium { - display: inherit !important; - } - .w-hidden-small { - display: inherit !important; - } - .w-hidden-tiny { - display: none !important; - } - .w-col { - width: 100%; - } - .w-col-tiny-1 { - width: 8.33333333%; - } - .w-col-tiny-2 { - width: 16.66666667%; - } - .w-col-tiny-3 { - width: 25%; - } - .w-col-tiny-4 { - width: 33.33333333%; - } - .w-col-tiny-5 { - width: 41.66666667%; - } - .w-col-tiny-6 { - width: 50%; - } - .w-col-tiny-7 { - width: 58.33333333%; - } - .w-col-tiny-8 { - width: 66.66666667%; - } - .w-col-tiny-9 { - width: 75%; - } - .w-col-tiny-10 { - width: 83.33333333%; - } - .w-col-tiny-11 { - width: 91.66666667%; - } - .w-col-tiny-12 { - width: 100%; - } - } diff --git a/hsfs/docs/css/version-select.css b/hsfs/docs/css/version-select.css deleted file mode 100644 index 3b908ae84..000000000 --- a/hsfs/docs/css/version-select.css +++ /dev/null @@ -1,36 +0,0 @@ -@media only screen and (max-width:76.1875em) { -} - -#version-selector select.form-control { - appearance: none; - -webkit-appearance: none; - -moz-appearance: none; - - background-color: #F5F5F5; - - background-position: center right; - background-repeat: no-repeat; - border: 0px; - border-radius: 2px; - /* box-shadow: 0px 1px 3px rgb(0 0 0 / 10%); */ - color: inherit; - width: -webkit-fill-available; - width: -moz-available; - max-width: 200px; - font-size: inherit; - /* font-weight: 600; */ - margin: 10px; - overflow: hidden; - padding: 7px 10px; - text-overflow: ellipsis; - white-space: nowrap; -} - -#version-selector::after { - content: '⌄'; - font-family: inherit; - font-size: 22px; - margin: -35px; - vertical-align: 7%; - padding-bottom: 10px; -} diff --git a/hsfs/docs/index.md b/hsfs/docs/index.md deleted file mode 100644 index a13ea2ce5..000000000 --- a/hsfs/docs/index.md +++ /dev/null @@ -1,201 +0,0 @@ -# Hopsworks Feature Store - -

- Hopsworks Community - Hopsworks Feature Store Documentation - python - PyPiStatus - Scala/Java Artifacts - Downloads - Ruff - License -

- -HSFS is the library to interact with the Hopsworks Feature Store. The library makes creating new features, feature groups and training datasets easy. - -The library is environment independent and can be used in two modes: - -- 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. - -- 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. - -The library automatically configures itself based on the environment it is run. -However, to connect from an external environment such as Databricks or AWS Sagemaker, -additional connection information, such as host and port, is required. For more information checkout the [Hopsworks documentation](https://docs.hopsworks.ai/latest/). - -## Getting Started On Hopsworks - -Get started easily by registering an account on [Hopsworks Serverless](https://app.hopsworks.ai/). Create your project and a [new Api key](https://docs.hopsworks.ai/latest/user_guides/projects/api_key/create_api_key/). In a new python environment with Python 3.8 or higher, install the [client library](https://docs.hopsworks.ai/latest/user_guides/client_installation/) using pip: - -```bash -# Get all Hopsworks SDKs: Feature Store, Model Serving and Platform SDK -pip install hopsworks -# or minimum install with the Feature Store SDK -pip install hsfs[python] -# if using zsh don't forget the quotes -pip install 'hsfs[python]' -``` - -You can start a notebook and instantiate a connection and get the project feature store handler. - -```python -import hopsworks - -project = hopsworks.login() # you will be prompted for your api key -fs = project.get_feature_store() -``` - -or using `hsfs` directly: - -```python -import hsfs - -connection = hsfs.connection( - host="c.app.hopsworks.ai", # - project="your-project", - api_key_value="your-api-key", -) -fs = connection.get_feature_store() -``` - -Create a new feature group to start inserting feature values. -```python -fg = fs.create_feature_group("rain", - version=1, - description="Rain features", - primary_key=['date', 'location_id'], - online_enabled=True) - -fg.save(dataframe) -``` - -Upsert new data in to the feature group with `time_travel_format="HUDI"`". -```python -fg.insert(upsert_df) -``` - -Retrieve commit timeline metdata of the feature group with `time_travel_format="HUDI"`". -```python -fg.commit_details() -``` - -"Reading feature group as of specific point in time". -```python -fg = fs.get_feature_group("rain", 1) -fg.read("2020-10-20 07:34:11").show() -``` - -Read updates that occurred between specified points in time. -```python -fg = fs.get_feature_group("rain", 1) -fg.read_changes("2020-10-20 07:31:38", "2020-10-20 07:34:11").show() -``` - -Join features together -```python -feature_join = rain_fg.select_all() - .join(temperature_fg.select_all(), on=["date", "location_id"]) - .join(location_fg.select_all()) -feature_join.show(5) -``` - -join feature groups that correspond to specific point in time -```python -feature_join = rain_fg.select_all() - .join(temperature_fg.select_all(), on=["date", "location_id"]) - .join(location_fg.select_all()) - .as_of("2020-10-31") -feature_join.show(5) -``` - -join feature groups that correspond to different time -```python -rain_fg_q = rain_fg.select_all().as_of("2020-10-20 07:41:43") -temperature_fg_q = temperature_fg.select_all().as_of("2020-10-20 07:32:33") -location_fg_q = location_fg.select_all().as_of("2020-10-20 07:33:08") -joined_features_q = rain_fg_q.join(temperature_fg_q).join(location_fg_q) -``` - -Use the query object to create a training dataset: -```python -td = fs.create_training_dataset("rain_dataset", - version=1, - data_format="tfrecords", - description="A test training dataset saved in TfRecords format", - splits={'train': 0.7, 'test': 0.2, 'validate': 0.1}) - -td.save(feature_join) -``` - -A short introduction to the Scala API: -```scala -import com.logicalclocks.hsfs._ -val connection = HopsworksConnection.builder().build() -val fs = connection.getFeatureStore(); -val attendances_features_fg = fs.getFeatureGroup("games_features", 1); -attendances_features_fg.show(1) -``` - -You can find more examples on how to use the library in our [hops-examples](https://github.com/logicalclocks/hops-examples) repository. - -## Usage - -Usage data is collected for improving quality of the library. It is turned on by default if the backend -is "c.app.hopsworks.ai". To turn it off, use one of the following way: -```python -# use environment variable -import os -os.environ["ENABLE_HOPSWORKS_USAGE"] = "false" - -# use `disable_usage_logging` -import hsfs -hsfs.disable_usage_logging() -``` - -The source code can be found in python/hsfs/usage.py. - -## Documentation - -Documentation is available at [Hopsworks Feature Store Documentation](https://docs.hopsworks.ai/). - -## Issues - -For general questions about the usage of Hopsworks and the Feature Store please open a topic on [Hopsworks Community](https://community.hopsworks.ai/). - -Please report any issue using [Github issue tracking](https://github.com/logicalclocks/feature-store-api/issues). - -Please attach the client environment from the output below in the issue: -```python -import hopsworks -import hsfs -hopsworks.login().get_feature_store() -print(hsfs.get_env()) -``` - -## Contributing - -If you would like to contribute to this library, please see the [Contribution Guidelines](CONTRIBUTING.md). diff --git a/hsfs/docs/js/dropdown.js b/hsfs/docs/js/dropdown.js deleted file mode 100644 index 2618e0ce7..000000000 --- a/hsfs/docs/js/dropdown.js +++ /dev/null @@ -1,2 +0,0 @@ -document.getElementsByClassName("md-tabs__link")[7].style.display = "none"; -document.getElementsByClassName("md-tabs__link")[9].style.display = "none"; diff --git a/hsfs/docs/js/inject-api-links.js b/hsfs/docs/js/inject-api-links.js deleted file mode 100644 index aa5852283..000000000 --- a/hsfs/docs/js/inject-api-links.js +++ /dev/null @@ -1,32 +0,0 @@ -window.addEventListener("DOMContentLoaded", function () { - var windowPathNameSplits = window.location.pathname.split("/"); - var majorVersionRegex = new RegExp("(\\d+[.]\\d+)") - var latestRegex = new RegExp("latest"); - if (majorVersionRegex.test(windowPathNameSplits[1])) { // On landing page docs.hopsworks.api/3.0 - URL contains major version - // Version API dropdown - document.getElementById("hopsworks_api_link").href = "https://docs.hopsworks.ai/hopsworks-api/" + windowPathNameSplits[1] + "/generated/api/login/"; - document.getElementById("hsfs_api_link").href = "https://docs.hopsworks.ai/feature-store-api/" + windowPathNameSplits[1] + "/generated/api/connection_api/"; - document.getElementById("hsml_api_link").href = "https://docs.hopsworks.ai/machine-learning-api/" + windowPathNameSplits[1] + "/generated/connection_api/"; - } else { // on docs.hopsworks.api/feature-store-api/3.0 / docs.hopsworks.api/hopsworks-api/3.0 / docs.hopsworks.api/machine-learning-api/3.0 - if (latestRegex.test(windowPathNameSplits[2]) || latestRegex.test(windowPathNameSplits[1])) { - var majorVersion = "latest"; - } else { - - var apiVersion = windowPathNameSplits[2]; - var majorVersion = apiVersion.match(majorVersionRegex)[0]; - } - // Version main navigation - document.getElementsByClassName("md-tabs__link")[0].href = "https://docs.hopsworks.ai/" + majorVersion; - document.getElementsByClassName("md-tabs__link")[1].href = "https://colab.research.google.com/github/logicalclocks/hopsworks-tutorials/blob/master/quickstart.ipynb"; - document.getElementsByClassName("md-tabs__link")[2].href = "https://docs.hopsworks.ai/" + majorVersion + "/tutorials/"; - document.getElementsByClassName("md-tabs__link")[3].href = "https://docs.hopsworks.ai/" + majorVersion + "/concepts/hopsworks/"; - document.getElementsByClassName("md-tabs__link")[4].href = "https://docs.hopsworks.ai/" + majorVersion + "/user_guides/"; - document.getElementsByClassName("md-tabs__link")[5].href = "https://docs.hopsworks.ai/" + majorVersion + "/setup_installation/aws/getting_started/"; - document.getElementsByClassName("md-tabs__link")[6].href = "https://docs.hopsworks.ai/" + majorVersion + "/admin/"; - // Version API dropdown - document.getElementById("hopsworks_api_link").href = "https://docs.hopsworks.ai/hopsworks-api/" + majorVersion + "/generated/api/login/"; - document.getElementById("hsfs_api_link").href = "https://docs.hopsworks.ai/feature-store-api/" + majorVersion + "/generated/api/connection_api/"; - document.getElementById("hsfs_javadoc_link").href = "https://docs.hopsworks.ai/feature-store-api/" + majorVersion + "/javadoc"; - document.getElementById("hsml_api_link").href = "https://docs.hopsworks.ai/machine-learning-api/" + majorVersion + "/generated/connection_api/"; - } -}); diff --git a/hsfs/docs/js/version-select.js b/hsfs/docs/js/version-select.js deleted file mode 100644 index fcac029e3..000000000 --- a/hsfs/docs/js/version-select.js +++ /dev/null @@ -1,64 +0,0 @@ -window.addEventListener("DOMContentLoaded", function() { - // This is a bit hacky. Figure out the base URL from a known CSS file the - // template refers to... - var ex = new RegExp("/?css/version-select.css$"); - var sheet = document.querySelector('link[href$="version-select.css"]'); - - var ABS_BASE_URL = sheet.href.replace(ex, ""); - var CURRENT_VERSION = ABS_BASE_URL.split("/").pop(); - - function makeSelect(options, selected) { - var select = document.createElement("select"); - select.classList.add("form-control"); - - options.forEach(function(i) { - var option = new Option(i.text, i.value, undefined, - i.value === selected); - select.add(option); - }); - - return select; - } - - var xhr = new XMLHttpRequest(); - xhr.open("GET", ABS_BASE_URL + "/../versions.json"); - xhr.onload = function() { - var versions = JSON.parse(this.responseText); - - var realVersion = versions.find(function(i) { - return i.version === CURRENT_VERSION || - i.aliases.includes(CURRENT_VERSION); - }).version; - var latestVersion = versions.find(function(i) { - return i.aliases.includes("latest"); - }).version; - let outdated_banner = document.querySelector('div[data-md-color-scheme="default"][data-md-component="outdated"]'); - if (realVersion !== latestVersion) { - outdated_banner.removeAttribute("hidden"); - } else { - outdated_banner.setAttribute("hidden", ""); - } - - var select = makeSelect(versions.map(function(i) { - var allowedAliases = ["dev", "latest"] - if (i.aliases.length > 0) { - var aliasString = " [" + i.aliases.filter(function (str) { return allowedAliases.includes(str); }).join(", ") + "]"; - } else { - var aliasString = ""; - } - return {text: i.title + aliasString, value: i.version}; - }), realVersion); - select.addEventListener("change", function(event) { - window.location.href = ABS_BASE_URL + "/../" + this.value + "/generated/api/connection_api/"; - }); - - var container = document.createElement("div"); - container.id = "version-selector"; - // container.className = "md-nav__item"; - container.appendChild(select); - - var sidebar = document.querySelector(".md-nav--primary > .md-nav__list"); - sidebar.parentNode.insertBefore(container, sidebar.nextSibling); - }; - xhr.send(); -}); diff --git a/hsfs/docs/overrides/main.html b/hsfs/docs/overrides/main.html deleted file mode 100644 index ecb09de07..000000000 --- a/hsfs/docs/overrides/main.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base.html" %} - -{% block outdated %} -You're not viewing the latest version of the documentation. - - Click here to go to latest. - -{% endblock %} diff --git a/hsfs/java/pom.xml b/hsfs/java/pom.xml deleted file mode 100644 index 23136cb24..000000000 --- a/hsfs/java/pom.xml +++ /dev/null @@ -1,308 +0,0 @@ - - - 4.0.0 - - com.logicalclocks - hsfs-parent - pom - 4.0.0-SNAPSHOT - - hsfs - spark - flink - beam - - - - 1.8 - 1.8 - 14.0.1 - 4.5.6 - 4.4.13 - 1.7.30 - 1.2.17 - 2.1.8 - 1.18.10 - 2.10.0 - 1.1.0.6-SNAPSHOT - 0.12.3.0 - 2.10.40 - 2.12.10 - 2.12 - 0.0.5 - 20231013 - 0.12.2 - 5.9.1 - 2.22.0 - 4.3.1 - 1.8.2 - - spark3.1 - - UTF-8 - ${project.basedir}/delombok - - - - - org.projectlombok - lombok - ${lombok.version} - - - - com.damnhandy - handy-uri-templates - ${handy.version} - - - - com.google.guava - guava - ${guava.version} - provided - - - - org.apache.httpcomponents - httpclient - ${httpclient.version} - provided - - - - org.apache.httpcomponents - httpcore - ${httpcore.version} - provided - - - - org.slf4j - slf4j-api - ${slf4j.version} - provided - - - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - provided - - - - log4j - log4j - ${log4j.version} - provided - - - - org.json - json - ${json.version} - - - - io.specto - hoverfly-java - ${hoverfly.version} - test - - - - org.junit.jupiter - junit-jupiter-api - ${junit.version} - test - - - - org.junit.jupiter - junit-jupiter-engine - ${junit.version} - test - - - - org.mockito - mockito-core - ${mockito.version} - test - - - - - - - org.scala-tools - maven-scala-plugin - - ${scala.version} - - - - scala-compile-first - process-resources - - add-source - compile - - - - scala-test-compile - process-test-resources - - testCompile - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.4.1 - - - - jar-with-dependencies - - - - - make-assembly - - package - - single - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.1.1 - - - validate - validate - - check - - - - - src/main/resources/checkstyle.xml - src/main/resources/suppressions.xml - true - true - true - true - - src/main/java - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${surefire-plugin.version} - - - - hadoop.home.dir - ${project.basedir}/src/test/resources/hadoop/ - - - src/test/resources/system.properties - - - - org.projectlombok - lombok-maven-plugin - ${lombok.version}.0 - - ${project.basedir}/src/main/java - ${delombok.output} - false - - - - - delombok - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.5.0 - - - - **/MainClass.java - - **/beam/constructor/* - **/flink/constructor/* - - - - - aggregate - - aggregate - - site - - - - - - - - - - - src/test/resources - - - - - - - spark-3.3 - - 2.0.4.0-spark-3.3 - spark3.3 - - - - - - - Hops - Hops Repo - https://archiva.hops.works/repository/Hops/ - - true - - - true - - - - - - - Hops - Hops Repo - https://archiva.hops.works/repository/Hops/ - - - diff --git a/hsfs/mkdocs.yml b/hsfs/mkdocs.yml deleted file mode 100644 index 21fb704e1..000000000 --- a/hsfs/mkdocs.yml +++ /dev/null @@ -1,130 +0,0 @@ -site_name: "Hopsworks Documentation" -site_description: "Official documentation for Hopsworks and its Feature Store - an open source data-intensive AI platform used for the development and operation of machine learning models at scale." -site_author: "Logical Clocks" -site_url: "https://docs.hopsworks.ai/feature-store-api/latest" - -# Repository -repo_name: logicalclocks/hopsworks -repo_url: https://github.com/logicalclocks/hopsworks -edit_uri: "" - -nav: - - Home: https://docs.hopsworks.ai/ - - Getting Started ↗: https://docs.hopsworks.ai/ - - Tutorials: https://docs.hopsworks.ai/ - - Concepts: https://docs.hopsworks.ai/ - - Guides: https://docs.hopsworks.ai/ - - Setup and Installation: https://docs.hopsworks.ai/ - - Administration: https://docs.hopsworks.ai/ - - API: - - Feature Store API Reference: - - Connection: generated/api/connection_api.md - - ExpectationSuite: generated/api/expectation_suite_api.md - - FeatureStore: generated/api/feature_store_api.md - - FeatureGroup: generated/api/feature_group_api.md - - ExternalFeatureGroup: generated/api/external_feature_group_api.md - - SpineGroup: generated/api/spine_group_api.md - - FeatureView: generated/api/feature_view_api.md - - TrainingDataset: generated/api/training_dataset_api.md - - Storage Connector: generated/api/storage_connector_api.md - - Feature: generated/api/feature_api.md - - Query: generated/api/query_api.md - - Transformation Functions: generated/api/transformation_functions_api.md - - ValidationReport: generated/api/validation_report_api.md - - Job: generated/api/job.md - - Provenance Links: generated/api/links.md - - Statistics: - - Statistics: generated/api/statistics_api.md - - Split Statistics: generated/api/split_statistics_api.md - - Feature descriptive statistics: generated/api/feature_descriptive_statistics_api.md - - Feature Monitoring: - - Configuration: generated/api/feature_monitoring_config_api.md - - Result: generated/api/feature_monitoring_result_api.md - - Window: generated/api/feature_monitoring_window_config_api.md - - Embedding: - - EmbeddingIndex: generated/api/embedding_index_api.md - - EmbeddingFeature: generated/api/embedding_feature_api.md - - SimilarityFunctionType: generated/api/similarity_function_type_api.md - # Added to allow navigation using the side drawer - - Hopsworks API: https://docs.hopsworks.ai/hopsworks-api/latest/ - - MLOps API: https://docs.hopsworks.ai/machine-learning-api/latest/ - - Feature Store JavaDoc: https://docs.hopsworks.ai/feature-store-javadoc/latest/ - - Contributing: CONTRIBUTING.md - - Community ↗: https://community.hopsworks.ai/ - -theme: - name: material - custom_dir: docs/overrides - favicon: assets/images/favicon.ico - logo: assets/images/hops-logo.png - icon: - repo: fontawesome/brands/github - font: - text: "Roboto" - code: "IBM Plex Mono" - palette: - accent: teal - scheme: hopsworks - features: - - navigation.tabs - - navigation.tabs.sticky - - navigation.sections - - navigation.indexes - -extra: - analytics: - provider: google - property: G-64FEEXPSDN - generator: false - version: - - provider: mike - - default: latest - social: - - icon: fontawesome/brands/twitter - link: https://twitter.com/logicalclocks - - icon: fontawesome/brands/github - link: https://github.com/logicalclocks/hopsworks - - icon: fontawesome/brands/discourse - link: https://community.hopsworks.ai/ - - icon: fontawesome/brands/linkedin - link: https://www.linkedin.com/company/logicalclocks/ - -extra_css: - - css/custom.css - - css/version-select.css - - css/dropdown.css - - css/marctech.css - -extra_javascript: - - js/version-select.js - - js/inject-api-links.js - - js/dropdown.js - -plugins: - - search - - minify: - minify_html: true - minify_css: true - minify_js: true - - mike: - canonical_version: latest - -markdown_extensions: - - admonition - - codehilite - - footnotes - - pymdownx.tabbed: - alternate_style: true - - pymdownx.arithmatex - - pymdownx.superfences - - pymdownx.details - - pymdownx.caret - - pymdownx.mark - - pymdownx.tilde - - pymdownx.critic - - toc: - permalink: "#" - - pymdownx.tasklist: - custom_checkbox: true - - markdown_include.include: - base_path: docs diff --git a/hsfs/python/.pre-commit-config.yaml b/hsfs/python/.pre-commit-config.yaml deleted file mode 100644 index 98e886d9d..000000000 --- a/hsfs/python/.pre-commit-config.yaml +++ /dev/null @@ -1,8 +0,0 @@ -exclude: setup.py -repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.0 - hooks: - - id: ruff - args: [--fix] - - id: ruff-format \ No newline at end of file diff --git a/hsfs/python/pyproject.toml b/hsfs/python/pyproject.toml deleted file mode 100644 index 4869bf25b..000000000 --- a/hsfs/python/pyproject.toml +++ /dev/null @@ -1,173 +0,0 @@ -[project] -name = "hsfs" -dynamic = ["version"] -requires-python = ">=3.8,<3.13" -readme = "README.md" -description = "HSFS Python SDK to interact with Hopsworks Feature Store" -keywords = [ - "Hopsworks", - "Feature Store", - "hsfs", - "Spark", - "Machine Learning", - "MLOps", - "DataOps", -] -authors = [{ name = "Hopsworks AB", email = "robin@hopsworks.ai" }] -license = { text = "Apache-2.0" } - -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Topic :: Utilities", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Intended Audience :: Developers", -] - -dependencies = [ - "pyhumps==1.6.1", - "requests", - "furl", - "boto3", - "pandas<2.2.0", - "numpy<2", - "pyjks", - "mock", - "avro==1.11.3", - "sqlalchemy", - "PyMySQL[rsa]", - "tzlocal", - "fsspec", - "retrying", - "hopsworks_aiomysql[sa]==0.2.1", - "polars>=0.20.18,<=0.21.0", - "opensearch-py>=1.1.0,<=2.4.2", -] - -[project.optional-dependencies] -python = [ - "pyarrow>=10.0", - "confluent-kafka<=2.3.0", - "fastavro>=1.4.11,<=1.8.4", - "tqdm", -] -great-expectations = ["great_expectations==0.18.12"] -dev-no-opt = [ - "pytest==7.4.4", - "pytest-mock==3.12.0", - "ruff", - "pyspark==3.1.1", - "moto[s3]==5.0.0", - "typeguard==4.2.1", -] -dev-pandas1 = [ - "pytest==7.4.4", - "pytest-mock==3.12.0", - "ruff", - "pyspark==3.1.1", - "moto[s3]==5.0.0", - "pandas<=1.5.3", - "sqlalchemy<=1.4.48", -] -dev = ["hsfs[dev-no-opt]", "hsfs[great-expectations]"] - - -[build-system] -requires = ["setuptools", "wheel"] -build-backend = "setuptools.build_meta" - -[tool.setuptools.packages.find] -exclude = ["tests*"] -include = ["../Readme.md", "../LICENSE", "hsfs", "hsfs.*"] - -[tool.setuptools.dynamic] -version = { attr = "hsfs.version.__version__" } - -[project.urls] -Documentation = "https://docs.hopsworks.ai/latest" -Repository = "https://github.com/logicalclocks/feature-store-api" -Homepage = "https://www.hopsworks.ai" -Community = "https://community.hopsworks.ai" - - -[tool.ruff] -# Exclude a variety of commonly ignored directories. -exclude = [ - ".bzr", - ".direnv", - ".eggs", - ".git", - ".git-rewrite", - ".hg", - ".ipynb_checkpoints", - ".mypy_cache", - ".nox", - ".pants.d", - ".pyenv", - ".pytest_cache", - ".pytype", - ".ruff_cache", - ".svn", - ".tox", - ".venv", - ".vscode", - "__pypackages__", - "_build", - "buck-out", - "build", - "dist", - "node_modules", - "site-packages", - "venv", - "java" -] - -# Same as Black. -line-length = 88 -indent-width = 4 - -# Assume Python 3.8+ syntax. -target-version = "py38" - -[tool.ruff.lint] -# 1. Enable flake8-bugbear (`B`) rules, in addition to the defaults. -select = ["E4", "E7", "E9", "F", "B", "I", "W"] #, "ANN"] -ignore = [ - "B905", # zip has no strict kwarg until Python 3.10 - "ANN101", # Missing type annotation for self in method - "ANN102", # Missing type annotation for cls in classmethod - "ANN003", # Missing type annotation for **kwarg in function - "ANN002", # Missing type annotation for *args in function - "ANN401", # Allow Any in type annotations - "W505", # Doc line too long -] - -# Allow fix for all enabled rules (when `--fix`) is provided. -fixable = ["ALL"] -unfixable = [] - -# Allow unused variables when underscore-prefixed. -dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" - -[tool.ruff.lint.isort] -lines-after-imports = 2 -known-third-party = ["hopsworks", "hsfs", "hsml"] - - -[tool.ruff.format] -# Like Black, use double quotes for strings. -quote-style = "double" - -# Like Black, indent with spaces, rather than tabs. -indent-style = "space" - -# Like Black, respect magic trailing commas. -skip-magic-trailing-comma = false - -# Like Black, automatically detect the appropriate line ending. -line-ending = "auto" diff --git a/hsfs/python/setup.py b/hsfs/python/setup.py deleted file mode 100644 index b024da80e..000000000 --- a/hsfs/python/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -from setuptools import setup - - -setup() diff --git a/hsfs/python/tests/__init__.py b/hsfs/python/tests/__init__.py deleted file mode 100644 index 11e65f162..000000000 --- a/hsfs/python/tests/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright 2020 Logical Clocks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# diff --git a/hsfs/python/tests/fixtures/tag_fixtures.json b/hsfs/python/tests/fixtures/tag_fixtures.json deleted file mode 100644 index b171d806f..000000000 --- a/hsfs/python/tests/fixtures/tag_fixtures.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "get": { - "response": { - "count": 1, - "items": [ - { - "name": "test_name", - "value": "test_value", - "schema": "test_schema", - "href": "test_href", - "expand": "test_expand", - "items": [], - "count": 0, - "type": "tagDTO" - } - ] - } - }, - "get_empty": { - "response": { - "count": 0, - "items": [] - } - } -} \ No newline at end of file diff --git a/hsfs/python/tests/pyproject.toml b/hsfs/python/tests/pyproject.toml deleted file mode 100644 index 050735f85..000000000 --- a/hsfs/python/tests/pyproject.toml +++ /dev/null @@ -1,37 +0,0 @@ -[tool.ruff.lint] -# 1. Enable flake8-bugbear (`B`) rules, in addition to the defaults. -select = ["E4", "E7", "E9", "F", "B", "I"] -ignore = [ - "B905", # zip has no strict kwarg until Python 3.10 -] - -# Allow fix for all enabled rules (when `--fix`) is provided. -fixable = ["ALL"] -unfixable = [] - -# Allow unused variables when underscore-prefixed. -dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" - -[tool.ruff.lint.isort] -lines-after-imports = 2 -known-third-party = ["hopsworks", "hsfs", "hsml"] - - -[tool.ruff.format] -# Like Black, use double quotes for strings. -quote-style = "double" - -# Like Black, indent with spaces, rather than tabs. -indent-style = "space" - -# Like Black, respect magic trailing commas. -skip-magic-trailing-comma = false - -# Like Black, automatically detect the appropriate line ending. -line-ending = "auto" - -[tool.pytest.ini_options] -pythonpath = [ - ".", "tests" -] -addopts = "--ignore=python/tests/test_helper/" diff --git a/hsfs/python/tests/test_tag.py b/hsfs/python/tests/test_tag.py deleted file mode 100644 index b66672cbe..000000000 --- a/hsfs/python/tests/test_tag.py +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright 2022 Hopsworks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -from hsfs import tag - - -class TestTag: - def test_from_response_json(self, backend_fixtures): - # Arrange - json = backend_fixtures["tag"]["get"]["response"] - - # Act - t_list = tag.Tag.from_response_json(json) - - # Assert - assert len(t_list) == 1 - t = t_list[0] - assert t.name == "test_name" - assert t.value == "test_value" - - def test_from_response_json_empty(self, backend_fixtures): - # Arrange - json = backend_fixtures["tag"]["get_empty"]["response"] - - # Act - t_list = tag.Tag.from_response_json(json) - - # Assert - assert len(t_list) == 0 diff --git a/hsfs/python/tests/test_util.py b/hsfs/python/tests/test_util.py deleted file mode 100644 index 217611bd1..000000000 --- a/hsfs/python/tests/test_util.py +++ /dev/null @@ -1,230 +0,0 @@ -# -# Copyright 2022 Hopsworks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import asyncio -from datetime import date, datetime - -import pytest -import pytz -from hsfs import util -from hsfs.client.exceptions import FeatureStoreException -from hsfs.core.constants import HAS_AIOMYSQL, HAS_SQLALCHEMY -from hsfs.embedding import EmbeddingFeature, EmbeddingIndex -from hsfs.feature import Feature -from mock import patch - - -if HAS_SQLALCHEMY and HAS_AIOMYSQL: - from hsfs.core import util_sql - - -class TestUtil: - def test_get_hudi_datestr_from_timestamp(self): - dt = util.get_hudi_datestr_from_timestamp(1640995200000) - assert dt == "20220101000000000" - - def test_convert_event_time_to_timestamp_timestamp(self): - dt = util.convert_event_time_to_timestamp(1640995200) - assert dt == 1640995200000 - - def test_convert_event_time_to_timestamp_datetime(self): - dt = util.convert_event_time_to_timestamp(datetime(2022, 1, 1, 0, 0, 0)) - assert dt == 1640995200000 - - def test_convert_event_time_to_timestamp_datetime_tz(self): - dt = util.convert_event_time_to_timestamp( - pytz.timezone("US/Pacific").localize(datetime(2021, 12, 31, 16, 0, 0)) - ) - assert dt == 1640995200000 - - def test_convert_event_time_to_timestamp_date(self): - dt = util.convert_event_time_to_timestamp(date(2022, 1, 1)) - assert dt == 1640995200000 - - def test_convert_event_time_to_timestamp_string(self): - dt = util.convert_event_time_to_timestamp("2022-01-01 00:00:00") - assert dt == 1640995200000 - - def test_convert_iso_event_time_to_timestamp_string(self): - dt = util.convert_event_time_to_timestamp("2022-01-01T00:00:00.000000Z") - assert dt == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd(self): - timestamp = util.get_timestamp_from_date_string("2022-01-01") - assert timestamp == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh(self): - timestamp = util.get_timestamp_from_date_string("2022-01-01 00") - assert timestamp == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm(self): - timestamp = util.get_timestamp_from_date_string("2022-01-01 00:00") - assert timestamp == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss(self): - timestamp = util.get_timestamp_from_date_string("2022-01-01 00:00:00") - assert timestamp == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_f(self): - timestamp = util.get_timestamp_from_date_string("2022-01-01 00:00:00.000") - assert timestamp == 1640995200000 - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error(self): - with pytest.raises(ValueError): - util.get_timestamp_from_date_string("2022-13-01 00:00:00") - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error2(self): - with pytest.raises(ValueError): - util.get_timestamp_from_date_string("202-13-01 00:00:00") - - def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error3(self): - with pytest.raises(ValueError): - util.get_timestamp_from_date_string("00:00:00 2022-01-01") - - def test_convert_hudi_commit_time_to_timestamp(self): - timestamp = util.get_timestamp_from_date_string("20221118095233099") - assert timestamp == 1668765153099 - - def test_get_dataset_type_HIVEDB(self): - db_type = util.get_dataset_type( - "/apps/hive/warehouse/temp_featurestore.db/storage_connector_resources/kafka__tstore.jks" - ) - assert db_type == "HIVEDB" - - def test_get_dataset_type_HIVEDB_with_dfs(self): - db_type = util.get_dataset_type( - "hdfs:///apps/hive/warehouse/temp_featurestore.db/storage_connector_resources/kafka__tstore.jks" - ) - assert db_type == "HIVEDB" - - def test_get_dataset_type_DATASET(self): - db_type = util.get_dataset_type("/Projects/temp/Resources/kafka__tstore.jks") - assert db_type == "DATASET" - - def test_get_dataset_type_DATASET_with_dfs(self): - db_type = util.get_dataset_type( - "hdfs:///Projects/temp/Resources/kafka__tstore.jks" - ) - assert db_type == "DATASET" - - def test_get_job_url(self, mocker): - # Arrange - mock_client_get_instance = mocker.patch("hsfs.client.get_instance") - - # Act - util.get_job_url(href="1/2/3/4/5/6/7/8") - - # Assert - assert ( - mock_client_get_instance.return_value.replace_public_host.call_args[0][ - 0 - ].path - == "p/5/jobs/named/7/executions" - ) - - def test_get_feature_group_url(self, mocker): - # Arrange - feature_store_id = 99 - feature_group_id = 10 - mock_client_get_instance = mocker.patch("hsfs.client.get_instance") - mock_util_get_hostname_replaced_url = mocker.patch( - "hsfs.util.get_hostname_replaced_url" - ) - mock_client_get_instance.return_value._project_id = 50 - - # Act - util.get_feature_group_url( - feature_group_id=feature_group_id, feature_store_id=feature_store_id - ) - - # Assert - assert mock_util_get_hostname_replaced_url.call_count == 1 - assert ( - mock_util_get_hostname_replaced_url.call_args[0][0] == "/p/50/fs/99/fg/10" - ) - - def test_valid_embedding_type(self): - embedding_index = EmbeddingIndex( - features=[ - EmbeddingFeature("feature1", 3), - EmbeddingFeature("feature2", 3), - EmbeddingFeature("feature3", 3), - EmbeddingFeature("feature4", 3), - ] - ) - # Define a schema with valid feature types - schema = [ - Feature(name="feature1", type="array"), - Feature(name="feature2", type="array"), - Feature(name="feature3", type="array"), - Feature(name="feature4", type="array"), - ] - # Call the method and expect no exceptions - util.validate_embedding_feature_type(embedding_index, schema) - - def test_invalid_embedding_type(self): - embedding_index = EmbeddingIndex( - features=[ - EmbeddingFeature("feature1", 3), - EmbeddingFeature("feature2", 3), - ] - ) - # Define a schema with an invalid feature type - schema = [ - Feature(name="feature1", type="array"), - Feature(name="feature2", type="array"), # Invalid type - ] - # Call the method and expect a FeatureStoreException - with pytest.raises(FeatureStoreException): - util.validate_embedding_feature_type(embedding_index, schema) - - def test_missing_embedding_index(self): - # Define a schema without an embedding index - schema = [ - Feature(name="feature1", type="array"), - Feature(name="feature2", type="array"), - ] - # Call the method with an empty feature_group (no embedding index) - util.validate_embedding_feature_type(None, schema) - # No exception should be raised - - def test_empty_schema(self): - embedding_index = EmbeddingIndex( - features=[ - EmbeddingFeature("feature1", 3), - EmbeddingFeature("feature2", 3), - ] - ) - # Define an empty schema - schema = [] - # Call the method with an empty schema - util.validate_embedding_feature_type(embedding_index, schema) - # No exception should be raised - - @pytest.mark.skipif( - not HAS_SQLALCHEMY or not HAS_AIOMYSQL, - reason="SQLAlchemy or aiomysql is not installed", - ) - def test_create_async_engine(self, mocker): - # Test when get_running_loop() raises a RuntimeError - with patch("asyncio.get_running_loop", side_effect=RuntimeError): - # mock storage connector - online_connector = patch.object(util, "get_online_connector") - with pytest.raises( - RuntimeError, - match="Event loop is not running. Please invoke this co-routine from a running loop or provide an event loop.", - ): - asyncio.run(util_sql.create_async_engine(online_connector, True, 1)) diff --git a/hsfs/requirements-docs.txt b/hsfs/requirements-docs.txt deleted file mode 100644 index 2a2e7927b..000000000 --- a/hsfs/requirements-docs.txt +++ /dev/null @@ -1,12 +0,0 @@ -mkdocs==1.5.3 -mkdocs-material==9.5.17 -mike==2.0.0 -sphinx==7.3.7 -keras_autodoc @ git+https://git@github.com/logicalclocks/keras-autodoc -markdown-include==0.8.1 -mkdocs-jupyter==0.24.3 -markdown==3.6 -pymdown-extensions==10.7.1 -mkdocs-macros-plugin==1.0.4 -mkdocs-minify-plugin>=0.2.0 - diff --git a/hsml/.github/workflows/mkdocs-main.yml b/hsml/.github/workflows/mkdocs-main.yml deleted file mode 100644 index 001f1fad1..000000000 --- a/hsml/.github/workflows/mkdocs-main.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: mkdocs-main - -on: pull_request - -jobs: - publish-main: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: set dev version - working-directory: ./java - run: echo "DEV_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev 'Download|INFO|WARNING')" >> $GITHUB_ENV - - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - - name: install deps - working-directory: ./python - run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[dev] - - - name: generate autodoc - run: python3 auto_doc.py - - - name: setup git - run: | - git config --global user.name Mike - git config --global user.email mike@docs.hopsworks.ai - - - name: mike deploy docs - run: mike deploy ${{ env.DEV_VERSION }} dev -u diff --git a/hsml/.github/workflows/mkdocs-release.yml b/hsml/.github/workflows/mkdocs-release.yml deleted file mode 100644 index e2b4b2b3f..000000000 --- a/hsml/.github/workflows/mkdocs-release.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: mkdocs-release - -on: - push: - branches: [branch-*\.*] - -jobs: - publish-release: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: set major/minor/bugfix release version - working-directory: ./java - run: echo "RELEASE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev 'Download|INFO|WARNING')" >> $GITHUB_ENV - - - name: set major/minor release version - run: echo "MAJOR_VERSION=$(echo $RELEASE_VERSION | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/')" >> $GITHUB_ENV - - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - - name: install deps - working-directory: ./python - run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[dev] - - - name: generate autodoc - run: python3 auto_doc.py - - - name: setup git - run: | - git config --global user.name Mike - git config --global user.email mike@docs.hopsworks.ai - - - name: mike deploy docs - run: | - mike deploy ${{ env.RELEASE_VERSION }} ${{ env.MAJOR_VERSION }} -u --push - mike alias ${{ env.RELEASE_VERSION }} latest -u --push diff --git a/hsml/.github/workflows/python-lint.yml b/hsml/.github/workflows/python-lint.yml deleted file mode 100644 index 88225add7..000000000 --- a/hsml/.github/workflows/python-lint.yml +++ /dev/null @@ -1,163 +0,0 @@ -name: python - -on: pull_request - -jobs: - lint_stylecheck: - name: Lint and Stylecheck - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Get all changed files - id: get-changed-files - uses: tj-actions/changed-files@v44 - with: - files_yaml: | - src: - - 'python/**/*.py' - - '!python/tests/**/*.py' - test: - - 'python/tests/**/*.py' - - - name: install deps - run: pip install ruff==0.4.2 - - - name: ruff on python files - if: steps.get-changed-files.outputs.src_any_changed == 'true' - env: - SRC_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.src_all_changed_files }} - run: ruff check --output-format=github $SRC_ALL_CHANGED_FILES - - - name: ruff on test files - if: steps.get-changed-files.outputs.test_any_changed == 'true' - env: - TEST_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.test_all_changed_files }} - run: ruff check --output-format=github $TEST_ALL_CHANGED_FILES - - - name: ruff format --check $ALL_CHANGED_FILES - env: - ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.all_changed_files }} - run: ruff format $ALL_CHANGED_FILES - - unit_tests_ubuntu_utc: - name: Unit Testing (Ubuntu) - needs: lint_stylecheck - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - - steps: - - name: Set Timezone - run: sudo timedatectl set-timezone UTC - - - uses: actions/checkout@v4 - - name: Copy README - run: cp README.md python/ - - - uses: actions/setup-python@v5 - name: Setup Python - with: - python-version: ${{ matrix.python-version }} - cache: "pip" - cache-dependency-path: "python/setup.py" - - run: pip install -e python[dev] - - - name: Display Python version - run: python --version - - - name: Run Pytest suite - run: pytest python/tests - - unit_tests_ubuntu_local: - name: Unit Testing (Ubuntu) (Local TZ) - needs: lint_stylecheck - runs-on: ubuntu-latest - - steps: - - name: Set Timezone - run: sudo timedatectl set-timezone Europe/Amsterdam - - - uses: actions/checkout@v4 - - name: Copy README - run: cp README.md python/ - - - uses: actions/setup-python@v5 - name: Setup Python - with: - python-version: "3.12" - cache: "pip" - cache-dependency-path: "python/setup.py" - - run: pip install -e python[dev] - - - name: Display Python version - run: python --version - - - name: Run Pytest suite - run: pytest python/tests - - unit_tests_windows_utc: - name: Unit Testing (Windows) - needs: lint_stylecheck - runs-on: windows-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - - steps: - - name: Set Timezone - run: tzutil /s "UTC" - - - uses: actions/checkout@v4 - - name: Copy README - run: cp README.md python/ - - - uses: actions/setup-python@v5 - name: Setup Python - with: - python-version: ${{ matrix.python-version }} - cache: "pip" - cache-dependency-path: "python/setup.py" - - run: pip install -e python[dev] - - - name: Display Python version - run: python --version - - - name: Run Pytest suite - run: pytest python/tests - - unit_tests_windows_local: - name: Unit Testing (Windows) (Local TZ) - needs: lint_stylecheck - runs-on: windows-latest - - steps: - - name: Set Timezone - run: tzutil /s "W. Europe Standard Time" - - - uses: actions/checkout@v4 - - name: Copy README - run: cp README.md python/ - - - uses: actions/setup-python@v5 - name: Setup Python - with: - python-version: "3.12" - cache: "pip" - cache-dependency-path: "python/setup.py" - - run: pip install -e python[dev] - - - name: Display Python version - run: python --version - - - name: Display pip freeze - run: pip freeze - - - name: Run Pytest suite - run: pytest python/tests diff --git a/hsml/.gitignore b/hsml/.gitignore deleted file mode 100644 index 6e96d8144..000000000 --- a/hsml/.gitignore +++ /dev/null @@ -1,130 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST -python/README.md -python/LICENSE - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ -.ruff_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# Java -.idea -.vscode -*.iml -target/ - -# Mac -.DS_Store - -# mkdocs intemediate files -docs/generated diff --git a/hsml/CONTRIBUTING.md b/hsml/CONTRIBUTING.md deleted file mode 100644 index b287467c6..000000000 --- a/hsml/CONTRIBUTING.md +++ /dev/null @@ -1,215 +0,0 @@ -## Python development setup ---- - -- Fork and clone the repository - -- Create a new Python environment with your favourite environment manager, e.g. virtualenv or conda - -- Install repository in editable mode with development dependencies: - - ```bash - cd python - pip install -e ".[dev]" - ``` - -- Install [pre-commit](https://pre-commit.com/) and then activate its hooks. pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. The Model Registry uses pre-commit to ensure code-style and code formatting through [ruff](https://docs.astral.sh/ruff/). Run the following commands from the `python` directory: - - ```bash - cd python - pip install --user pre-commit - pre-commit install - ``` - - Afterwards, pre-commit will run whenever you commit. - -- To run formatting and code-style separately, you can configure your IDE, such as VSCode, to use [ruff](https://docs.astral.sh/ruff/tutorial/#getting-started): - - ```bash - cd python - ruff check --fix - ruff format - ``` - -### Python documentation - -We follow a few best practices for writing the Python documentation: - -1. Use the google docstring style: - - ```python - """[One Line Summary] - - [Extended Summary] - - [!!! example - import xyz - ] - - # Arguments - arg1: Type[, optional]. Description[, defaults to `default`] - arg2: Type[, optional]. Description[, defaults to `default`] - - # Returns - Type. Description. - - # Raises - Exception. Description. - """ - ``` - - If Python 3 type annotations are used, they are inserted automatically. - - -2. Model registry entity engine methods (e.g. ModelEngine etc.) only require a single line docstring. -3. REST Api implementations (e.g. ModelApi etc.) should be fully documented with docstrings without defaults. -4. Public Api such as metadata objects should be fully documented with defaults. - -#### Setup and Build Documentation - -We use `mkdocs` together with `mike` ([for versioning](https://github.com/jimporter/mike/)) to build the documentation and a plugin called `keras-autodoc` to auto generate Python API documentation from docstrings. - -**Background about `mike`:** - `mike` builds the documentation and commits it as a new directory to the gh-pages branch. Each directory corresponds to one version of the documentation. Additionally, `mike` maintains a json in the root of gh-pages with the mappings of versions/aliases for each of the directories available. With aliases you can define extra names like `dev` or `latest`, to indicate stable and unstable releases. - -1. Currently we are using our own version of `keras-autodoc` - - ```bash - pip install git+https://github.com/logicalclocks/keras-autodoc - ``` - -2. Install HSML with `docs` extras: - - ```bash - pip install -e .[dev,docs] - ``` - -3. To build the docs, first run the auto doc script: - - ```bash - cd .. - python auto_doc.py - ``` - -##### Option 1: Build only current version of docs - -4. Either build the docs, or serve them dynamically: - - Note: Links and pictures might not resolve properly later on when checking with this build. - The reason for that is that the docs are deployed with versioning on docs.hopsworks.ai and - therefore another level is added to all paths, e.g. `docs.hopsworks.ai/[version-or-alias]`. - Using relative links should not be affected by this, however, building the docs with version - (Option 2) is recommended. - - ```bash - mkdocs build - # or - mkdocs serve - ``` - -##### Option 2 (Preferred): Build multi-version doc with `mike` - -###### Versioning on docs.hopsworks.ai - -On docs.hopsworks.ai we implement the following versioning scheme: - -- current master branches (e.g. of hsml corresponding to master of Hopsworks): rendered as current Hopsworks snapshot version, e.g. **2.2.0-SNAPSHOT [dev]**, where `dev` is an alias to indicate that this is an unstable version. -- the latest release: rendered with full current version, e.g. **2.1.5 [latest]** with `latest` alias to indicate that this is the latest stable release. -- previous stable releases: rendered without alias, e.g. **2.1.4**. - -###### Build Instructions - -4. For this you can either checkout and make a local copy of the `upstream/gh-pages` branch, where -`mike` maintains the current state of docs.hopsworks.ai, or just build documentation for the branch you are updating: - - Building *one* branch: - - Checkout your dev branch with modified docs: - ```bash - git checkout [dev-branch] - ``` - - Generate API docs if necessary: - ```bash - python auto_doc.py - ``` - - Build docs with a version and alias - ```bash - mike deploy [version] [alias] --update-alias - - # for example, if you are updating documentation to be merged to master, - # which will become the new SNAPSHOT version: - mike deploy 2.2.0-SNAPSHOT dev --update-alias - - # if you are updating docs of the latest stable release branch - mike deploy [version] latest --update-alias - - # if you are updating docs of a previous stable release branch - mike deploy [version] - ``` - - If no gh-pages branch existed in your local repository, this will have created it. - - **Important**: If no previous docs were built, you will have to choose a version as default to be loaded as index, as follows - - ```bash - mike set-default [version-or-alias] - ``` - - You can now checkout the gh-pages branch and serve: - ```bash - git checkout gh-pages - mike serve - ``` - - You can also list all available versions/aliases: - ```bash - mike list - ``` - - Delete and reset your local gh-pages branch: - ```bash - mike delete --all - - # or delete single version - mike delete [version-or-alias] - ``` - -#### Adding new API documentation - -To add new documentation for APIs, you need to add information about the method/class to document to the `auto_doc.py` script: - -```python -PAGES = { - "connection.md": [ - "hsml.connection.Connection.connection", - "hsml.connection.Connection.setup_databricks", - ] - "new_template.md": [ - "module", - "xyz.asd" - ] -} -``` - -Now you can add a template markdown file to the `docs/templates` directory with the name you specified in the auto-doc script. The `new_template.md` file should contain a tag to identify the place at which the API documentation should be inserted: - -``` -## The XYZ package - -{{module}} - -Some extra content here. - -!!! example - ```python - import xyz - ``` - -{{xyz.asd}} -``` - -Finally, run the `auto_doc.py` script, as decribed above, to update the documentation. - -For information about Markdown syntax and possible Admonitions/Highlighting etc. see -the [Material for Mkdocs themes reference documentation](https://squidfunk.github.io/mkdocs-material/reference/abbreviations/). diff --git a/hsml/Dockerfile b/hsml/Dockerfile deleted file mode 100644 index 7f87ca293..000000000 --- a/hsml/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM ubuntu:20.04 - -RUN apt-get update && \ - apt-get install -y python3-pip git && apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -RUN pip3 install twine - -RUN mkdir -p /.local && chmod -R 777 /.local diff --git a/hsml/Jenkinsfile b/hsml/Jenkinsfile deleted file mode 100644 index d2014d5cb..000000000 --- a/hsml/Jenkinsfile +++ /dev/null @@ -1,23 +0,0 @@ -pipeline { - agent { - docker { - label "local" - image "docker.hops.works/hopsworks_twine:0.0.1" - } - } - stages { - stage("publish") { - environment { - PYPI = credentials('977daeb0-e1c8-43a0-b35a-fc37bb9eee9b') - } - steps { - dir("python") { - sh "rm -f LICENSE README.md" - sh "cp -f ../LICENSE ../README.md ./" - sh "python3 -m build" - sh "twine upload -u $PYPI_USR -p $PYPI_PSW --skip-existing dist/*" - } - } - } - } -} diff --git a/hsml/LICENSE b/hsml/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/hsml/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/hsml/README.md b/hsml/README.md deleted file mode 100644 index ee835ddc7..000000000 --- a/hsml/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Hopsworks Model Management - -

- Hopsworks Community - Hopsworks Model Management Documentation - python - PyPiStatus - Scala/Java Artifacts - Downloads - Ruff - License -

- -HSML is the library to interact with the Hopsworks Model Registry and Model Serving. The library makes it easy to export, manage and deploy models. - -However, to connect from an external Python environment additional connection information, such as host and port, is required. - -## Getting Started On Hopsworks - -Get started easily by registering an account on [Hopsworks Serverless](https://app.hopsworks.ai/). Create your project and a [new Api key](https://docs.hopsworks.ai/latest/user_guides/projects/api_key/create_api_key/). In a new python environment with Python 3.8 or higher, install the [client library](https://docs.hopsworks.ai/latest/user_guides/client_installation/) using pip: - -```bash -# Get all Hopsworks SDKs: Feature Store, Model Serving and Platform SDK -pip install hopsworks -# or just the Model Registry and Model Serving SDK -pip install hsml -``` - -You can start a notebook and instantiate a connection and get the project feature store handler. - -```python -import hopsworks - -project = hopsworks.login() # you will be prompted for your api key - -mr = project.get_model_registry() -# or -ms = project.get_model_serving() -``` - -or using `hsml` directly: - -```python -import hsml - -connection = hsml.connection( - host="c.app.hopsworks.ai", # - project="your-project", - api_key_value="your-api-key", -) - -mr = connection.get_model_registry() -# or -ms = connection.get_model_serving() -``` - -Create a new model -```python -model = mr.tensorflow.create_model(name="mnist", - version=1, - metrics={"accuracy": 0.94}, - description="mnist model description") -model.save("/tmp/model_directory") # or /tmp/model_file -``` - -Download a model -```python -model = mr.get_model("mnist", version=1) - -model_path = model.download() -``` - -Delete a model -```python -model.delete() -``` - -Get best performing model -```python -best_model = mr.get_best_model('mnist', 'accuracy', 'max') - -``` - -Deploy a model -```python -deployment = model.deploy() -``` - -Start a deployment -```python -deployment.start() -``` - -Make predictions with a deployed model -```python -data = { "instances": [ model.input_example ] } - -predictions = deployment.predict(data) -``` - -# Tutorials - -You can find more examples on how to use the library in our [tutorials](https://github.com/logicalclocks/hopsworks-tutorials). - -## Documentation - -Documentation is available at [Hopsworks Model Management Documentation](https://docs.hopsworks.ai/). - -## Issues - -For general questions about the usage of Hopsworks Machine Learning please open a topic on [Hopsworks Community](https://community.hopsworks.ai/). -Please report any issue using [Github issue tracking](https://github.com/logicalclocks/machine-learning-api/issues). - - -## Contributing - -If you would like to contribute to this library, please see the [Contribution Guidelines](CONTRIBUTING.md). diff --git a/hsml/auto_doc.py b/hsml/auto_doc.py deleted file mode 100644 index 4c7ae26ee..000000000 --- a/hsml/auto_doc.py +++ /dev/null @@ -1,210 +0,0 @@ -# -# Copyright 2021 Logical Clocks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pathlib -import shutil -import os -import keras_autodoc - -JSON_METHODS = [ - "extract_fields_from_json", - "from_json", - "from_response_json", - "json", - "update_from_response_json", -] - -PAGES = { - # Model registry - "connection_api.md": { - "connection": ["hsml.connection.Connection"], - "connection_properties": keras_autodoc.get_properties( - "hsml.connection.Connection", exclude=["trust_store_path"] - ), - "connection_methods": keras_autodoc.get_methods("hsml.connection.Connection"), - }, - "model-registry/model_registry_api.md": { - "mr_get": ["hsml.connection.Connection.get_model_registry"], - "mr_modules": keras_autodoc.get_properties( - "hsml.model_registry.ModelRegistry", - exclude=[ - "project_id", - "project_name", - "model_registry_id", - "shared_registry_project_name", - ], - ), - "mr_properties": keras_autodoc.get_properties( - "hsml.model_registry.ModelRegistry", - exclude=[ - "python", - "sklearn", - "tensorflow", - "torch", - ], - ), - "mr_methods": keras_autodoc.get_methods( - "hsml.model_registry.ModelRegistry", exclude=["from_response_json"] - ), - }, - "model-registry/model_api.md": { - "ml_create_tf": ["hsml.model_registry.ModelRegistry.tensorflow.create_model"], - "ml_create_th": ["hsml.model_registry.ModelRegistry.torch.create_model"], - "ml_create_sl": ["hsml.model_registry.ModelRegistry.sklearn.create_model"], - "ml_create_py": ["hsml.model_registry.ModelRegistry.python.create_model"], - "ml_get": ["hsml.model_registry.ModelRegistry.get_model"], - "ml_properties": keras_autodoc.get_properties("hsml.model.Model"), - "ml_methods": keras_autodoc.get_methods( - "hsml.model.Model", - exclude=[ - "from_response_json", - "json", - "to_dict", - "update_from_response_json", - ], - ), - }, - "model-registry/model_schema.md": {}, - "model-registry/model_schema_api.md": { - "schema": ["hsml.schema.Schema"], - "schema_dict": ["hsml.schema.Schema.to_dict"], - "model_schema": ["hsml.model_schema.ModelSchema"], - "model_schema_dict": ["hsml.model_schema.ModelSchema.to_dict"], - }, - "model-registry/links.md": { - "links_properties": keras_autodoc.get_properties( - "hsml.core.explicit_provenance.Links" - ), - "artifact_properties": keras_autodoc.get_properties( - "hsml.core.explicit_provenance.Artifact" - ), - }, - # Model Serving - "model-serving/model_serving_api.md": { - "ms_get": ["hsml.connection.Connection.get_model_serving"], - "ms_properties": keras_autodoc.get_properties( - "hsml.model_serving.ModelServing" - ), - "ms_methods": keras_autodoc.get_methods( - "hsml.model_serving.ModelServing", exclude=["from_response_json"] - ), - }, - "model-serving/deployment_api.md": { - "ms_get_model_serving": ["hsml.connection.Connection.get_model_serving"], - "ms_get_deployments": [ - "hsml.model_serving.ModelServing.get_deployment", - "hsml.model_serving.ModelServing.get_deployment_by_id", - "hsml.model_serving.ModelServing.get_deployments", - ], - "ms_create_deployment": ["hsml.model_serving.ModelServing.create_deployment"], - "m_deploy": ["hsml.model.Model.deploy"], - "p_deploy": ["hsml.predictor.Predictor.deploy"], - "dep_properties": keras_autodoc.get_properties("hsml.deployment.Deployment"), - "dep_methods": keras_autodoc.get_methods( - "hsml.deployment.Deployment", exclude=JSON_METHODS + ["from_predictor"] - ), - }, - "model-serving/predictor_api.md": { - "ms_get_model_serving": ["hsml.connection.Connection.get_model_serving"], - "ms_create_predictor": ["hsml.model_serving.ModelServing.create_predictor"], - "pred_properties": keras_autodoc.get_properties("hsml.predictor.Predictor"), - "pred_methods": keras_autodoc.get_methods( - "hsml.predictor.Predictor", - exclude=JSON_METHODS + ["for_model"], - ), - }, - "model-serving/transformer_api.md": { - "ms_get_model_serving": ["hsml.connection.Connection.get_model_serving"], - "ms_create_transformer": ["hsml.model_serving.ModelServing.create_transformer"], - "trans_properties": keras_autodoc.get_properties( - "hsml.transformer.Transformer" - ), - "trans_methods": keras_autodoc.get_methods( - "hsml.transformer.Transformer", exclude=JSON_METHODS - ), - }, - "model-serving/inference_logger_api.md": { - "il": ["hsml.inference_logger.InferenceLogger"], - "il_properties": keras_autodoc.get_properties( - "hsml.inference_logger.InferenceLogger" - ), - "il_methods": keras_autodoc.get_methods( - "hsml.inference_logger.InferenceLogger", exclude=JSON_METHODS - ), - }, - "model-serving/inference_batcher_api.md": { - "ib": ["hsml.inference_batcher.InferenceBatcher"], - "ib_properties": keras_autodoc.get_properties( - "hsml.inference_batcher.InferenceBatcher" - ), - "ib_methods": keras_autodoc.get_methods( - "hsml.inference_batcher.InferenceBatcher", exclude=JSON_METHODS - ), - }, - "model-serving/resources_api.md": { - "res": ["hsml.resources.Resources"], - "res_properties": keras_autodoc.get_properties("hsml.resources.Resources"), - "res_methods": keras_autodoc.get_methods( - "hsml.resources.Resources", exclude=JSON_METHODS - ), - }, - "model-serving/predictor_state_api.md": { - "ps_get": ["hsml.deployment.Deployment.get_state"], - "ps_properties": keras_autodoc.get_properties( - "hsml.predictor_state.PredictorState" - ), - "ps_methods": keras_autodoc.get_methods( - "hsml.predictor_state.PredictorState", exclude=JSON_METHODS - ), - }, - "model-serving/predictor_state_condition_api.md": { - "psc_get": ["hsml.predictor_state.PredictorState.condition"], - "psc_properties": keras_autodoc.get_properties( - "hsml.predictor_state_condition.PredictorStateCondition" - ), - "psc_methods": keras_autodoc.get_methods( - "hsml.predictor_state_condition.PredictorStateCondition", - exclude=JSON_METHODS, - ), - }, -} - -hsml_dir = pathlib.Path(__file__).resolve().parents[0] -if "GITHUB_SHA" in os.environ: - commit_sha = os.environ["GITHUB_SHA"] - project_url = f"https://github.com/logicalclocks/machine-learning-api/tree/{commit_sha}/python" -else: - branch_name = os.environ.get("GITHUB_BASE_REF", "master") - project_url = f"https://github.com/logicalclocks/machine-learning-api/blob/{branch_name}/python" - - -def generate(dest_dir): - doc_generator = keras_autodoc.DocumentationGenerator( - PAGES, - project_url=project_url, - template_dir="./docs/templates", - titles_size="###", - extra_aliases={}, - max_signature_line_length=100, - ) - shutil.copyfile(hsml_dir / "CONTRIBUTING.md", dest_dir / "CONTRIBUTING.md") - shutil.copyfile(hsml_dir / "README.md", dest_dir / "index.md") - - doc_generator.generate(dest_dir / "generated") - - -if __name__ == "__main__": - generate(hsml_dir / "docs") diff --git a/hsml/docs/CONTRIBUTING.md b/hsml/docs/CONTRIBUTING.md deleted file mode 100644 index b287467c6..000000000 --- a/hsml/docs/CONTRIBUTING.md +++ /dev/null @@ -1,215 +0,0 @@ -## Python development setup ---- - -- Fork and clone the repository - -- Create a new Python environment with your favourite environment manager, e.g. virtualenv or conda - -- Install repository in editable mode with development dependencies: - - ```bash - cd python - pip install -e ".[dev]" - ``` - -- Install [pre-commit](https://pre-commit.com/) and then activate its hooks. pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. The Model Registry uses pre-commit to ensure code-style and code formatting through [ruff](https://docs.astral.sh/ruff/). Run the following commands from the `python` directory: - - ```bash - cd python - pip install --user pre-commit - pre-commit install - ``` - - Afterwards, pre-commit will run whenever you commit. - -- To run formatting and code-style separately, you can configure your IDE, such as VSCode, to use [ruff](https://docs.astral.sh/ruff/tutorial/#getting-started): - - ```bash - cd python - ruff check --fix - ruff format - ``` - -### Python documentation - -We follow a few best practices for writing the Python documentation: - -1. Use the google docstring style: - - ```python - """[One Line Summary] - - [Extended Summary] - - [!!! example - import xyz - ] - - # Arguments - arg1: Type[, optional]. Description[, defaults to `default`] - arg2: Type[, optional]. Description[, defaults to `default`] - - # Returns - Type. Description. - - # Raises - Exception. Description. - """ - ``` - - If Python 3 type annotations are used, they are inserted automatically. - - -2. Model registry entity engine methods (e.g. ModelEngine etc.) only require a single line docstring. -3. REST Api implementations (e.g. ModelApi etc.) should be fully documented with docstrings without defaults. -4. Public Api such as metadata objects should be fully documented with defaults. - -#### Setup and Build Documentation - -We use `mkdocs` together with `mike` ([for versioning](https://github.com/jimporter/mike/)) to build the documentation and a plugin called `keras-autodoc` to auto generate Python API documentation from docstrings. - -**Background about `mike`:** - `mike` builds the documentation and commits it as a new directory to the gh-pages branch. Each directory corresponds to one version of the documentation. Additionally, `mike` maintains a json in the root of gh-pages with the mappings of versions/aliases for each of the directories available. With aliases you can define extra names like `dev` or `latest`, to indicate stable and unstable releases. - -1. Currently we are using our own version of `keras-autodoc` - - ```bash - pip install git+https://github.com/logicalclocks/keras-autodoc - ``` - -2. Install HSML with `docs` extras: - - ```bash - pip install -e .[dev,docs] - ``` - -3. To build the docs, first run the auto doc script: - - ```bash - cd .. - python auto_doc.py - ``` - -##### Option 1: Build only current version of docs - -4. Either build the docs, or serve them dynamically: - - Note: Links and pictures might not resolve properly later on when checking with this build. - The reason for that is that the docs are deployed with versioning on docs.hopsworks.ai and - therefore another level is added to all paths, e.g. `docs.hopsworks.ai/[version-or-alias]`. - Using relative links should not be affected by this, however, building the docs with version - (Option 2) is recommended. - - ```bash - mkdocs build - # or - mkdocs serve - ``` - -##### Option 2 (Preferred): Build multi-version doc with `mike` - -###### Versioning on docs.hopsworks.ai - -On docs.hopsworks.ai we implement the following versioning scheme: - -- current master branches (e.g. of hsml corresponding to master of Hopsworks): rendered as current Hopsworks snapshot version, e.g. **2.2.0-SNAPSHOT [dev]**, where `dev` is an alias to indicate that this is an unstable version. -- the latest release: rendered with full current version, e.g. **2.1.5 [latest]** with `latest` alias to indicate that this is the latest stable release. -- previous stable releases: rendered without alias, e.g. **2.1.4**. - -###### Build Instructions - -4. For this you can either checkout and make a local copy of the `upstream/gh-pages` branch, where -`mike` maintains the current state of docs.hopsworks.ai, or just build documentation for the branch you are updating: - - Building *one* branch: - - Checkout your dev branch with modified docs: - ```bash - git checkout [dev-branch] - ``` - - Generate API docs if necessary: - ```bash - python auto_doc.py - ``` - - Build docs with a version and alias - ```bash - mike deploy [version] [alias] --update-alias - - # for example, if you are updating documentation to be merged to master, - # which will become the new SNAPSHOT version: - mike deploy 2.2.0-SNAPSHOT dev --update-alias - - # if you are updating docs of the latest stable release branch - mike deploy [version] latest --update-alias - - # if you are updating docs of a previous stable release branch - mike deploy [version] - ``` - - If no gh-pages branch existed in your local repository, this will have created it. - - **Important**: If no previous docs were built, you will have to choose a version as default to be loaded as index, as follows - - ```bash - mike set-default [version-or-alias] - ``` - - You can now checkout the gh-pages branch and serve: - ```bash - git checkout gh-pages - mike serve - ``` - - You can also list all available versions/aliases: - ```bash - mike list - ``` - - Delete and reset your local gh-pages branch: - ```bash - mike delete --all - - # or delete single version - mike delete [version-or-alias] - ``` - -#### Adding new API documentation - -To add new documentation for APIs, you need to add information about the method/class to document to the `auto_doc.py` script: - -```python -PAGES = { - "connection.md": [ - "hsml.connection.Connection.connection", - "hsml.connection.Connection.setup_databricks", - ] - "new_template.md": [ - "module", - "xyz.asd" - ] -} -``` - -Now you can add a template markdown file to the `docs/templates` directory with the name you specified in the auto-doc script. The `new_template.md` file should contain a tag to identify the place at which the API documentation should be inserted: - -``` -## The XYZ package - -{{module}} - -Some extra content here. - -!!! example - ```python - import xyz - ``` - -{{xyz.asd}} -``` - -Finally, run the `auto_doc.py` script, as decribed above, to update the documentation. - -For information about Markdown syntax and possible Admonitions/Highlighting etc. see -the [Material for Mkdocs themes reference documentation](https://squidfunk.github.io/mkdocs-material/reference/abbreviations/). diff --git a/hsml/docs/assets/images/favicon.ico b/hsml/docs/assets/images/favicon.ico deleted file mode 100644 index ab7573067..000000000 Binary files a/hsml/docs/assets/images/favicon.ico and /dev/null differ diff --git a/hsml/docs/assets/images/hops-logo.png b/hsml/docs/assets/images/hops-logo.png deleted file mode 100644 index d3625ae07..000000000 Binary files a/hsml/docs/assets/images/hops-logo.png and /dev/null differ diff --git a/hsml/docs/css/custom.css b/hsml/docs/css/custom.css deleted file mode 100644 index 5ba3208e1..000000000 --- a/hsml/docs/css/custom.css +++ /dev/null @@ -1,115 +0,0 @@ -[data-md-color-scheme="hopsworks"] { - --md-primary-fg-color: #1EB382; - --md-secondary-fg-color: #188a64; - --md-tertiary-fg-color: #0d493550; - --md-quaternary-fg-color: #fdfdfd; - --border-radius-variable: 5px; -} - -.md-footer__inner:not([hidden]) { - display: none -} - -/* Lex did stuff here */ -.svg_topnav{ - width: 12px; - filter: invert(100); -} -.svg_topnav:hover{ - width: 12px; - filter: invert(10); -} - -.md-header[data-md-state=shadow] { - box-shadow: 0 0 0 0; -} - -.md-tabs__item { - min-width: 2.25rem; -} - -.md-tabs__item:hover { - background-color: var(--md-tertiary-fg-color); - transition: background-color 450ms; - -} - -/* -.md-sidebar__scrollwrap{ - background-color: var(--md-quaternary-fg-color); - padding: 15px 5px 5px 5px; - border-radius: var(--border-radius-variable); -} -*/ -.md-nav__link:focus{ -} - -.image_logo_02{ - width:450px; -} - -/* End of Lex did stuff here */ - -.md-header__button.md-logo { - margin: .1rem; - padding: .1rem; -} - -.md-header__button.md-logo img, .md-header__button.md-logo svg { - display: block; - width: 1.8rem; - height: 1.8rem; - fill: currentColor; -} - -.md-tabs { - width: 100%; - overflow: auto; - color: var(--md-primary-bg-color); - background-color: var(--md-secondary-fg-color); - transition: background-color 250ms; -} - - -.wrapper { - display: grid; - grid-template-columns: repeat(4, 1fr); - gap: 10px; - grid-auto-rows: minmax(100px, auto); -} - -.wrapper * { - border: 2px solid green; - text-align: center; - padding: 70px 0; -} - -.one { - grid-column: 1 / 2; - grid-row: 1; -} -.two { - grid-column: 2 / 3; - grid-row: 1; -} -.three { - grid-column: 3 / 4; - grid-row: 1; -} -.four { - grid-column: 4 / 5; - grid-row: 1; -} -.five { - grid-column: 1 / 3; - grid-row: 2; -} -.six { - grid-column: 3 / 5; - grid-row: 2; -} - -/* Jupyter Stuff */ -.jupyter-wrapper .jp-CodeCell .jp-Cell-inputWrapper .jp-InputPrompt { - display: none !important; -} diff --git a/hsml/docs/css/dropdown.css b/hsml/docs/css/dropdown.css deleted file mode 100644 index 886858909..000000000 --- a/hsml/docs/css/dropdown.css +++ /dev/null @@ -1,55 +0,0 @@ -/* Style The Dropdown Button */ -.dropbtn { - color: white; - border: none; - cursor: pointer; -} - -.md-tabs__list { - contain: inherit; -} -.md-tabs { - overflow: inherit; -} -.md-header { - z-index: 1000 !important; -} - -/* The container
- needed to position the dropdown content */ -.dropdown { - position: absolute; - display: inline-block; -} - -/* Dropdown Content (Hidden by Default) */ -.dropdown-content { - display:none; - font-size: 13px; - position: absolute; - background-color: #f9f9f9; - min-width: 160px; - box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); - z-index: 1000; - border-radius: 2px; - left:-15px; -} - -/* Links inside the dropdown */ -.dropdown-content a { - color: black; - padding: 12px 16px; - text-decoration: none; - display: block; -} - -/* Change color of dropdown links on hover */ -.dropdown-content a:hover {background-color: #f1f1f1} - -/* Show the dropdown menu on hover */ -.dropdown:hover .dropdown-content { - display: block; -} - -/* Change the background color of the dropdown button when the dropdown content is shown */ -.dropdown:hover .dropbtn { -} diff --git a/hsml/docs/css/marctech.css b/hsml/docs/css/marctech.css deleted file mode 100644 index 8bb58c97b..000000000 --- a/hsml/docs/css/marctech.css +++ /dev/null @@ -1,1047 +0,0 @@ -:root { - --md-primary-fg-color: #1EB382; - --md-secondary-fg-color: #188a64; - --md-tertiary-fg-color: #0d493550; - --md-quaternary-fg-color: #fdfdfd; - --md-fiftuary-fg-color: #2471cf; - --border-radius-variable: 5px; - --border-width:1px; - } - - .marctech_main a{ - color: var(--md-fiftuary-fg-color); - border-bottom: 1px dotted var(--md-fiftuary-fg-color) !important; - text-decoration: dotted !important;} - - .marctech_main a:hover{ - border-bottom: 1px dotted var(--md-primary-fg-color)!important; - } - - .marctech_main a:visited{ - color: var(--md-tertiary-fg-color); - border-bottom: 1px dotted var(--md-tertiary-fg-color) !important; - - } - - .w-layout-grid { - display: -ms-grid; - display: grid; - grid-auto-columns: 1fr; - -ms-grid-columns: 1fr 1fr; - grid-template-columns: 1fr 1fr; - -ms-grid-rows: auto auto; - grid-template-rows: auto auto; - grid-row-gap: 16px; - grid-column-gap: 16px; - } - - .image_logo{ - width: 69%; - background-color: white; - z-index: 50; - padding: 0px 15px 0px 15px; - margin-bottom: 10px; - } - - .layer_02{ - pointer-events: none; - } - - .round-frame{ - pointer-events: initial; - } - - .marctech_main { - margin-top:-20px; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 55px; - } - - .collumns { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - height: 100%; - -webkit-box-align: stretch; - -webkit-align-items: stretch; - -ms-flex-align: stretch; - align-items: stretch; - } - - .col_heading { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } - - .enterprisefs { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } - - .enterprise_ai { - -webkit-align-self: center; - -ms-flex-item-align: center; - -ms-grid-row-align: center; - align-self: center; - -webkit-box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - } - - .side-content { - z-index: 0; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 240px; - height: 100%; - margin-top: 10px; - margin-bottom: 10px; - padding: 20px 10px; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - -webkit-align-content: flex-start; - -ms-flex-line-pack: start; - align-content: flex-start; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 10px; - background-color:var(--md-quaternary-fg-color); - } - .body { - padding: 40px; - font-family: Roboto, sans-serif; - } - - .green { - color: #1eb182; - font-size: 1.2vw; - } - - .rec_frame { - position: relative; - z-index: 1; - display: inline-block; - min-width: 150px; - margin-top: 10px; - margin-right: 10px; - margin-left: 10px; - padding: 10px 10px; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 10px; - background-color: #fff; - box-shadow: 4px 4px 0 0 rgba(88, 88, 88, 0.16); - -webkit-transition: box-shadow 200ms ease, border-color 200ms ease; - transition: box-shadow 200ms ease, border-color 200ms ease; - color: #585858; - text-align: center; - cursor: pointer; - } - - .rec_frame:hover { - border-color: #c2c2c2; - box-shadow: none; - } - - .name_item { - font-size: 0.7rem; - line-height: 120%; - font-weight: 700; - } - - .name_item.db { - position: relative; - z-index: 3; - text-align: left; - } - - .name_item.small { - font-size: 0.6rem; - font-weight: 500; - } - - .name_item.ingrey { - padding-bottom: 20px; - } - - .db_frame-mid { - position: relative; - z-index: 1; - margin-top: -8px; - padding: 5px 2px; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 0px 0% 50% 50%; - background-color: #fff; - color: #585858; - text-align: center; - } - - .db_frame-top { - position: relative; - z-index: 2; - padding: 5px 2px; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 50%; - background-color: #fff; - color: #585858; - text-align: center; - } - - .icondb { - position: relative; - width: 25px; - min-width: 25px; - margin-right: 10px; - } - - .db_frame { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 150px; - height: 55px; - padding: 20px 10px; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 10px; - background-color: #fff; - box-shadow: 4px 4px 0 0 rgba(88, 88, 88, 0.16); - -webkit-transition: box-shadow 200ms ease, border-color 200ms ease; - transition: box-shadow 200ms ease, border-color 200ms ease; - color: #585858; - text-align: center; - cursor: pointer; - } - - .db_frame:hover { - border-color: #c2c2c2; - box-shadow: none; - } - - .grid { - -ms-grid-rows: auto auto auto; - grid-template-rows: auto auto auto; - } - - .arrowdown { - position: relative; - z-index: 0; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - margin-top: -10px; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - } - - .heading_MT { - margin-top: 0px !important; - margin-bottom: 0px !important; - font-size: 1.3rem !important; - white-space: nowrap !important; - } - - .head_col { - padding-left: 10px; - } - - .MT_heading3 { - margin-top: 0px !important ; - font-size: 0.8rem !important; - } - - .MT_heading3.green { - color: #1eb182 !important; - } - - .column_sides { - position: relative; - z-index: 2; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } - - .hopsicon { - width: 45px; - height: 45px; - } - - .column_center { - z-index: 10; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } - - .center-content { - z-index: -50; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 750px; - height: 670px; - margin-top: 10px; - margin-bottom: 10px; - padding: 20px 10px; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - -webkit-align-content: center; - -ms-flex-line-pack: center; - align-content: center; - border-radius: 10px; - background-color: transparent; - } - - .image { - width: 260px; - } - - .layer_01 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: stretch; - -webkit-align-items: stretch; - -ms-flex-align: stretch; - align-items: stretch; - } - - .name_center { - font-size: 1rem; - font-weight: 700; - } - - .rec_frame_main { - position: relative; - z-index: 1; - margin-top: 10px; - margin-right: 10px; - margin-left: 10px; - padding: 5px 10px; - border-style: solid; - border-width: var(--border-width); - border-color: #1eb182; - border-radius: 10px; - background-color: #e6fdf6; - box-shadow: 4px 4px 0 0 #dcf7ee; - -webkit-transition: box-shadow 200ms ease, border-color 200ms ease; - transition: box-shadow 200ms ease, border-color 200ms ease; - color: #1eb182; - text-align: center; - cursor: pointer; - } - - .rec_frame_main:hover { - border-color: #9fecd4; - box-shadow: none; - } - - .rec_frame_main.no_content { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - height: 100%; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - box-shadow: 4px 4px 0 0 #dcf7ee; - } - - .rec_frame_main.no_content:hover { - border-color: #1eb182; - box-shadow: 4px 4px 0 0 rgba(88, 88, 88, 0.16); - } - - .name_item_02 { - font-size: 0.85rem; - font-weight: 700; - } - - .grid-infra { - padding-top: 20px; - -ms-grid-columns: 1fr 1fr 1fr 1fr; - grid-template-columns: 1fr 1fr 1fr 1fr; - -ms-grid-rows: auto; - grid-template-rows: auto; - } - - .rec_frame_main-white { - position: relative; - z-index: 1; - display: inline-block; - width: 100%; - margin-top: 10px; - margin-bottom: 10px; - padding: 5px 10px; - border-style: solid; - border-width: var(--border-width); - border-color: #1eb182; - border-radius: 10px; - background-color: #fff; - box-shadow: 4px 4px 0 0 rgba(88, 88, 88, 0.16); - -webkit-transition: box-shadow 200ms ease, border-color 200ms ease; - transition: box-shadow 200ms ease, border-color 200ms ease; - color: #1eb182; - text-align: center; - cursor: pointer; - } - - .rec_frame_main-white:hover { - border-color: #c2c2c2; - box-shadow: none; - } - - .rec_frame_main-white.dotted { - border-style: dotted; - } - - .column { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-box-align: stretch; - -webkit-align-items: stretch; - -ms-flex-align: stretch; - align-items: stretch; - } - - .columns_center { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - } - - .non-bold { - font-weight: 400; - } - - .logo-holder { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - } - - .infra { - text-align: center; - position: relative; - z-index: 30; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - padding: 10px; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - border: 1px dashed #000; - border-radius: 6px; - background-color: #fff; - cursor: pointer; - } - - .infra:hover { - border-style: solid; - border-color: #585858; - } - - .text_and_icon { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } - - .svg_icon { - width: 33px; - margin-right: 10px; - margin-left: 10px; - } - - .layer_02 { - position: absolute; - z-index: 10; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 96%; - height: 90%; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: stretch; - -webkit-align-items: stretch; - -ms-flex-align: stretch; - align-items: stretch; - border-style: solid; - border-width: calc (var(--border-width)*2); - border-color: #bbbbbb50 ; - border-radius: 100%; - background-color: transparent; - } - - .round-frame { - position: absolute; - left: 0%; - top: auto; - right: auto; - bottom: 0%; - z-index: 10; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 120px; - height: 120px; - margin: 10px; - padding: 20px; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - border-style: solid; - border-width: var(--border-width); - border-color: #585858; - border-radius: 100%; - background-color: #fff; - outline-color: #fff; - outline-offset: 0px; - outline-style: solid; - outline-width: 7px; - -webkit-transition: box-shadow 200ms ease, border-color 200ms ease; - transition: box-shadow 200ms ease, border-color 200ms ease; - color: #585858; - text-align: center; - cursor: pointer; - } - - .round-frame:hover { - border-color: #c2c2c2; - box-shadow: none; - } - - .round-frame.top-left { - left: 4%; - top: 15%; - right: auto; - bottom: auto; - } - - .round-frame.bottom-left { - left: 4%; - bottom: 15%; - } - - .round-frame.top-right { - left: auto; - top: 15%; - right: 4%; - bottom: auto; - } - - .round-frame.bottom-right { - left: auto; - top: auto; - right: 4%; - bottom: 15%; - padding: 10px; - } - - .side-holder { - z-index: -1; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - height: 630px; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - } - - .infra-icon { - width: 25px; - height: 25px; - } - - .div-block { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - height: 100%; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - } - - #w-node-a2a9b648-f5dd-74e5-e1c2-f7aaf4fa1fcd-46672785 { - -ms-grid-column: span 1; - grid-column-start: span 1; - -ms-grid-column-span: 1; - grid-column-end: span 1; - -ms-grid-row: span 1; - grid-row-start: span 1; - -ms-grid-row-span: 1; - grid-row-end: span 1; - } - - #w-node-_466aa2bf-88bf-5a65-eab4-fc1eb95e7384-46672785 { - -ms-grid-column: span 1; - grid-column-start: span 1; - -ms-grid-column-span: 1; - grid-column-end: span 1; - -ms-grid-row: span 1; - grid-row-start: span 1; - -ms-grid-row-span: 1; - grid-row-end: span 1; - } - - #w-node-_87009ba3-d9a6-e0b7-4cce-581190a19cf3-46672785 { - -ms-grid-column: span 1; - grid-column-start: span 1; - -ms-grid-column-span: 1; - grid-column-end: span 1; - -ms-grid-row: span 1; - grid-row-start: span 1; - -ms-grid-row-span: 1; - grid-row-end: span 1; - } - - #w-node-_4a479fbb-90c7-9f47-d439-20aa6a224339-46672785 { - -ms-grid-column: span 1; - grid-column-start: span 1; - -ms-grid-column-span: 1; - grid-column-end: span 1; - -ms-grid-row: span 1; - grid-row-start: span 1; - -ms-grid-row-span: 1; - grid-row-end: span 1; - } - - - /* - - - inherited from the original template - - */ - - .w-container .w-row { - margin-left: -10px; - margin-right: -10px; - } - .w-row:before, - .w-row:after { - content: " "; - display: table; - grid-column-start: 1; - grid-row-start: 1; - grid-column-end: 2; - grid-row-end: 2; - } - .w-row:after { - clear: both; - } - .w-row .w-row { - margin-left: 0; - margin-right: 0; - } - .w-col { - position: relative; - float: left; - width: 100%; - min-height: 1px; - padding-left: 10px; - padding-right: 10px; - } - .w-col .w-col { - padding-left: 0; - padding-right: 0; - } - .w-col-1 { - width: 8.33333333%; - } - .w-col-2 { - width: 16.66666667%; - } - .w-col-3 { - width: 25%; - } - .w-col-4 { - width: 33.33333333%; - } - .w-col-5 { - width: 41.66666667%; - } - .w-col-6 { - width: 50%; - } - .w-col-7 { - width: 58.33333333%; - } - .w-col-8 { - width: 66.66666667%; - } - .w-col-9 { - width: 75%; - } - .w-col-10 { - width: 83.33333333%; - } - .w-col-11 { - width: 91.66666667%; - } - .w-col-12 { - width: 100%; - } - .w-hidden-main { - display: none !important; - } - @media screen and (max-width: 991px) { - .w-container { - max-width: 728px; - } - .w-hidden-main { - display: inherit !important; - } - .w-hidden-medium { - display: none !important; - } - .w-col-medium-1 { - width: 8.33333333%; - } - .w-col-medium-2 { - width: 16.66666667%; - } - .w-col-medium-3 { - width: 25%; - } - .w-col-medium-4 { - width: 33.33333333%; - } - .w-col-medium-5 { - width: 41.66666667%; - } - .w-col-medium-6 { - width: 50%; - } - .w-col-medium-7 { - width: 58.33333333%; - } - .w-col-medium-8 { - width: 66.66666667%; - } - .w-col-medium-9 { - width: 75%; - } - .w-col-medium-10 { - width: 83.33333333%; - } - .w-col-medium-11 { - width: 91.66666667%; - } - .w-col-medium-12 { - width: 100%; - } - .w-col-stack { - width: 100%; - left: auto; - right: auto; - } - } - @media screen and (max-width: 767px) { - .w-hidden-main { - display: inherit !important; - } - .w-hidden-medium { - display: inherit !important; - } - .w-hidden-small { - display: none !important; - } - .w-row, - .w-container .w-row { - margin-left: 0; - margin-right: 0; - } - .w-col { - width: 100%; - left: auto; - right: auto; - } - .w-col-small-1 { - width: 8.33333333%; - } - .w-col-small-2 { - width: 16.66666667%; - } - .w-col-small-3 { - width: 25%; - } - .w-col-small-4 { - width: 33.33333333%; - } - .w-col-small-5 { - width: 41.66666667%; - } - .w-col-small-6 { - width: 50%; - } - .w-col-small-7 { - width: 58.33333333%; - } - .w-col-small-8 { - width: 66.66666667%; - } - .w-col-small-9 { - width: 75%; - } - .w-col-small-10 { - width: 83.33333333%; - } - .w-col-small-11 { - width: 91.66666667%; - } - .w-col-small-12 { - width: 100%; - } - } - @media screen and (max-width: 479px) { - .w-container { - max-width: none; - } - .w-hidden-main { - display: inherit !important; - } - .w-hidden-medium { - display: inherit !important; - } - .w-hidden-small { - display: inherit !important; - } - .w-hidden-tiny { - display: none !important; - } - .w-col { - width: 100%; - } - .w-col-tiny-1 { - width: 8.33333333%; - } - .w-col-tiny-2 { - width: 16.66666667%; - } - .w-col-tiny-3 { - width: 25%; - } - .w-col-tiny-4 { - width: 33.33333333%; - } - .w-col-tiny-5 { - width: 41.66666667%; - } - .w-col-tiny-6 { - width: 50%; - } - .w-col-tiny-7 { - width: 58.33333333%; - } - .w-col-tiny-8 { - width: 66.66666667%; - } - .w-col-tiny-9 { - width: 75%; - } - .w-col-tiny-10 { - width: 83.33333333%; - } - .w-col-tiny-11 { - width: 91.66666667%; - } - .w-col-tiny-12 { - width: 100%; - } - } diff --git a/hsml/docs/css/version-select.css b/hsml/docs/css/version-select.css deleted file mode 100644 index 3b908ae84..000000000 --- a/hsml/docs/css/version-select.css +++ /dev/null @@ -1,36 +0,0 @@ -@media only screen and (max-width:76.1875em) { -} - -#version-selector select.form-control { - appearance: none; - -webkit-appearance: none; - -moz-appearance: none; - - background-color: #F5F5F5; - - background-position: center right; - background-repeat: no-repeat; - border: 0px; - border-radius: 2px; - /* box-shadow: 0px 1px 3px rgb(0 0 0 / 10%); */ - color: inherit; - width: -webkit-fill-available; - width: -moz-available; - max-width: 200px; - font-size: inherit; - /* font-weight: 600; */ - margin: 10px; - overflow: hidden; - padding: 7px 10px; - text-overflow: ellipsis; - white-space: nowrap; -} - -#version-selector::after { - content: '⌄'; - font-family: inherit; - font-size: 22px; - margin: -35px; - vertical-align: 7%; - padding-bottom: 10px; -} diff --git a/hsml/docs/index.md b/hsml/docs/index.md deleted file mode 100644 index ee835ddc7..000000000 --- a/hsml/docs/index.md +++ /dev/null @@ -1,141 +0,0 @@ -# Hopsworks Model Management - -

- Hopsworks Community - Hopsworks Model Management Documentation - python - PyPiStatus - Scala/Java Artifacts - Downloads - Ruff - License -

- -HSML is the library to interact with the Hopsworks Model Registry and Model Serving. The library makes it easy to export, manage and deploy models. - -However, to connect from an external Python environment additional connection information, such as host and port, is required. - -## Getting Started On Hopsworks - -Get started easily by registering an account on [Hopsworks Serverless](https://app.hopsworks.ai/). Create your project and a [new Api key](https://docs.hopsworks.ai/latest/user_guides/projects/api_key/create_api_key/). In a new python environment with Python 3.8 or higher, install the [client library](https://docs.hopsworks.ai/latest/user_guides/client_installation/) using pip: - -```bash -# Get all Hopsworks SDKs: Feature Store, Model Serving and Platform SDK -pip install hopsworks -# or just the Model Registry and Model Serving SDK -pip install hsml -``` - -You can start a notebook and instantiate a connection and get the project feature store handler. - -```python -import hopsworks - -project = hopsworks.login() # you will be prompted for your api key - -mr = project.get_model_registry() -# or -ms = project.get_model_serving() -``` - -or using `hsml` directly: - -```python -import hsml - -connection = hsml.connection( - host="c.app.hopsworks.ai", # - project="your-project", - api_key_value="your-api-key", -) - -mr = connection.get_model_registry() -# or -ms = connection.get_model_serving() -``` - -Create a new model -```python -model = mr.tensorflow.create_model(name="mnist", - version=1, - metrics={"accuracy": 0.94}, - description="mnist model description") -model.save("/tmp/model_directory") # or /tmp/model_file -``` - -Download a model -```python -model = mr.get_model("mnist", version=1) - -model_path = model.download() -``` - -Delete a model -```python -model.delete() -``` - -Get best performing model -```python -best_model = mr.get_best_model('mnist', 'accuracy', 'max') - -``` - -Deploy a model -```python -deployment = model.deploy() -``` - -Start a deployment -```python -deployment.start() -``` - -Make predictions with a deployed model -```python -data = { "instances": [ model.input_example ] } - -predictions = deployment.predict(data) -``` - -# Tutorials - -You can find more examples on how to use the library in our [tutorials](https://github.com/logicalclocks/hopsworks-tutorials). - -## Documentation - -Documentation is available at [Hopsworks Model Management Documentation](https://docs.hopsworks.ai/). - -## Issues - -For general questions about the usage of Hopsworks Machine Learning please open a topic on [Hopsworks Community](https://community.hopsworks.ai/). -Please report any issue using [Github issue tracking](https://github.com/logicalclocks/machine-learning-api/issues). - - -## Contributing - -If you would like to contribute to this library, please see the [Contribution Guidelines](CONTRIBUTING.md). diff --git a/hsml/docs/js/dropdown.js b/hsml/docs/js/dropdown.js deleted file mode 100644 index b897ba36a..000000000 --- a/hsml/docs/js/dropdown.js +++ /dev/null @@ -1,2 +0,0 @@ -document.getElementsByClassName("md-tabs__link")[7].style.display = "none"; -document.getElementsByClassName("md-tabs__link")[9].style.display = "none"; \ No newline at end of file diff --git a/hsml/docs/js/inject-api-links.js b/hsml/docs/js/inject-api-links.js deleted file mode 100644 index 6c8a4a3b3..000000000 --- a/hsml/docs/js/inject-api-links.js +++ /dev/null @@ -1,31 +0,0 @@ -window.addEventListener("DOMContentLoaded", function () { - var windowPathNameSplits = window.location.pathname.split("/"); - var majorVersionRegex = new RegExp("(\\d+[.]\\d+)") - var latestRegex = new RegExp("latest"); - if (majorVersionRegex.test(windowPathNameSplits[1])) { // On landing page docs.hopsworks.api/3.0 - URL contains major version - // Version API dropdown - document.getElementById("hopsworks_api_link").href = "https://docs.hopsworks.ai/hopsworks-api/" + windowPathNameSplits[1] + "/generated/api/login/"; - document.getElementById("hsfs_api_link").href = "https://docs.hopsworks.ai/feature-store-api/" + windowPathNameSplits[1] + "/generated/api/connection_api/"; - document.getElementById("hsml_api_link").href = "https://docs.hopsworks.ai/machine-learning-api/" + windowPathNameSplits[1] + "/generated/connection_api/"; - } else { // on docs.hopsworks.api/feature-store-api/3.0 / docs.hopsworks.api/hopsworks-api/3.0 / docs.hopsworks.api/machine-learning-api/3.0 - if (latestRegex.test(windowPathNameSplits[2]) || latestRegex.test(windowPathNameSplits[1])) { - var majorVersion = "latest"; - } else { - var apiVersion = windowPathNameSplits[2]; - var majorVersion = apiVersion.match(majorVersionRegex)[0]; - } - // Version main navigation - document.getElementsByClassName("md-tabs__link")[0].href = "https://docs.hopsworks.ai/" + majorVersion; - document.getElementsByClassName("md-tabs__link")[1].href = "https://colab.research.google.com/github/logicalclocks/hopsworks-tutorials/blob/master/quickstart.ipynb"; - document.getElementsByClassName("md-tabs__link")[2].href = "https://docs.hopsworks.ai/" + majorVersion + "/tutorials/"; - document.getElementsByClassName("md-tabs__link")[3].href = "https://docs.hopsworks.ai/" + majorVersion + "/concepts/hopsworks/"; - document.getElementsByClassName("md-tabs__link")[4].href = "https://docs.hopsworks.ai/" + majorVersion + "/user_guides/"; - document.getElementsByClassName("md-tabs__link")[5].href = "https://docs.hopsworks.ai/" + majorVersion + "/setup_installation/aws/getting_started/"; - document.getElementsByClassName("md-tabs__link")[6].href = "https://docs.hopsworks.ai/" + majorVersion + "/admin/"; - // Version API dropdown - document.getElementById("hopsworks_api_link").href = "https://docs.hopsworks.ai/hopsworks-api/" + majorVersion + "/generated/api/login/"; - document.getElementById("hsfs_api_link").href = "https://docs.hopsworks.ai/feature-store-api/" + majorVersion + "/generated/api/connection_api/"; - document.getElementById("hsfs_javadoc_link").href = "https://docs.hopsworks.ai/feature-store-api/" + majorVersion + "/javadoc"; - document.getElementById("hsml_api_link").href = "https://docs.hopsworks.ai/machine-learning-api/" + majorVersion + "/generated/connection_api/"; - } -}); diff --git a/hsml/docs/js/version-select.js b/hsml/docs/js/version-select.js deleted file mode 100644 index 9c8331660..000000000 --- a/hsml/docs/js/version-select.js +++ /dev/null @@ -1,64 +0,0 @@ -window.addEventListener("DOMContentLoaded", function() { - // This is a bit hacky. Figure out the base URL from a known CSS file the - // template refers to... - var ex = new RegExp("/?css/version-select.css$"); - var sheet = document.querySelector('link[href$="version-select.css"]'); - - var ABS_BASE_URL = sheet.href.replace(ex, ""); - var CURRENT_VERSION = ABS_BASE_URL.split("/").pop(); - - function makeSelect(options, selected) { - var select = document.createElement("select"); - select.classList.add("form-control"); - - options.forEach(function(i) { - var option = new Option(i.text, i.value, undefined, - i.value === selected); - select.add(option); - }); - - return select; - } - - var xhr = new XMLHttpRequest(); - xhr.open("GET", ABS_BASE_URL + "/../versions.json"); - xhr.onload = function() { - var versions = JSON.parse(this.responseText); - - var realVersion = versions.find(function(i) { - return i.version === CURRENT_VERSION || - i.aliases.includes(CURRENT_VERSION); - }).version; - var latestVersion = versions.find(function(i) { - return i.aliases.includes("latest"); - }).version; - let outdated_banner = document.querySelector('div[data-md-color-scheme="default"][data-md-component="outdated"]'); - if (realVersion !== latestVersion) { - outdated_banner.removeAttribute("hidden"); - } else { - outdated_banner.setAttribute("hidden", ""); - } - - var select = makeSelect(versions.map(function(i) { - var allowedAliases = ["dev", "latest"] - if (i.aliases.length > 0) { - var aliasString = " [" + i.aliases.filter(function (str) { return allowedAliases.includes(str); }).join(", ") + "]"; - } else { - var aliasString = ""; - } - return {text: i.title + aliasString, value: i.version}; - }), realVersion); - select.addEventListener("change", function(event) { - window.location.href = ABS_BASE_URL + "/../" + this.value + "/generated/connection_api/"; - }); - - var container = document.createElement("div"); - container.id = "version-selector"; - // container.className = "md-nav__item"; - container.appendChild(select); - - var sidebar = document.querySelector(".md-nav--primary > .md-nav__list"); - sidebar.parentNode.insertBefore(container, sidebar.nextSibling); - }; - xhr.send(); -}); diff --git a/hsml/docs/overrides/main.html b/hsml/docs/overrides/main.html deleted file mode 100644 index a1bc45bb5..000000000 --- a/hsml/docs/overrides/main.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base.html" %} - -{% block outdated %} -You're not viewing the latest version of the documentation. - - Click here to go to latest. - -{% endblock %} \ No newline at end of file diff --git a/hsml/java/pom.xml b/hsml/java/pom.xml deleted file mode 100644 index cb3e60028..000000000 --- a/hsml/java/pom.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - 4.0.0 - - com.logicalclocks - hsml - 4.0.0-SNAPSHOT - - - 1.8 - 1.8 - - - - - - org.scala-tools - maven-scala-plugin - - - scala-compile-first - process-resources - - add-source - compile - - - - scala-test-compile - process-test-resources - - testCompile - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.4.1 - - - - jar-with-dependencies - - - - - make-assembly - - package - - single - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.1.1 - - - validate - validate - - check - - - - - src/main/resources/checkstyle.xml - src/main/resources/suppressions.xml - true - true - true - true - - src/main/java - - - - - - - - - Hops - Hops Repo - https://archiva.hops.works/repository/Hops/ - - true - - - true - - - - - - - Hops - Hops Repo - https://archiva.hops.works/repository/Hops/ - - - diff --git a/hsml/java/src/main/resources/checkstyle.xml b/hsml/java/src/main/resources/checkstyle.xml deleted file mode 100644 index 5f99eb681..000000000 --- a/hsml/java/src/main/resources/checkstyle.xml +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/hsml/java/src/main/resources/suppressions.xml b/hsml/java/src/main/resources/suppressions.xml deleted file mode 100644 index a86fa8219..000000000 --- a/hsml/java/src/main/resources/suppressions.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/hsml/mkdocs.yml b/hsml/mkdocs.yml deleted file mode 100644 index f20a7b1c5..000000000 --- a/hsml/mkdocs.yml +++ /dev/null @@ -1,120 +0,0 @@ -site_name: "Hopsworks Documentation" -site_description: "Official documentation for Hopsworks and its Feature Store - an open source data-intensive AI platform used for the development and operation of machine learning models at scale." -site_author: "Logical Clocks" -site_url: "https://docs.hopsworks.ai/machine-learning-api/latest" - -# Repository -repo_name: logicalclocks/hopsworks -repo_url: https://github.com/logicalclocks/hopsworks -edit_uri: "" - -nav: - - Home: https://docs.hopsworks.ai/ - - Getting Started ↗: https://docs.hopsworks.ai/ - - Tutorials: https://docs.hopsworks.ai/ - - Concepts: https://docs.hopsworks.ai/ - - Guides: https://docs.hopsworks.ai/ - - Setup and Installation: https://docs.hopsworks.ai/ - - Administration: https://docs.hopsworks.ai/ - - API: - - API Reference: - - Connection: generated/connection_api.md - - Model Registry: - - Model Registry: generated/model-registry/model_registry_api.md - - Model: generated/model-registry/model_api.md - - Model Schema: generated/model-registry/model_schema_api.md - - Model Serving: - - Model Serving: generated/model-serving/model_serving_api.md - - Deployment: generated/model-serving/deployment_api.md - - Deployment state: generated/model-serving/predictor_state_api.md - - Deployment state condition: generated/model-serving/predictor_state_condition_api.md - - Predictor: generated/model-serving/predictor_api.md - - Transformer: generated/model-serving/transformer_api.md - - Inference Logger: generated/model-serving/inference_logger_api.md - - Inference Batcher: generated/model-serving/inference_batcher_api.md - - Resources: generated/model-serving/resources_api.md - # Added to allow navigation using the side drawer - - Hopsworks API: https://docs.hopsworks.ai/ - - Feature Store API: https://docs.hopsworks.ai/ - - Feature Store JavaDoc: https://docs.hopsworks.ai/ - - Contributing: CONTRIBUTING.md - - Community ↗: https://community.hopsworks.ai/ - -theme: - name: material - custom_dir: docs/overrides - favicon: assets/images/favicon.ico - logo: assets/images/hops-logo.png - icon: - repo: fontawesome/brands/github - font: - text: "Roboto" - code: "IBM Plex Mono" - palette: - accent: teal - scheme: hopsworks - features: - - navigation.tabs - - navigation.tabs.sticky - - navigation.expand - - -extra: - analytics: - provider: google - property: G-64FEEXPSDN - generator: false - version: - - provider: mike - - version: latest - social: - - icon: fontawesome/brands/twitter - link: https://twitter.com/hopsworks - - icon: fontawesome/brands/github - link: https://github.com/logicalclocks/hopsworks - - icon: fontawesome/brands/discourse - link: https://community.hopsworks.ai/ - - icon: fontawesome/brands/linkedin - link: https://www.linkedin.com/company/hopsworks/ - -extra_css: - - css/custom.css - - css/version-select.css - - css/dropdown.css - - css/marctech.css - -extra_javascript: - - js/version-select.js - - js/inject-api-links.js - - js/dropdown.js - -plugins: - - search - - minify: - minify_html: true - minify_css: true - minify_js: true - - mike: - canonical_version: latest - -markdown_extensions: - - admonition - - codehilite - - footnotes - - pymdownx.tabbed: - alternate_style: true - - pymdownx.arithmatex - - pymdownx.superfences - - pymdownx.details - - pymdownx.caret - - pymdownx.mark - - pymdownx.tilde - - pymdownx.critic - - attr_list - - md_in_html - - toc: - permalink: "#" - - pymdownx.tasklist: - custom_checkbox: true - - markdown_include.include: - base_path: docs diff --git a/hsml/python/.pre-commit-config.yaml b/hsml/python/.pre-commit-config.yaml deleted file mode 100644 index 645dcf677..000000000 --- a/hsml/python/.pre-commit-config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -exclude: setup.py -repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.2 - hooks: - # Run the linter - - id: ruff - args: [--fix] - # Run the formatter - - id: ruff-format diff --git a/hsml/python/pyproject.toml b/hsml/python/pyproject.toml deleted file mode 100644 index e4770cd4a..000000000 --- a/hsml/python/pyproject.toml +++ /dev/null @@ -1,136 +0,0 @@ -[project] -name="hsml" -dynamic = ["version"] -requires-python = ">=3.8,<3.13" -readme = "README.md" -description = "HSML Python SDK to interact with Hopsworks Model Registry" -keywords = ["Hopsworks", "Model Registry", "hsml", "Models", "ML", "Machine Learning Models", "TensorFlow", "PyTorch", "Machine Learning", "MLOps", "DataOps"] -authors = [{name = "Hopsworks AB", email = "robin@hopswors.ai"}] -license = { text = "Apache-2.0" } - -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Topic :: Utilities", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Intended Audience :: Developers", -] - -dependencies = [ - "pyhumps==1.6.1", - "requests", - "furl", - "boto3", - "pandas", - "numpy", - "pyjks", - "mock", - "tqdm", - "grpcio>=1.49.1,<2.0.0", # ^1.49.1 - "protobuf>=3.19.0,<4.0.0", # ^3.19.0 -] - -[project.optional-dependencies] -dev = ["pytest==7.4.4", "pytest-mock==3.12.0", "ruff"] - -[build-system] -requires = ["setuptools", "wheel"] -build-backend = "setuptools.build_meta" - - -[tool.setuptools.packages.find] -exclude = ["tests*"] -include = ["../Readme.md", "../LICENSE", "hsml", "hsml.*"] - - -[tool.setuptools.dynamic] -version = {attr = "hsml.version.__version__"} - -[project.urls] -Documentation = "https://docs.hopsworks.ai/latest" -Repository = "https://github.com/logicalclocks/machine-learning-api" -Homepage = "https://www.hopsworks.ai" -Community = "https://community.hopsworks.ai" - - -[tool.ruff] -# Exclude a variety of commonly ignored directories. -exclude = [ - ".bzr", - ".direnv", - ".eggs", - ".git", - ".git-rewrite", - ".hg", - ".ipynb_checkpoints", - ".mypy_cache", - ".nox", - ".pants.d", - ".pyenv", - ".pytest_cache", - ".pytype", - ".ruff_cache", - ".svn", - ".tox", - ".venv", - ".vscode", - "__pypackages__", - "_build", - "buck-out", - "build", - "dist", - "node_modules", - "site-packages", - "venv", - "java", -] - -# Same as Black. -line-length = 88 -indent-width = 4 - -# Assume Python 3.8+ syntax. -target-version = "py38" - -[tool.ruff.lint] -# 1. Enable flake8-bugbear (`B`) rules, in addition to the defaults. -select = ["E4", "E7", "E9", "F", "B", "I", "W"]#, "ANN"] -ignore = [ - "B905", # zip has no strict kwarg until Python 3.10 - "ANN101", # Missing type annotation for self in method - "ANN102", # Missing type annotation for cls in classmethod - "ANN003", # Missing type annotation for **kwarg in function - "ANN002", # Missing type annotation for *args in function - "ANN401", # Allow Any in type annotations - "W505", # Doc line too long -] - -# Allow fix for all enabled rules (when `--fix`) is provided. -fixable = ["ALL"] -unfixable = [] - -# Allow unused variables when underscore-prefixed. -dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" - -[tool.ruff.lint.isort] -lines-after-imports = 2 -known-third-party = ["hopsworks", "hsfs", "hsml"] - - -[tool.ruff.format] -# Like Black, use double quotes for strings. -quote-style = "double" - -# Like Black, indent with spaces, rather than tabs. -indent-style = "space" - -# Like Black, respect magic trailing commas. -skip-magic-trailing-comma = false - -# Like Black, automatically detect the appropriate line ending. -line-ending = "auto" diff --git a/hsml/python/setup.py b/hsml/python/setup.py deleted file mode 100644 index cb916d7e6..000000000 --- a/hsml/python/setup.py +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright 2021 Logical Clocks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -from setuptools import setup - - -setup() diff --git a/hsml/python/tests/__init__.py b/hsml/python/tests/__init__.py deleted file mode 100644 index 5b0cd48e7..000000000 --- a/hsml/python/tests/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright 2024 Logical Clocks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# diff --git a/hsml/python/tests/conftest.py b/hsml/python/tests/conftest.py deleted file mode 100644 index 00d23a9fc..000000000 --- a/hsml/python/tests/conftest.py +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright 2024 Hopsworks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -pytest_plugins = [ - "tests.fixtures.backend_fixtures", - "tests.fixtures.model_fixtures", -] diff --git a/hsml/python/tests/fixtures/backend_fixtures.py b/hsml/python/tests/fixtures/backend_fixtures.py deleted file mode 100644 index c79bc6ddb..000000000 --- a/hsml/python/tests/fixtures/backend_fixtures.py +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright 2024 Hopsworks AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import json -import os - -import pytest - - -FIXTURES_DIR = os.path.dirname(os.path.abspath(__file__)) - -FIXTURES = [ - "tag", - "model", - "resources", - "transformer", - "predictor", - "kafka_topic", - "inference_logger", - "inference_batcher", - "inference_endpoint", -] - -backend_fixtures_json = {} -for fixture in FIXTURES: - with open(os.path.join(FIXTURES_DIR, f"{fixture}_fixtures.json"), "r") as json_file: - backend_fixtures_json[fixture] = json.load(json_file) - - -@pytest.fixture -def backend_fixtures(): - return backend_fixtures_json diff --git a/hsml/requirements-docs.txt b/hsml/requirements-docs.txt deleted file mode 100644 index d1499a262..000000000 --- a/hsml/requirements-docs.txt +++ /dev/null @@ -1,11 +0,0 @@ -mkdocs==1.5.3 -mkdocs-material==9.5.17 -mike==2.0.0 -sphinx==7.2.6 -keras_autodoc @ git+https://git@github.com/logicalclocks/keras-autodoc -markdown-include==0.8.1 -mkdocs-jupyter==0.24.3 -markdown==3.6 -pymdown-extensions==10.7.1 -mkdocs-macros-plugin==1.0.4 -mkdocs-minify-plugin>=0.2.0 diff --git a/hsfs/java/beam/pom.xml b/java/beam/pom.xml similarity index 100% rename from hsfs/java/beam/pom.xml rename to java/beam/pom.xml diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/FeatureStore.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/FeatureStore.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/FeatureStore.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/FeatureStore.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/FeatureView.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/FeatureView.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/FeatureView.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/FeatureView.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/HopsworksConnection.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/HopsworksConnection.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/HopsworksConnection.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/HopsworksConnection.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/StreamFeatureGroup.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/StreamFeatureGroup.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/StreamFeatureGroup.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/StreamFeatureGroup.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/constructor/Query.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/constructor/Query.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/constructor/Query.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/constructor/Query.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamEngine.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamEngine.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamEngine.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamEngine.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamKafkaProducer.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamKafkaProducer.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamKafkaProducer.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamKafkaProducer.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamProducer.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamProducer.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamProducer.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/BeamProducer.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/FeatureGroupEngine.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/FeatureGroupEngine.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/FeatureGroupEngine.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/FeatureGroupEngine.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/FeatureViewEngine.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/FeatureViewEngine.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/FeatureViewEngine.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/FeatureViewEngine.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/GenericAvroSerializer.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/GenericAvroSerializer.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/GenericAvroSerializer.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/GenericAvroSerializer.java diff --git a/hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/KeySerializer.java b/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/KeySerializer.java similarity index 100% rename from hsfs/java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/KeySerializer.java rename to java/beam/src/main/java/com/logicalclocks/hsfs/beam/engine/KeySerializer.java diff --git a/hsfs/java/flink/pom.xml b/java/flink/pom.xml similarity index 100% rename from hsfs/java/flink/pom.xml rename to java/flink/pom.xml diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/FeatureStore.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/FeatureStore.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/FeatureStore.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/FeatureStore.java diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/FeatureView.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/FeatureView.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/FeatureView.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/FeatureView.java diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/HopsworksConnection.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/HopsworksConnection.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/HopsworksConnection.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/HopsworksConnection.java diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/StreamFeatureGroup.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/StreamFeatureGroup.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/StreamFeatureGroup.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/StreamFeatureGroup.java diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/constructor/FsQuery.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/constructor/FsQuery.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/constructor/FsQuery.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/constructor/FsQuery.java diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/constructor/Query.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/constructor/Query.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/constructor/Query.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/constructor/Query.java diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FeatureGroupEngine.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FeatureGroupEngine.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FeatureGroupEngine.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FeatureGroupEngine.java diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FeatureViewEngine.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FeatureViewEngine.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FeatureViewEngine.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FeatureViewEngine.java diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FlinkEngine.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FlinkEngine.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FlinkEngine.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/FlinkEngine.java diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/KafkaRecordSerializer.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/KafkaRecordSerializer.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/KafkaRecordSerializer.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/KafkaRecordSerializer.java diff --git a/hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/PojoToAvroRecord.java b/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/PojoToAvroRecord.java similarity index 100% rename from hsfs/java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/PojoToAvroRecord.java rename to java/flink/src/main/java/com/logicalclocks/hsfs/flink/engine/PojoToAvroRecord.java diff --git a/hsfs/java/hsfs/pom.xml b/java/hsfs/pom.xml similarity index 100% rename from hsfs/java/hsfs/pom.xml rename to java/hsfs/pom.xml diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/DataFormat.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/DataFormat.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/DataFormat.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/DataFormat.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/DeltaStreamerJobConf.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/DeltaStreamerJobConf.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/DeltaStreamerJobConf.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/DeltaStreamerJobConf.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/EntityEndpointType.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/EntityEndpointType.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/EntityEndpointType.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/EntityEndpointType.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/ExternalDataFormat.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/ExternalDataFormat.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/ExternalDataFormat.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/ExternalDataFormat.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/Feature.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/Feature.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/Feature.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/Feature.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupBase.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupBase.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupBase.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupBase.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupBaseForApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupBaseForApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupBaseForApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupBaseForApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupCommit.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupCommit.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupCommit.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureGroupCommit.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureStoreBase.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureStoreBase.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureStoreBase.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureStoreBase.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureStoreException.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureStoreException.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureStoreException.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureStoreException.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureType.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureType.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureType.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureType.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureViewBase.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureViewBase.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureViewBase.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/FeatureViewBase.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/HopsworksConnectionBase.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/HopsworksConnectionBase.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/HopsworksConnectionBase.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/HopsworksConnectionBase.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/HudiOperationType.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/HudiOperationType.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/HudiOperationType.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/HudiOperationType.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/JobConfiguration.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/JobConfiguration.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/JobConfiguration.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/JobConfiguration.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/Project.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/Project.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/Project.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/Project.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/SecretStore.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/SecretStore.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/SecretStore.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/SecretStore.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/SecurityProtocol.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/SecurityProtocol.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/SecurityProtocol.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/SecurityProtocol.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/Split.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/Split.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/Split.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/Split.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/SslEndpointIdentificationAlgorithm.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/SslEndpointIdentificationAlgorithm.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/SslEndpointIdentificationAlgorithm.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/SslEndpointIdentificationAlgorithm.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/StatisticsConfig.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/StatisticsConfig.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/StatisticsConfig.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/StatisticsConfig.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/Storage.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/Storage.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/Storage.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/Storage.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/StorageConnector.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/StorageConnector.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/StorageConnector.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/StorageConnector.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/StorageConnectorType.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/StorageConnectorType.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/StorageConnectorType.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/StorageConnectorType.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/TimeTravelFormat.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/TimeTravelFormat.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/TimeTravelFormat.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/TimeTravelFormat.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetBase.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetBase.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetBase.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetBase.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetFeature.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetFeature.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetFeature.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetFeature.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetType.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetType.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetType.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/TrainingDatasetType.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/TransformationFunction.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/TransformationFunction.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/TransformationFunction.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/TransformationFunction.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FeatureGroupAlias.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FeatureGroupAlias.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FeatureGroupAlias.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FeatureGroupAlias.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/Filter.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/Filter.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/Filter.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/Filter.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FilterLogic.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FilterLogic.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FilterLogic.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FilterLogic.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FsQueryBase.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FsQueryBase.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FsQueryBase.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/FsQueryBase.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/Join.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/Join.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/Join.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/Join.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/JoinType.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/JoinType.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/JoinType.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/JoinType.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/PreparedStatementParameter.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/PreparedStatementParameter.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/PreparedStatementParameter.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/PreparedStatementParameter.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/QueryBase.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/QueryBase.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/QueryBase.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/QueryBase.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/ServingPreparedStatement.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/ServingPreparedStatement.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/ServingPreparedStatement.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/ServingPreparedStatement.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/SqlFilterCondition.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/SqlFilterCondition.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/SqlFilterCondition.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/SqlFilterCondition.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/SqlFilterLogic.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/SqlFilterLogic.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/SqlFilterLogic.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/constructor/SqlFilterLogic.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/CodeEngine.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/CodeEngine.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/CodeEngine.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/CodeEngine.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/EngineBase.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/EngineBase.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/EngineBase.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/EngineBase.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupEngineBase.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupEngineBase.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupEngineBase.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupEngineBase.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupUtils.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupUtils.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupUtils.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupUtils.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureViewEngineBase.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureViewEngineBase.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureViewEngineBase.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureViewEngineBase.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/VectorServer.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/VectorServer.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/VectorServer.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/VectorServer.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/AuthorizationHandler.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/AuthorizationHandler.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/AuthorizationHandler.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/AuthorizationHandler.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Code.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Code.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Code.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Code.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/CodeApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/CodeApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/CodeApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/CodeApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Credentials.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Credentials.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Credentials.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Credentials.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/DatasetApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/DatasetApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/DatasetApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/DatasetApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureDescriptiveStatistics.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureDescriptiveStatistics.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureDescriptiveStatistics.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureDescriptiveStatistics.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureGroupApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureGroupApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureGroupApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureGroupApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureStoreApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureStoreApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureStoreApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureStoreApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureViewApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureViewApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureViewApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/FeatureViewApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksClient.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksClient.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksClient.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksClient.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksExternalClient.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksExternalClient.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksExternalClient.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksExternalClient.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksHostnameVerifier.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksHostnameVerifier.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksHostnameVerifier.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksHostnameVerifier.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksHttpClient.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksHttpClient.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksHttpClient.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksHttpClient.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksInternalClient.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksInternalClient.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksInternalClient.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksInternalClient.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/InternalException.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/InternalException.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/InternalException.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/InternalException.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/KafkaApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/KafkaApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/KafkaApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/KafkaApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/KafkaClusterInfo.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/KafkaClusterInfo.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/KafkaClusterInfo.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/KafkaClusterInfo.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/OnDemandOptions.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/OnDemandOptions.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/OnDemandOptions.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/OnDemandOptions.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Option.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Option.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Option.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Option.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/ProjectApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/ProjectApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/ProjectApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/ProjectApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/QueryConstructorApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/QueryConstructorApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/QueryConstructorApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/QueryConstructorApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/RestDto.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/RestDto.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/RestDto.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/RestDto.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/SplitStatistics.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/SplitStatistics.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/SplitStatistics.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/SplitStatistics.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Statistics.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Statistics.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Statistics.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Statistics.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/StatisticsApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/StatisticsApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/StatisticsApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/StatisticsApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/StorageConnectorApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/StorageConnectorApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/StorageConnectorApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/StorageConnectorApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Subject.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Subject.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Subject.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Subject.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Tags.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Tags.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Tags.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Tags.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TagsApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TagsApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TagsApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TagsApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TrainingDatasetApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TrainingDatasetApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TrainingDatasetApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TrainingDatasetApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TransformationFunctionAttached.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TransformationFunctionAttached.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TransformationFunctionAttached.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/TransformationFunctionAttached.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/UnauthorizedException.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/UnauthorizedException.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/UnauthorizedException.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/UnauthorizedException.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/User.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/User.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/User.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/User.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Variable.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Variable.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Variable.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/Variable.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/VariablesApi.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/VariablesApi.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/VariablesApi.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/VariablesApi.java diff --git a/hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/util/Constants.java b/java/hsfs/src/main/java/com/logicalclocks/hsfs/util/Constants.java similarity index 100% rename from hsfs/java/hsfs/src/main/java/com/logicalclocks/hsfs/util/Constants.java rename to java/hsfs/src/main/java/com/logicalclocks/hsfs/util/Constants.java diff --git a/hsfs/java/hsfs/src/test/java/com/logicalclocks/hsfs/TestFeatureGroupBaseForApi.java b/java/hsfs/src/test/java/com/logicalclocks/hsfs/TestFeatureGroupBaseForApi.java similarity index 100% rename from hsfs/java/hsfs/src/test/java/com/logicalclocks/hsfs/TestFeatureGroupBaseForApi.java rename to java/hsfs/src/test/java/com/logicalclocks/hsfs/TestFeatureGroupBaseForApi.java diff --git a/hsfs/java/hsfs/src/test/java/com/logicalclocks/hsfs/TestHopsworksExternalClient.java b/java/hsfs/src/test/java/com/logicalclocks/hsfs/TestHopsworksExternalClient.java similarity index 100% rename from hsfs/java/hsfs/src/test/java/com/logicalclocks/hsfs/TestHopsworksExternalClient.java rename to java/hsfs/src/test/java/com/logicalclocks/hsfs/TestHopsworksExternalClient.java diff --git a/hsfs/java/hsfs/src/test/java/com/logicalclocks/hsfs/engine/TestFeatureGroupUtils.java b/java/hsfs/src/test/java/com/logicalclocks/hsfs/engine/TestFeatureGroupUtils.java similarity index 100% rename from hsfs/java/hsfs/src/test/java/com/logicalclocks/hsfs/engine/TestFeatureGroupUtils.java rename to java/hsfs/src/test/java/com/logicalclocks/hsfs/engine/TestFeatureGroupUtils.java diff --git a/hsfs/java/hsfs/src/test/java/com/logicalclocks/hsfs/metadata/TestHopsworksClient.java b/java/hsfs/src/test/java/com/logicalclocks/hsfs/metadata/TestHopsworksClient.java similarity index 100% rename from hsfs/java/hsfs/src/test/java/com/logicalclocks/hsfs/metadata/TestHopsworksClient.java rename to java/hsfs/src/test/java/com/logicalclocks/hsfs/metadata/TestHopsworksClient.java diff --git a/hsfs/java/hsfs/src/test/java/com/logicalclocks/hsfs/metadata/TestTagsApi.java b/java/hsfs/src/test/java/com/logicalclocks/hsfs/metadata/TestTagsApi.java similarity index 100% rename from hsfs/java/hsfs/src/test/java/com/logicalclocks/hsfs/metadata/TestTagsApi.java rename to java/hsfs/src/test/java/com/logicalclocks/hsfs/metadata/TestTagsApi.java diff --git a/java/pom.xml b/java/pom.xml index 500d68f33..23136cb24 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -5,6 +5,304 @@ 4.0.0 com.logicalclocks - hopsworks + hsfs-parent + pom 4.0.0-SNAPSHOT + + hsfs + spark + flink + beam + + + + 1.8 + 1.8 + 14.0.1 + 4.5.6 + 4.4.13 + 1.7.30 + 1.2.17 + 2.1.8 + 1.18.10 + 2.10.0 + 1.1.0.6-SNAPSHOT + 0.12.3.0 + 2.10.40 + 2.12.10 + 2.12 + 0.0.5 + 20231013 + 0.12.2 + 5.9.1 + 2.22.0 + 4.3.1 + 1.8.2 + + spark3.1 + + UTF-8 + ${project.basedir}/delombok + + + + + org.projectlombok + lombok + ${lombok.version} + + + + com.damnhandy + handy-uri-templates + ${handy.version} + + + + com.google.guava + guava + ${guava.version} + provided + + + + org.apache.httpcomponents + httpclient + ${httpclient.version} + provided + + + + org.apache.httpcomponents + httpcore + ${httpcore.version} + provided + + + + org.slf4j + slf4j-api + ${slf4j.version} + provided + + + + org.slf4j + slf4j-log4j12 + ${slf4j.version} + provided + + + + log4j + log4j + ${log4j.version} + provided + + + + org.json + json + ${json.version} + + + + io.specto + hoverfly-java + ${hoverfly.version} + test + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + + org.junit.jupiter + junit-jupiter-engine + ${junit.version} + test + + + + org.mockito + mockito-core + ${mockito.version} + test + + + + + + + org.scala-tools + maven-scala-plugin + + ${scala.version} + + + + scala-compile-first + process-resources + + add-source + compile + + + + scala-test-compile + process-test-resources + + testCompile + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.4.1 + + + + jar-with-dependencies + + + + + make-assembly + + package + + single + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.1.1 + + + validate + validate + + check + + + + + src/main/resources/checkstyle.xml + src/main/resources/suppressions.xml + true + true + true + true + + src/main/java + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire-plugin.version} + + + + hadoop.home.dir + ${project.basedir}/src/test/resources/hadoop/ + + + src/test/resources/system.properties + + + + org.projectlombok + lombok-maven-plugin + ${lombok.version}.0 + + ${project.basedir}/src/main/java + ${delombok.output} + false + + + + + delombok + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.5.0 + + + + **/MainClass.java + + **/beam/constructor/* + **/flink/constructor/* + + + + + aggregate + + aggregate + + site + + + + + + + + + + + src/test/resources + + + + + + + spark-3.3 + + 2.0.4.0-spark-3.3 + spark3.3 + + + + + + + Hops + Hops Repo + https://archiva.hops.works/repository/Hops/ + + true + + + true + + + + + + + Hops + Hops Repo + https://archiva.hops.works/repository/Hops/ + + diff --git a/hsfs/java/spark/pom.xml b/java/spark/pom.xml similarity index 100% rename from hsfs/java/spark/pom.xml rename to java/spark/pom.xml diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/ExternalFeatureGroup.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/ExternalFeatureGroup.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/ExternalFeatureGroup.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/ExternalFeatureGroup.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureGroup.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureGroup.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureGroup.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureGroup.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureStore.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureStore.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureStore.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureStore.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureView.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureView.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureView.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/FeatureView.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/HopsworksConnection.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/HopsworksConnection.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/HopsworksConnection.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/HopsworksConnection.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/MainClass.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/MainClass.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/MainClass.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/MainClass.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/StreamFeatureGroup.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/StreamFeatureGroup.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/StreamFeatureGroup.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/StreamFeatureGroup.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/TrainingDataset.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/TrainingDataset.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/TrainingDataset.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/TrainingDataset.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/TrainingDatasetBundle.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/TrainingDatasetBundle.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/TrainingDatasetBundle.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/TrainingDatasetBundle.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/constructor/FsQuery.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/constructor/FsQuery.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/constructor/FsQuery.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/constructor/FsQuery.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/constructor/Query.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/constructor/Query.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/constructor/Query.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/constructor/Query.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/FeatureGroupEngine.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/FeatureGroupEngine.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/FeatureGroupEngine.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/FeatureGroupEngine.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/FeatureViewEngine.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/FeatureViewEngine.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/FeatureViewEngine.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/FeatureViewEngine.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/SparkEngine.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/SparkEngine.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/SparkEngine.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/SparkEngine.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/StatisticsEngine.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/StatisticsEngine.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/StatisticsEngine.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/StatisticsEngine.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/TrainingDatasetEngine.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/TrainingDatasetEngine.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/TrainingDatasetEngine.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/TrainingDatasetEngine.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/TrainingDatasetUtils.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/TrainingDatasetUtils.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/TrainingDatasetUtils.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/TrainingDatasetUtils.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerAvroDeserializer.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerAvroDeserializer.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerAvroDeserializer.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerAvroDeserializer.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerConfig.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerConfig.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerConfig.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerConfig.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerKafkaSource.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerKafkaSource.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerKafkaSource.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerKafkaSource.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerSchemaProvider.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerSchemaProvider.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerSchemaProvider.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerSchemaProvider.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerTransformer.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerTransformer.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerTransformer.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/DeltaStreamerTransformer.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/HudiEngine.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/HudiEngine.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/HudiEngine.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/engine/hudi/HudiEngine.java diff --git a/hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/util/StorageConnectorUtils.java b/java/spark/src/main/java/com/logicalclocks/hsfs/spark/util/StorageConnectorUtils.java similarity index 100% rename from hsfs/java/spark/src/main/java/com/logicalclocks/hsfs/spark/util/StorageConnectorUtils.java rename to java/spark/src/main/java/com/logicalclocks/hsfs/spark/util/StorageConnectorUtils.java diff --git a/hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestExternalFeatureGroup.java b/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestExternalFeatureGroup.java similarity index 100% rename from hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestExternalFeatureGroup.java rename to java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestExternalFeatureGroup.java diff --git a/hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeature.java b/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeature.java similarity index 100% rename from hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeature.java rename to java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeature.java diff --git a/hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeatureGroup.java b/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeatureGroup.java similarity index 100% rename from hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeatureGroup.java rename to java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeatureGroup.java diff --git a/hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeatureView.java b/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeatureView.java similarity index 100% rename from hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeatureView.java rename to java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestFeatureView.java diff --git a/hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestStorageConnector.java b/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestStorageConnector.java similarity index 100% rename from hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestStorageConnector.java rename to java/spark/src/test/java/com/logicalclocks/hsfs/spark/TestStorageConnector.java diff --git a/hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/constructor/TestQuery.java b/java/spark/src/test/java/com/logicalclocks/hsfs/spark/constructor/TestQuery.java similarity index 100% rename from hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/constructor/TestQuery.java rename to java/spark/src/test/java/com/logicalclocks/hsfs/spark/constructor/TestQuery.java diff --git a/hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestFeatureViewEngine.java b/java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestFeatureViewEngine.java similarity index 100% rename from hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestFeatureViewEngine.java rename to java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestFeatureViewEngine.java diff --git a/hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestHudiEngine.java b/java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestHudiEngine.java similarity index 100% rename from hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestHudiEngine.java rename to java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestHudiEngine.java diff --git a/hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestSparkEngine.java b/java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestSparkEngine.java similarity index 100% rename from hsfs/java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestSparkEngine.java rename to java/spark/src/test/java/com/logicalclocks/hsfs/spark/engine/TestSparkEngine.java diff --git a/hsfs/java/spark/src/test/resources/hadoop/bin/winutils.exe b/java/spark/src/test/resources/hadoop/bin/winutils.exe similarity index 100% rename from hsfs/java/spark/src/test/resources/hadoop/bin/winutils.exe rename to java/spark/src/test/resources/hadoop/bin/winutils.exe diff --git a/hsfs/java/spark/src/test/resources/system.properties b/java/spark/src/test/resources/system.properties similarity index 100% rename from hsfs/java/spark/src/test/resources/system.properties rename to java/spark/src/test/resources/system.properties diff --git a/hsfs/java/src/main/resources/checkstyle.xml b/java/src/main/resources/checkstyle.xml similarity index 100% rename from hsfs/java/src/main/resources/checkstyle.xml rename to java/src/main/resources/checkstyle.xml diff --git a/hsfs/java/src/main/resources/suppressions.xml b/java/src/main/resources/suppressions.xml similarity index 100% rename from hsfs/java/src/main/resources/suppressions.xml rename to java/src/main/resources/suppressions.xml diff --git a/hsfs/java/src/test/resources/hadoop/bin/winutils.exe b/java/src/test/resources/hadoop/bin/winutils.exe similarity index 100% rename from hsfs/java/src/test/resources/hadoop/bin/winutils.exe rename to java/src/test/resources/hadoop/bin/winutils.exe diff --git a/hsfs/java/src/test/resources/system.properties b/java/src/test/resources/system.properties similarity index 100% rename from hsfs/java/src/test/resources/system.properties rename to java/src/test/resources/system.properties diff --git a/hsfs/locust_benchmark/Dockerfile b/locust_benchmark/Dockerfile similarity index 100% rename from hsfs/locust_benchmark/Dockerfile rename to locust_benchmark/Dockerfile diff --git a/hsfs/locust_benchmark/README.md b/locust_benchmark/README.md similarity index 100% rename from hsfs/locust_benchmark/README.md rename to locust_benchmark/README.md diff --git a/hsfs/locust_benchmark/common/__init__.py b/locust_benchmark/common/__init__.py similarity index 100% rename from hsfs/locust_benchmark/common/__init__.py rename to locust_benchmark/common/__init__.py diff --git a/hsfs/locust_benchmark/common/hopsworks_client.py b/locust_benchmark/common/hopsworks_client.py similarity index 100% rename from hsfs/locust_benchmark/common/hopsworks_client.py rename to locust_benchmark/common/hopsworks_client.py diff --git a/hsfs/locust_benchmark/common/stop_watch.py b/locust_benchmark/common/stop_watch.py similarity index 100% rename from hsfs/locust_benchmark/common/stop_watch.py rename to locust_benchmark/common/stop_watch.py diff --git a/hsfs/locust_benchmark/create_feature_group.py b/locust_benchmark/create_feature_group.py similarity index 100% rename from hsfs/locust_benchmark/create_feature_group.py rename to locust_benchmark/create_feature_group.py diff --git a/hsfs/locust_benchmark/docker-compose.yml b/locust_benchmark/docker-compose.yml similarity index 100% rename from hsfs/locust_benchmark/docker-compose.yml rename to locust_benchmark/docker-compose.yml diff --git a/hsfs/locust_benchmark/hopsworks_config.json b/locust_benchmark/hopsworks_config.json similarity index 100% rename from hsfs/locust_benchmark/hopsworks_config.json rename to locust_benchmark/hopsworks_config.json diff --git a/hsfs/locust_benchmark/locustfile.py b/locust_benchmark/locustfile.py similarity index 100% rename from hsfs/locust_benchmark/locustfile.py rename to locust_benchmark/locustfile.py diff --git a/hsfs/locust_benchmark/requirements.txt b/locust_benchmark/requirements.txt similarity index 100% rename from hsfs/locust_benchmark/requirements.txt rename to locust_benchmark/requirements.txt diff --git a/mkdocs.yml b/mkdocs.yml index ace10ae11..f59e2e4bc 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,9 +34,50 @@ nav: - KafkaSchema: generated/api/kafka_schema.md - Secrets: generated/api/secrets.md - OpenSearch: generated/api/opensearch.md + - Connection (HSFS): generated/api/connection_api.md + - ExpectationSuite: generated/api/expectation_suite_api.md + - FeatureStore: generated/api/feature_store_api.md + - FeatureGroup: generated/api/feature_group_api.md + - ExternalFeatureGroup: generated/api/external_feature_group_api.md + - SpineGroup: generated/api/spine_group_api.md + - FeatureView: generated/api/feature_view_api.md + - TrainingDataset: generated/api/training_dataset_api.md + - Storage Connector: generated/api/storage_connector_api.md + - Feature: generated/api/feature_api.md + - Query: generated/api/query_api.md + - Transformation Functions: generated/api/transformation_functions_api.md + - ValidationReport: generated/api/validation_report_api.md + - Job: generated/api/job.md + - Provenance Links: generated/api/links.md + - Statistics: + - Statistics: generated/api/statistics_api.md + - Split Statistics: generated/api/split_statistics_api.md + - Feature descriptive statistics: generated/api/feature_descriptive_statistics_api.md + - Feature Monitoring: + - Configuration: generated/api/feature_monitoring_config_api.md + - Result: generated/api/feature_monitoring_result_api.md + - Window: generated/api/feature_monitoring_window_config_api.md + - Embedding: + - EmbeddingIndex: generated/api/embedding_index_api.md + - EmbeddingFeature: generated/api/embedding_feature_api.md + - SimilarityFunctionType: generated/api/similarity_function_type_api.md + - Connection (HSML): generated/connection_api.md + - Model Registry: + - Model Registry: generated/model-registry/model_registry_api.md + - Model: generated/model-registry/model_api.md + - Model Schema: generated/model-registry/model_schema_api.md + - Model Serving: + - Model Serving: generated/model-serving/model_serving_api.md + - Deployment: generated/model-serving/deployment_api.md + - Deployment state: generated/model-serving/predictor_state_api.md + - Deployment state condition: generated/model-serving/predictor_state_condition_api.md + - Predictor: generated/model-serving/predictor_api.md + - Transformer: generated/model-serving/transformer_api.md + - Inference Logger: generated/model-serving/inference_logger_api.md + - Inference Batcher: generated/model-serving/inference_batcher_api.md + - Resources: generated/model-serving/resources_api.md # Added to allow navigation using the side drawer - Hopsworks API: https://docs.hopsworks.ai/hopsworks-api/latest/ - - MLOps API: https://docs.hopsworks.ai/machine-learning-api/latest/ - Feature Store JavaDoc: https://docs.hopsworks.ai/feature-store-javadoc/latest/ - Contributing: CONTRIBUTING.md - Community ↗: https://community.hopsworks.ai/ diff --git a/python/.pre-commit-config.yaml b/python/.pre-commit-config.yaml index 8c774780d..50ff0bd9f 100644 --- a/python/.pre-commit-config.yaml +++ b/python/.pre-commit-config.yaml @@ -1,7 +1,7 @@ exclude: setup.py repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.2 + rev: v0.5.0 hooks: - id: ruff args: [--fix] diff --git a/python/auto_doc.py b/python/auto_doc.py new file mode 100644 index 000000000..342a7dcfd --- /dev/null +++ b/python/auto_doc.py @@ -0,0 +1,721 @@ +# +# Copyright 2022 Logical Clocks AB +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os +import pathlib +import shutil + +import keras_autodoc + + +JSON_METHODS = [ + "extract_fields_from_json", + "from_json", + "from_response_json", + "json", + "update_from_response_json", +] + +PAGES = { + "api/login.md": { + "login": ["hopsworks.login"], + "get_current_project": ["hopsworks.get_current_project"], + "fs_api": ["hopsworks.project.Project.get_feature_store"], + "mr_api": ["hopsworks.project.Project.get_model_registry"], + "ms_api": ["hopsworks.project.Project.get_model_serving"], + }, + "api/udf.md": { + "udf": ["hopsworks.udf"], + }, + "api/connection.md": { + "connection_create": ["hopsworks.connection.Connection.connection"], + "connection_properties": keras_autodoc.get_properties( + "hopsworks.connection.Connection" + ), + "connection_methods": keras_autodoc.get_methods( + "hopsworks.connection.Connection", exclude=["from_response_json", "json"] + ), + }, + "api/projects.md": { + "project_create": ["hopsworks.create_project"], + "project_properties": keras_autodoc.get_properties("hopsworks.project.Project"), + "project_methods": keras_autodoc.get_methods( + "hopsworks.project.Project", exclude=["from_response_json", "json"] + ), + }, + "api/jobs.md": { + "job_api_handle": ["hopsworks.project.Project.get_jobs_api"], + "job_create": ["hopsworks.core.job_api.JobsApi.create_job"], + "job_get": ["hopsworks.core.job_api.JobsApi.get_job"], + "job_get_all": ["hopsworks.core.job_api.JobsApi.get_jobs"], + "job_properties": keras_autodoc.get_properties("hopsworks.job.Job"), + "job_config": ["hopsworks.core.job_api.JobsApi.get_configuration"], + "job_methods": keras_autodoc.get_methods( + "hopsworks.job.Job", exclude=["from_response_json", "json"] + ), + }, + "api/executions.md": { + "execution_create": ["hopsworks.job.Job.run"], + "execution_get": ["hopsworks.job.Job.get_executions"], + "execution_properties": keras_autodoc.get_properties( + "hopsworks.execution.Execution" + ), + "execution_methods": keras_autodoc.get_methods( + "hopsworks.execution.Execution", + exclude=["from_response_json", "json", "update_from_response_json"], + ), + }, + "api/flink_cluster.md": { + "flink_api_handle": ["hopsworks.project.Project.get_flink_cluster_api"], + "setup_cluster": [ + "hopsworks.core.flink_cluster_api.FlinkClusterApi.setup_cluster" + ], + "get_cluster": ["hopsworks.core.flink_cluster_api.FlinkClusterApi.get_cluster"], + "start_cluster": ["hopsworks.flink_cluster.FlinkCluster.start"], + "submit_job_to_cluster": ["hopsworks.flink_cluster.FlinkCluster.submit_job"], + "flink_cluster_properties": keras_autodoc.get_properties( + "hopsworks.flink_cluster.FlinkCluster" + ), + "flink_cluster_methods": keras_autodoc.get_methods( + "hopsworks.flink_cluster.FlinkCluster", + exclude=["from_response_json", "json"], + ), + }, + "api/environment.md": { + "env_api_handle": ["hopsworks.project.Project.get_environment_api"], + "env_create": [ + "hopsworks.core.environment_api.EnvironmentApi.create_environment" + ], + "env_get": ["hopsworks.core.environment_api.EnvironmentApi.get_environment"], + "env_methods": keras_autodoc.get_methods( + "hopsworks.environment.Environment", exclude=["from_response_json", "json"] + ), + }, + "api/git_repo.md": { + "git_api_handle": ["hopsworks.project.Project.get_git_api"], + "git_repo_clone": ["hopsworks.core.git_api.GitApi.clone"], + "git_repo_get": ["hopsworks.core.git_api.GitApi.get_repo"], + "git_repo_get_all": ["hopsworks.core.git_api.GitApi.get_repos"], + "git_repo_properties": keras_autodoc.get_properties( + "hopsworks.git_repo.GitRepo" + ), + "git_repo_methods": keras_autodoc.get_methods( + "hopsworks.git_repo.GitRepo", exclude=["from_response_json", "json"] + ), + }, + "api/git_provider.md": { + "git_api_handle": ["hopsworks.project.Project.get_git_api"], + "git_provider_create": ["hopsworks.core.git_api.GitApi.set_provider"], + "git_provider_get": ["hopsworks.core.git_api.GitApi.get_provider"], + "git_provider_get_all": ["hopsworks.core.git_api.GitApi.get_providers"], + "git_provider_properties": keras_autodoc.get_properties( + "hopsworks.git_provider.GitProvider" + ), + "git_provider_methods": keras_autodoc.get_methods( + "hopsworks.git_provider.GitProvider", exclude=["from_response_json", "json"] + ), + }, + "api/git_remote.md": { + "git_api_handle": ["hopsworks.project.Project.get_git_api"], + "git_remote_create": ["hopsworks.git_repo.GitRepo.add_remote"], + "git_remote_get": ["hopsworks.git_repo.GitRepo.get_remote"], + "git_remote_get_all": ["hopsworks.git_repo.GitRepo.get_remotes"], + "git_remote_properties": keras_autodoc.get_properties( + "hopsworks.git_remote.GitRemote" + ), + "git_remote_methods": keras_autodoc.get_methods( + "hopsworks.git_remote.GitRemote", exclude=["from_response_json", "json"] + ), + }, + "api/datasets.md": { + "dataset_api_handle": ["hopsworks.project.Project.get_dataset_api"], + "dataset_methods": keras_autodoc.get_methods( + "hopsworks.core.dataset_api.DatasetApi" + ), + }, + "api/kafka_topic.md": { + "kafka_api_handle": ["hopsworks.project.Project.get_kafka_api"], + "kafka_config": ["hopsworks.core.kafka_api.KafkaApi.get_default_config"], + "kafka_topic_create": ["hopsworks.core.kafka_api.KafkaApi.create_topic"], + "kafka_topic_get": ["hopsworks.core.kafka_api.KafkaApi.get_topic"], + "kafka_topic_get_all": ["hopsworks.core.kafka_api.KafkaApi.get_topics"], + "kafka_topic_properties": keras_autodoc.get_properties( + "hopsworks.kafka_topic.KafkaTopic" + ), + "kafka_topic_methods": keras_autodoc.get_methods( + "hopsworks.kafka_topic.KafkaTopic", + exclude=["from_response_json", "json", "update_from_response_json"], + ), + }, + "api/kafka_schema.md": { + "kafka_api_handle": ["hopsworks.project.Project.get_kafka_api"], + "kafka_schema_create": ["hopsworks.core.kafka_api.KafkaApi.create_schema"], + "kafka_schema_get": ["hopsworks.core.kafka_api.KafkaApi.get_schema"], + "kafka_schema_get_all": ["hopsworks.core.kafka_api.KafkaApi.get_schemas"], + "kafka_schema_get_subjects": ["hopsworks.core.kafka_api.KafkaApi.get_subjects"], + "kafka_schema_properties": keras_autodoc.get_properties( + "hopsworks.kafka_schema.KafkaSchema" + ), + "kafka_schema_methods": keras_autodoc.get_methods( + "hopsworks.kafka_schema.KafkaSchema", + exclude=["from_response_json", "json", "update_from_response_json"], + ), + }, + "api/secrets.md": { + "secret_api_handle": ["hopsworks.get_secrets_api"], + "secret_create": ["hopsworks.core.secret_api.SecretsApi.create_secret"], + "secret_get": ["hopsworks.core.secret_api.SecretsApi.get_secret"], + "secret_get_simplified": ["hopsworks.core.secret_api.SecretsApi.get"], + "secret_get_all": ["hopsworks.core.secret_api.SecretsApi.get_secrets"], + "secret_properties": keras_autodoc.get_properties("hopsworks.secret.Secret"), + "secret_methods": keras_autodoc.get_methods( + "hopsworks.secret.Secret", exclude=["from_response_json", "json"] + ), + }, + "api/opensearch.md": { + "opensearch_api_handle": ["hopsworks.project.Project.get_opensearch_api"], + "opensearch_methods": keras_autodoc.get_methods( + "hopsworks.core.opensearch_api.OpenSearchApi" + ), + }, + "api/connection_api.md": { + "connection": ["hsfs.connection.Connection"], + "connection_properties": keras_autodoc.get_properties( + "hsfs.connection.Connection" + ), + "connection_methods": keras_autodoc.get_methods("hsfs.connection.Connection"), + }, + "api/spine_group_api.md": { + "fg": ["hsfs.feature_group.SpineGroup"], + "fg_create": ["hsfs.feature_store.FeatureStore.get_or_create_spine_group"], + "fg_get": ["hsfs.feature_store.FeatureStore.get_or_create_spine_group"], + "fg_properties": keras_autodoc.get_properties( + "hsfs.feature_group.SpineGroup", + exclude=[ + "expectation_suite", + "location", + "online_enabled", + "statistics", + "statistics_config", + "subject", + ], + ), + "fg_methods": keras_autodoc.get_methods( + "hsfs.feature_group.SpineGroup", + exclude=[ + "append_features", + "compute_statistics", + "delete_expectation_suite", + "from_response_json", + "get_all_validation_reports", + "get_expectation_suite", + "get_latest_validation_report", + "get_statistics", + "get_validation_history", + "save_expectation_suite", + "save_validation_report", + "update_from_response_json", + "update_statistics_config", + "validate", + ], + ), + }, + "api/training_dataset_api.md": { + "td": ["hsfs.training_dataset.TrainingDataset"], + "td_create": ["hsfs.feature_store.FeatureStore.create_training_dataset"], + "td_get": ["hsfs.feature_store.FeatureStore.get_training_dataset"], + "td_properties": keras_autodoc.get_properties( + "hsfs.training_dataset.TrainingDataset" + ), + "td_methods": keras_autodoc.get_methods( + "hsfs.training_dataset.TrainingDataset" + ), + }, + "api/feature_view_api.md": { + "fv": ["hsfs.feature_view.FeatureView"], + "fv_create": ["hsfs.feature_store.FeatureStore.create_feature_view"], + "fv_get": ["hsfs.feature_store.FeatureStore.get_feature_view"], + "fvs_get": ["hsfs.feature_store.FeatureStore.get_feature_views"], + "fv_properties": keras_autodoc.get_properties("hsfs.feature_view.FeatureView"), + "fv_methods": keras_autodoc.get_methods("hsfs.feature_view.FeatureView"), + }, + "api/feature_api.md": { + "feature": ["hsfs.feature.Feature"], + "feature_properties": keras_autodoc.get_properties("hsfs.feature.Feature"), + "feature_methods": keras_autodoc.get_methods("hsfs.feature.Feature"), + }, + "api/expectation_suite_api.md": { + "expectation_suite": ["hsfs.expectation_suite.ExpectationSuite"], + "expectation_suite_attach": [ + "hsfs.feature_group.FeatureGroup.save_expectation_suite" + ], + "single_expectation_api": [ + "hsfs.expectation_suite.ExpectationSuite.add_expectation", + "hsfs.expectation_suite.ExpectationSuite.replace_expectation", + "hsfs.expectation_suite.ExpectationSuite.remove_expectation", + ], + "expectation_suite_properties": keras_autodoc.get_properties( + "hsfs.expectation_suite.ExpectationSuite" + ), + "expectation_suite_methods": keras_autodoc.get_methods( + "hsfs.expectation_suite.ExpectationSuite" + ), + }, + "api/feature_store_api.md": { + "fs": ["hsfs.feature_store.FeatureStore"], + "fs_get": ["hsfs.connection.Connection.get_feature_store"], + "fs_properties": keras_autodoc.get_properties( + "hsfs.feature_store.FeatureStore" + ), + "fs_methods": keras_autodoc.get_methods("hsfs.feature_store.FeatureStore"), + }, + "api/feature_group_api.md": { + "fg": ["hsfs.feature_group.FeatureGroup"], + "fg_create": [ + "hsfs.feature_store.FeatureStore.create_feature_group", + "hsfs.feature_store.FeatureStore.get_or_create_feature_group", + ], + "fg_get": ["hsfs.feature_store.FeatureStore.get_feature_group"], + "fg_properties": keras_autodoc.get_properties( + "hsfs.feature_group.FeatureGroup" + ), + "fg_methods": keras_autodoc.get_methods("hsfs.feature_group.FeatureGroup"), + }, + "api/external_feature_group_api.md": { + "fg": ["hsfs.feature_group.ExternalFeatureGroup"], + "fg_create": ["hsfs.feature_store.FeatureStore.create_external_feature_group"], + "fg_get": ["hsfs.feature_store.FeatureStore.get_external_feature_group"], + "fg_properties": keras_autodoc.get_properties( + "hsfs.feature_group.ExternalFeatureGroup" + ), + "fg_methods": keras_autodoc.get_methods( + "hsfs.feature_group.ExternalFeatureGroup" + ), + }, + "api/storage_connector_api.md": { + "sc_get": [ + "hsfs.feature_store.FeatureStore.get_storage_connector", + "hsfs.feature_store.FeatureStore.get_online_storage_connector", + ], + "hopsfs_methods": keras_autodoc.get_methods( + "hsfs.storage_connector.HopsFSConnector", exclude=["from_response_json"] + ), + "hopsfs_properties": keras_autodoc.get_properties( + "hsfs.storage_connector.HopsFSConnector" + ), + "s3_methods": keras_autodoc.get_methods( + "hsfs.storage_connector.S3Connector", exclude=["from_response_json"] + ), + "s3_properties": keras_autodoc.get_properties( + "hsfs.storage_connector.S3Connector" + ), + "redshift_methods": keras_autodoc.get_methods( + "hsfs.storage_connector.RedshiftConnector", exclude=["from_response_json"] + ), + "redshift_properties": keras_autodoc.get_properties( + "hsfs.storage_connector.RedshiftConnector" + ), + "adls_methods": keras_autodoc.get_methods( + "hsfs.storage_connector.AdlsConnector", exclude=["from_response_json"] + ), + "adls_properties": keras_autodoc.get_properties( + "hsfs.storage_connector.AdlsConnector" + ), + "snowflake_methods": keras_autodoc.get_methods( + "hsfs.storage_connector.SnowflakeConnector", exclude=["from_response_json"] + ), + "snowflake_properties": keras_autodoc.get_properties( + "hsfs.storage_connector.SnowflakeConnector" + ), + "jdbc_methods": keras_autodoc.get_methods( + "hsfs.storage_connector.JdbcConnector", exclude=["from_response_json"] + ), + "jdbc_properties": keras_autodoc.get_properties( + "hsfs.storage_connector.JdbcConnector" + ), + "gcs_methods": keras_autodoc.get_methods( + "hsfs.storage_connector.GcsConnector", exclude=["from_response_json"] + ), + "gcs_properties": keras_autodoc.get_properties( + "hsfs.storage_connector.GcsConnector" + ), + "bigquery_methods": keras_autodoc.get_methods( + "hsfs.storage_connector.BigQueryConnector", exclude=["from_response_json"] + ), + "bigquery_properties": keras_autodoc.get_properties( + "hsfs.storage_connector.BigQueryConnector" + ), + "kafka_methods": keras_autodoc.get_methods( + "hsfs.storage_connector.KafkaConnector", exclude=["from_response_json"] + ), + "kafka_properties": keras_autodoc.get_properties( + "hsfs.storage_connector.KafkaConnector" + ), + }, + "api/statistics_config_api.md": { + "statistics_config": ["hsfs.statistics_config.StatisticsConfig"], + "statistics_config_properties": keras_autodoc.get_properties( + "hsfs.statistics_config.StatisticsConfig" + ), + }, + "api/transformation_functions_api.md": { + "transformation_function": [ + "hsfs.transformation_function.TransformationFunction" + ], + "transformation_function_properties": keras_autodoc.get_properties( + "hsfs.transformation_function.TransformationFunction" + ), + "transformation_function_methods": keras_autodoc.get_methods( + "hsfs.transformation_function.TransformationFunction", + exclude=[ + "from_response_json", + "update_from_response_json", + "json", + "to_dict", + ], + ), + "create_transformation_function": [ + "hsfs.feature_store.FeatureStore.create_transformation_function" + ], + "get_transformation_function": [ + "hsfs.feature_store.FeatureStore.get_transformation_function" + ], + "get_transformation_functions": [ + "hsfs.feature_store.FeatureStore.get_transformation_functions" + ], + }, + "api/validation_report_api.md": { + "validation_report": ["hsfs.validation_report.ValidationReport"], + "validation_report_validate": [ + "hsfs.feature_group.FeatureGroup.validate", + "hsfs.feature_group.FeatureGroup.insert", + ], + "validation_report_get": [ + "hsfs.feature_group.FeatureGroup.get_latest_validation_report", + "hsfs.feature_group.FeatureGroup.get_all_validation_reports", + ], + "validation_report_properties": keras_autodoc.get_properties( + "hsfs.validation_report.ValidationReport" + ), + "validation_report_methods": keras_autodoc.get_methods( + "hsfs.validation_report.ValidationReport" + ), + }, + "api/job.md": { + "job_configuration": ["hsfs.core.job_configuration.JobConfiguration"], + "job": ["hsfs.core.job.Job"], + "job_methods": [ + "hsfs.core.job.Job.get_state", + "hsfs.core.job.Job.get_final_state", + ], + }, + "api/query_api.md": { + "query_methods": keras_autodoc.get_methods( + "hsfs.constructor.query.Query", + exclude=["json", "to_dict"], + ), + "query_properties": keras_autodoc.get_properties( + "hsfs.constructor.query.Query" + ), + }, + "api/links.md": { + "links_properties": keras_autodoc.get_properties( + "hsfs.core.explicit_provenance.Links" + ), + "artifact_properties": keras_autodoc.get_properties( + "hsfs.core.explicit_provenance.Artifact" + ), + }, + "api/statistics_api.md": { + "statistics": ["hsfs.statistics.Statistics"], + "statistics_properties": keras_autodoc.get_properties( + "hsfs.statistics.Statistics" + ), + }, + "api/split_statistics_api.md": { + "split_statistics": ["hsfs.split_statistics.SplitStatistics"], + "split_statistics_properties": keras_autodoc.get_properties( + "hsfs.split_statistics.SplitStatistics" + ), + }, + "api/feature_descriptive_statistics_api.md": { + "feature_descriptive_statistics": [ + "hsfs.core.feature_descriptive_statistics.FeatureDescriptiveStatistics" + ], + "feature_descriptive_statistics_properties": keras_autodoc.get_properties( + "hsfs.core.feature_descriptive_statistics.FeatureDescriptiveStatistics" + ), + }, + "api/feature_monitoring_config_api.md": { + "feature_monitoring_config": [ + "hsfs.core.feature_monitoring_config.FeatureMonitoringConfig" + ], + "feature_monitoring_config_properties": keras_autodoc.get_properties( + "hsfs.core.feature_monitoring_config.FeatureMonitoringConfig" + ), + "feature_monitoring_config_methods": keras_autodoc.get_methods( + "hsfs.core.feature_monitoring_config.FeatureMonitoringConfig", + exclude=[ + "from_response_json", + "update_from_response_json", + "json", + "to_dict", + ], + ), + # from feature group + "feature_monitoring_config_creation_fg": [ + "hsfs.feature_group.FeatureGroup.create_statistics_monitoring", + "hsfs.feature_group.FeatureGroup.create_feature_monitoring", + ], + # from feature view + "feature_monitoring_config_creation_fv": [ + "hsfs.feature_view.FeatureView.create_statistics_monitoring", + "hsfs.feature_view.FeatureView.create_feature_monitoring", + ], + # retrieval + "feature_monitoring_config_retrieval_fg": [ + "hsfs.feature_group.FeatureGroup.get_feature_monitoring_configs", + ], + "feature_monitoring_config_retrieval_fv": [ + "hsfs.feature_view.FeatureView.get_feature_monitoring_configs", + ], + }, + "api/feature_monitoring_result_api.md": { + "feature_monitoring_result": [ + "hsfs.core.feature_monitoring_result.FeatureMonitoringResult" + ], + "feature_monitoring_result_retrieval": [ + "hsfs.core.feature_monitoring_config.FeatureMonitoringConfig.get_history" + ], + "feature_monitoring_result_properties": keras_autodoc.get_properties( + "hsfs.core.feature_monitoring_result.FeatureMonitoringResult" + ), + }, + "api/feature_monitoring_window_config_api.md": { + "feature_monitoring_window_config": [ + "hsfs.core.monitoring_window_config.MonitoringWindowConfig" + ], + "feature_monitoring_window_config_properties": keras_autodoc.get_properties( + "hsfs.core.monitoring_window_config.MonitoringWindowConfig" + ), + }, + "api/embedding_index_api.md": { + "embedding_index": ["hsfs.embedding.EmbeddingIndex"], + "embedding_index_properties": keras_autodoc.get_properties( + "hsfs.embedding.EmbeddingIndex" + ), + "embedding_index_methods": keras_autodoc.get_methods( + "hsfs.embedding.EmbeddingIndex", exclude=["from_response_json"] + ), + }, + "api/embedding_feature_api.md": { + "embedding_feature": ["hsfs.embedding.EmbeddingFeature"], + "embedding_feature_properties": keras_autodoc.get_properties( + "hsfs.embedding.EmbeddingFeature" + ), + }, + "api/similarity_function_type_api.md": { + "similarity_function_type": ["hsfs.embedding.SimilarityFunctionType"], + }, + # Model registry + "connection_api.md": { + "connection": ["hsml.connection.Connection"], + "connection_properties": keras_autodoc.get_properties( + "hsml.connection.Connection", exclude=["trust_store_path"] + ), + "connection_methods": keras_autodoc.get_methods("hsml.connection.Connection"), + }, + "model-registry/model_registry_api.md": { + "mr_get": ["hsml.connection.Connection.get_model_registry"], + "mr_modules": keras_autodoc.get_properties( + "hsml.model_registry.ModelRegistry", + exclude=[ + "project_id", + "project_name", + "model_registry_id", + "shared_registry_project_name", + ], + ), + "mr_properties": keras_autodoc.get_properties( + "hsml.model_registry.ModelRegistry", + exclude=[ + "python", + "sklearn", + "tensorflow", + "torch", + ], + ), + "mr_methods": keras_autodoc.get_methods( + "hsml.model_registry.ModelRegistry", exclude=["from_response_json"] + ), + }, + "model-registry/model_api.md": { + "ml_create_tf": ["hsml.model_registry.ModelRegistry.tensorflow.create_model"], + "ml_create_th": ["hsml.model_registry.ModelRegistry.torch.create_model"], + "ml_create_sl": ["hsml.model_registry.ModelRegistry.sklearn.create_model"], + "ml_create_py": ["hsml.model_registry.ModelRegistry.python.create_model"], + "ml_get": ["hsml.model_registry.ModelRegistry.get_model"], + "ml_properties": keras_autodoc.get_properties("hsml.model.Model"), + "ml_methods": keras_autodoc.get_methods( + "hsml.model.Model", + exclude=[ + "from_response_json", + "json", + "to_dict", + "update_from_response_json", + ], + ), + }, + "model-registry/model_schema.md": {}, + "model-registry/model_schema_api.md": { + "schema": ["hsml.schema.Schema"], + "schema_dict": ["hsml.schema.Schema.to_dict"], + "model_schema": ["hsml.model_schema.ModelSchema"], + "model_schema_dict": ["hsml.model_schema.ModelSchema.to_dict"], + }, + "model-registry/links.md": { + "links_properties": keras_autodoc.get_properties( + "hsml.core.explicit_provenance.Links" + ), + "artifact_properties": keras_autodoc.get_properties( + "hsml.core.explicit_provenance.Artifact" + ), + }, + # Model Serving + "model-serving/model_serving_api.md": { + "ms_get": ["hsml.connection.Connection.get_model_serving"], + "ms_properties": keras_autodoc.get_properties( + "hsml.model_serving.ModelServing" + ), + "ms_methods": keras_autodoc.get_methods( + "hsml.model_serving.ModelServing", exclude=["from_response_json"] + ), + }, + "model-serving/deployment_api.md": { + "ms_get_model_serving": ["hsml.connection.Connection.get_model_serving"], + "ms_get_deployments": [ + "hsml.model_serving.ModelServing.get_deployment", + "hsml.model_serving.ModelServing.get_deployment_by_id", + "hsml.model_serving.ModelServing.get_deployments", + ], + "ms_create_deployment": ["hsml.model_serving.ModelServing.create_deployment"], + "m_deploy": ["hsml.model.Model.deploy"], + "p_deploy": ["hsml.predictor.Predictor.deploy"], + "dep_properties": keras_autodoc.get_properties("hsml.deployment.Deployment"), + "dep_methods": keras_autodoc.get_methods( + "hsml.deployment.Deployment", exclude=JSON_METHODS + ["from_predictor"] + ), + }, + "model-serving/predictor_api.md": { + "ms_get_model_serving": ["hsml.connection.Connection.get_model_serving"], + "ms_create_predictor": ["hsml.model_serving.ModelServing.create_predictor"], + "pred_properties": keras_autodoc.get_properties("hsml.predictor.Predictor"), + "pred_methods": keras_autodoc.get_methods( + "hsml.predictor.Predictor", + exclude=JSON_METHODS + ["for_model"], + ), + }, + "model-serving/transformer_api.md": { + "ms_get_model_serving": ["hsml.connection.Connection.get_model_serving"], + "ms_create_transformer": ["hsml.model_serving.ModelServing.create_transformer"], + "trans_properties": keras_autodoc.get_properties( + "hsml.transformer.Transformer" + ), + "trans_methods": keras_autodoc.get_methods( + "hsml.transformer.Transformer", exclude=JSON_METHODS + ), + }, + "model-serving/inference_logger_api.md": { + "il": ["hsml.inference_logger.InferenceLogger"], + "il_properties": keras_autodoc.get_properties( + "hsml.inference_logger.InferenceLogger" + ), + "il_methods": keras_autodoc.get_methods( + "hsml.inference_logger.InferenceLogger", exclude=JSON_METHODS + ), + }, + "model-serving/inference_batcher_api.md": { + "ib": ["hsml.inference_batcher.InferenceBatcher"], + "ib_properties": keras_autodoc.get_properties( + "hsml.inference_batcher.InferenceBatcher" + ), + "ib_methods": keras_autodoc.get_methods( + "hsml.inference_batcher.InferenceBatcher", exclude=JSON_METHODS + ), + }, + "model-serving/resources_api.md": { + "res": ["hsml.resources.Resources"], + "res_properties": keras_autodoc.get_properties("hsml.resources.Resources"), + "res_methods": keras_autodoc.get_methods( + "hsml.resources.Resources", exclude=JSON_METHODS + ), + }, + "model-serving/predictor_state_api.md": { + "ps_get": ["hsml.deployment.Deployment.get_state"], + "ps_properties": keras_autodoc.get_properties( + "hsml.predictor_state.PredictorState" + ), + "ps_methods": keras_autodoc.get_methods( + "hsml.predictor_state.PredictorState", exclude=JSON_METHODS + ), + }, + "model-serving/predictor_state_condition_api.md": { + "psc_get": ["hsml.predictor_state.PredictorState.condition"], + "psc_properties": keras_autodoc.get_properties( + "hsml.predictor_state_condition.PredictorStateCondition" + ), + "psc_methods": keras_autodoc.get_methods( + "hsml.predictor_state_condition.PredictorStateCondition", + exclude=JSON_METHODS, + ), + }, +} + +hw_dir = pathlib.Path(__file__).resolve().parents[1] +if "GITHUB_SHA" in os.environ: + commit_sha = os.environ["GITHUB_SHA"] + project_url = ( + f"https://github.com/logicalclocks/hopsworks-api/tree/{commit_sha}/python" + ) +else: + branch_name = os.environ.get("GITHUB_BASE_REF", "master") + project_url = ( + f"https://github.com/logicalclocks/hopsworks-api/blob/{branch_name}/python" + ) + + +def generate(dest_dir): + doc_generator = keras_autodoc.DocumentationGenerator( + PAGES, + project_url=project_url, + template_dir="./docs/templates", + titles_size="###", + extra_aliases={ + "hsfs.core.query.Query": "hsfs.Query", + "hsfs.storage_connector.StorageConnector": "hsfs.StorageConnector", + "hsfs.statistics_config.StatisticsConfig": "hsfs.StatisticsConfig", + "hsfs.training_dataset_feature.TrainingDatasetFeature": "hsfs.TrainingDatasetFeature", + "pandas.core.frame.DataFrame": "pandas.DataFrame", + }, + max_signature_line_length=100, + ) + shutil.copyfile(hw_dir / "CONTRIBUTING.md", dest_dir / "CONTRIBUTING.md") + shutil.copyfile(hw_dir / "README.md", dest_dir / "index.md") + + doc_generator.generate(dest_dir / "generated") + + +if __name__ == "__main__": + generate(hw_dir / "docs") diff --git a/python/hopsworks/project.py b/python/hopsworks/project.py index 294a69435..79ccff369 100644 --- a/python/hopsworks/project.py +++ b/python/hopsworks/project.py @@ -17,6 +17,7 @@ import json +import hsfs.feature_store import humps from hopsworks import client, constants, util from hopsworks.client.external import Client @@ -29,7 +30,6 @@ kafka_api, opensearch_api, ) -from hsfs import feature_store class Project: @@ -103,7 +103,9 @@ def created(self): """Timestamp when the project was created""" return self._created - def get_feature_store(self, name: str = None, engine: str = None) -> feature_store.FeatureStore: + def get_feature_store( + self, name: str = None, engine: str = None + ) -> hsfs.feature_store.FeatureStore: """Connect to Project's Feature Store. Defaulting to the project name of default feature store. To get a @@ -142,7 +144,9 @@ def get_feature_store(self, name: str = None, engine: str = None) -> feature_sto engine=engine, ).get_feature_store(name) else: - return connection(engine=engine).get_feature_store(name) # If internal client + return connection(engine=engine).get_feature_store( + name + ) # If internal client def get_model_registry(self): """Connect to Project's Model Registry API. diff --git a/hsml/python/hsml/client/istio/grpc/__init__.py b/python/hopsworks_common/__init__.py similarity index 100% rename from hsml/python/hsml/client/istio/grpc/__init__.py rename to python/hopsworks_common/__init__.py diff --git a/hsfs/python/hsfs/__init__.py b/python/hsfs/__init__.py similarity index 100% rename from hsfs/python/hsfs/__init__.py rename to python/hsfs/__init__.py diff --git a/hsfs/python/hsfs/builtin_transformations.py b/python/hsfs/builtin_transformations.py similarity index 100% rename from hsfs/python/hsfs/builtin_transformations.py rename to python/hsfs/builtin_transformations.py diff --git a/hsfs/python/hsfs/client/__init__.py b/python/hsfs/client/__init__.py similarity index 100% rename from hsfs/python/hsfs/client/__init__.py rename to python/hsfs/client/__init__.py diff --git a/hsfs/python/hsfs/client/auth.py b/python/hsfs/client/auth.py similarity index 100% rename from hsfs/python/hsfs/client/auth.py rename to python/hsfs/client/auth.py diff --git a/hsfs/python/hsfs/client/base.py b/python/hsfs/client/base.py similarity index 100% rename from hsfs/python/hsfs/client/base.py rename to python/hsfs/client/base.py diff --git a/hsfs/python/hsfs/client/exceptions.py b/python/hsfs/client/exceptions.py similarity index 100% rename from hsfs/python/hsfs/client/exceptions.py rename to python/hsfs/client/exceptions.py diff --git a/hsfs/python/hsfs/client/external.py b/python/hsfs/client/external.py similarity index 100% rename from hsfs/python/hsfs/client/external.py rename to python/hsfs/client/external.py diff --git a/hsfs/python/hsfs/client/hopsworks.py b/python/hsfs/client/hopsworks.py similarity index 100% rename from hsfs/python/hsfs/client/hopsworks.py rename to python/hsfs/client/hopsworks.py diff --git a/hsfs/python/hsfs/client/online_store_rest_client.py b/python/hsfs/client/online_store_rest_client.py similarity index 100% rename from hsfs/python/hsfs/client/online_store_rest_client.py rename to python/hsfs/client/online_store_rest_client.py diff --git a/hsfs/python/hsfs/code.py b/python/hsfs/code.py similarity index 100% rename from hsfs/python/hsfs/code.py rename to python/hsfs/code.py diff --git a/hsfs/python/hsfs/connection.py b/python/hsfs/connection.py similarity index 100% rename from hsfs/python/hsfs/connection.py rename to python/hsfs/connection.py diff --git a/hsfs/python/hsfs/constructor/__init__.py b/python/hsfs/constructor/__init__.py similarity index 100% rename from hsfs/python/hsfs/constructor/__init__.py rename to python/hsfs/constructor/__init__.py diff --git a/hsfs/python/hsfs/constructor/external_feature_group_alias.py b/python/hsfs/constructor/external_feature_group_alias.py similarity index 100% rename from hsfs/python/hsfs/constructor/external_feature_group_alias.py rename to python/hsfs/constructor/external_feature_group_alias.py diff --git a/hsfs/python/hsfs/constructor/filter.py b/python/hsfs/constructor/filter.py similarity index 100% rename from hsfs/python/hsfs/constructor/filter.py rename to python/hsfs/constructor/filter.py diff --git a/hsfs/python/hsfs/constructor/fs_query.py b/python/hsfs/constructor/fs_query.py similarity index 100% rename from hsfs/python/hsfs/constructor/fs_query.py rename to python/hsfs/constructor/fs_query.py diff --git a/hsfs/python/hsfs/constructor/hudi_feature_group_alias.py b/python/hsfs/constructor/hudi_feature_group_alias.py similarity index 100% rename from hsfs/python/hsfs/constructor/hudi_feature_group_alias.py rename to python/hsfs/constructor/hudi_feature_group_alias.py diff --git a/hsfs/python/hsfs/constructor/join.py b/python/hsfs/constructor/join.py similarity index 100% rename from hsfs/python/hsfs/constructor/join.py rename to python/hsfs/constructor/join.py diff --git a/hsfs/python/hsfs/constructor/prepared_statement_parameter.py b/python/hsfs/constructor/prepared_statement_parameter.py similarity index 100% rename from hsfs/python/hsfs/constructor/prepared_statement_parameter.py rename to python/hsfs/constructor/prepared_statement_parameter.py diff --git a/hsfs/python/hsfs/constructor/query.py b/python/hsfs/constructor/query.py similarity index 100% rename from hsfs/python/hsfs/constructor/query.py rename to python/hsfs/constructor/query.py diff --git a/hsfs/python/hsfs/constructor/serving_prepared_statement.py b/python/hsfs/constructor/serving_prepared_statement.py similarity index 100% rename from hsfs/python/hsfs/constructor/serving_prepared_statement.py rename to python/hsfs/constructor/serving_prepared_statement.py diff --git a/hsfs/python/hsfs/core/__init__.py b/python/hsfs/core/__init__.py similarity index 100% rename from hsfs/python/hsfs/core/__init__.py rename to python/hsfs/core/__init__.py diff --git a/hsfs/python/hsfs/core/arrow_flight_client.py b/python/hsfs/core/arrow_flight_client.py similarity index 100% rename from hsfs/python/hsfs/core/arrow_flight_client.py rename to python/hsfs/core/arrow_flight_client.py diff --git a/hsfs/python/hsfs/core/code_api.py b/python/hsfs/core/code_api.py similarity index 100% rename from hsfs/python/hsfs/core/code_api.py rename to python/hsfs/core/code_api.py diff --git a/hsfs/python/hsfs/core/code_engine.py b/python/hsfs/core/code_engine.py similarity index 100% rename from hsfs/python/hsfs/core/code_engine.py rename to python/hsfs/core/code_engine.py diff --git a/hsfs/python/hsfs/core/constants.py b/python/hsfs/core/constants.py similarity index 100% rename from hsfs/python/hsfs/core/constants.py rename to python/hsfs/core/constants.py diff --git a/hsfs/python/hsfs/core/dataset_api.py b/python/hsfs/core/dataset_api.py similarity index 100% rename from hsfs/python/hsfs/core/dataset_api.py rename to python/hsfs/core/dataset_api.py diff --git a/hsfs/python/hsfs/core/delta_engine.py b/python/hsfs/core/delta_engine.py similarity index 100% rename from hsfs/python/hsfs/core/delta_engine.py rename to python/hsfs/core/delta_engine.py diff --git a/hsfs/python/hsfs/core/deltastreamer_jobconf.py b/python/hsfs/core/deltastreamer_jobconf.py similarity index 100% rename from hsfs/python/hsfs/core/deltastreamer_jobconf.py rename to python/hsfs/core/deltastreamer_jobconf.py diff --git a/hsfs/python/hsfs/core/execution.py b/python/hsfs/core/execution.py similarity index 100% rename from hsfs/python/hsfs/core/execution.py rename to python/hsfs/core/execution.py diff --git a/hsfs/python/hsfs/core/expectation_api.py b/python/hsfs/core/expectation_api.py similarity index 100% rename from hsfs/python/hsfs/core/expectation_api.py rename to python/hsfs/core/expectation_api.py diff --git a/hsfs/python/hsfs/core/expectation_engine.py b/python/hsfs/core/expectation_engine.py similarity index 100% rename from hsfs/python/hsfs/core/expectation_engine.py rename to python/hsfs/core/expectation_engine.py diff --git a/hsfs/python/hsfs/core/expectation_suite_api.py b/python/hsfs/core/expectation_suite_api.py similarity index 100% rename from hsfs/python/hsfs/core/expectation_suite_api.py rename to python/hsfs/core/expectation_suite_api.py diff --git a/hsfs/python/hsfs/core/expectation_suite_engine.py b/python/hsfs/core/expectation_suite_engine.py similarity index 100% rename from hsfs/python/hsfs/core/expectation_suite_engine.py rename to python/hsfs/core/expectation_suite_engine.py diff --git a/hsfs/python/hsfs/core/explicit_provenance.py b/python/hsfs/core/explicit_provenance.py similarity index 100% rename from hsfs/python/hsfs/core/explicit_provenance.py rename to python/hsfs/core/explicit_provenance.py diff --git a/hsfs/python/hsfs/core/external_feature_group_engine.py b/python/hsfs/core/external_feature_group_engine.py similarity index 100% rename from hsfs/python/hsfs/core/external_feature_group_engine.py rename to python/hsfs/core/external_feature_group_engine.py diff --git a/hsfs/python/hsfs/core/feature_descriptive_statistics.py b/python/hsfs/core/feature_descriptive_statistics.py similarity index 100% rename from hsfs/python/hsfs/core/feature_descriptive_statistics.py rename to python/hsfs/core/feature_descriptive_statistics.py diff --git a/hsfs/python/hsfs/core/feature_group_api.py b/python/hsfs/core/feature_group_api.py similarity index 100% rename from hsfs/python/hsfs/core/feature_group_api.py rename to python/hsfs/core/feature_group_api.py diff --git a/hsfs/python/hsfs/core/feature_group_base_engine.py b/python/hsfs/core/feature_group_base_engine.py similarity index 100% rename from hsfs/python/hsfs/core/feature_group_base_engine.py rename to python/hsfs/core/feature_group_base_engine.py diff --git a/hsfs/python/hsfs/core/feature_group_engine.py b/python/hsfs/core/feature_group_engine.py similarity index 100% rename from hsfs/python/hsfs/core/feature_group_engine.py rename to python/hsfs/core/feature_group_engine.py diff --git a/hsfs/python/hsfs/core/feature_logging.py b/python/hsfs/core/feature_logging.py similarity index 100% rename from hsfs/python/hsfs/core/feature_logging.py rename to python/hsfs/core/feature_logging.py diff --git a/hsfs/python/hsfs/core/feature_monitoring_config.py b/python/hsfs/core/feature_monitoring_config.py similarity index 100% rename from hsfs/python/hsfs/core/feature_monitoring_config.py rename to python/hsfs/core/feature_monitoring_config.py diff --git a/hsfs/python/hsfs/core/feature_monitoring_config_api.py b/python/hsfs/core/feature_monitoring_config_api.py similarity index 100% rename from hsfs/python/hsfs/core/feature_monitoring_config_api.py rename to python/hsfs/core/feature_monitoring_config_api.py diff --git a/hsfs/python/hsfs/core/feature_monitoring_config_engine.py b/python/hsfs/core/feature_monitoring_config_engine.py similarity index 100% rename from hsfs/python/hsfs/core/feature_monitoring_config_engine.py rename to python/hsfs/core/feature_monitoring_config_engine.py diff --git a/hsfs/python/hsfs/core/feature_monitoring_result.py b/python/hsfs/core/feature_monitoring_result.py similarity index 100% rename from hsfs/python/hsfs/core/feature_monitoring_result.py rename to python/hsfs/core/feature_monitoring_result.py diff --git a/hsfs/python/hsfs/core/feature_monitoring_result_api.py b/python/hsfs/core/feature_monitoring_result_api.py similarity index 100% rename from hsfs/python/hsfs/core/feature_monitoring_result_api.py rename to python/hsfs/core/feature_monitoring_result_api.py diff --git a/hsfs/python/hsfs/core/feature_monitoring_result_engine.py b/python/hsfs/core/feature_monitoring_result_engine.py similarity index 100% rename from hsfs/python/hsfs/core/feature_monitoring_result_engine.py rename to python/hsfs/core/feature_monitoring_result_engine.py diff --git a/hsfs/python/hsfs/core/feature_store_api.py b/python/hsfs/core/feature_store_api.py similarity index 86% rename from hsfs/python/hsfs/core/feature_store_api.py rename to python/hsfs/core/feature_store_api.py index 377a3f934..2b77d6aca 100644 --- a/hsfs/python/hsfs/core/feature_store_api.py +++ b/python/hsfs/core/feature_store_api.py @@ -17,12 +17,12 @@ from typing import Union +import hsfs.feature_store from hsfs import client -from hsfs.feature_store import FeatureStore class FeatureStoreApi: - def get(self, identifier: Union[int, str]) -> FeatureStore: + def get(self, identifier: Union[int, str]) -> hsfs.feature_store.FeatureStore: """Get feature store with specific id or name. :param identifier: id or name of the feature store @@ -32,6 +32,6 @@ def get(self, identifier: Union[int, str]) -> FeatureStore: """ _client = client.get_instance() path_params = ["project", _client._project_id, "featurestores", identifier] - return FeatureStore.from_response_json( + return hsfs.feature_store.FeatureStore.from_response_json( _client._send_request("GET", path_params) ) diff --git a/hsfs/python/hsfs/core/feature_view_api.py b/python/hsfs/core/feature_view_api.py similarity index 100% rename from hsfs/python/hsfs/core/feature_view_api.py rename to python/hsfs/core/feature_view_api.py diff --git a/hsfs/python/hsfs/core/feature_view_engine.py b/python/hsfs/core/feature_view_engine.py similarity index 100% rename from hsfs/python/hsfs/core/feature_view_engine.py rename to python/hsfs/core/feature_view_engine.py diff --git a/hsfs/python/hsfs/core/great_expectation_engine.py b/python/hsfs/core/great_expectation_engine.py similarity index 100% rename from hsfs/python/hsfs/core/great_expectation_engine.py rename to python/hsfs/core/great_expectation_engine.py diff --git a/hsfs/python/hsfs/core/hosts_api.py b/python/hsfs/core/hosts_api.py similarity index 100% rename from hsfs/python/hsfs/core/hosts_api.py rename to python/hsfs/core/hosts_api.py diff --git a/hsfs/python/hsfs/core/hudi_engine.py b/python/hsfs/core/hudi_engine.py similarity index 100% rename from hsfs/python/hsfs/core/hudi_engine.py rename to python/hsfs/core/hudi_engine.py diff --git a/hsfs/python/hsfs/core/ingestion_job.py b/python/hsfs/core/ingestion_job.py similarity index 100% rename from hsfs/python/hsfs/core/ingestion_job.py rename to python/hsfs/core/ingestion_job.py diff --git a/hsfs/python/hsfs/core/ingestion_job_conf.py b/python/hsfs/core/ingestion_job_conf.py similarity index 100% rename from hsfs/python/hsfs/core/ingestion_job_conf.py rename to python/hsfs/core/ingestion_job_conf.py diff --git a/hsfs/python/hsfs/core/inode.py b/python/hsfs/core/inode.py similarity index 100% rename from hsfs/python/hsfs/core/inode.py rename to python/hsfs/core/inode.py diff --git a/hsfs/python/hsfs/core/job.py b/python/hsfs/core/job.py similarity index 100% rename from hsfs/python/hsfs/core/job.py rename to python/hsfs/core/job.py diff --git a/hsfs/python/hsfs/core/job_api.py b/python/hsfs/core/job_api.py similarity index 100% rename from hsfs/python/hsfs/core/job_api.py rename to python/hsfs/core/job_api.py diff --git a/hsfs/python/hsfs/core/job_configuration.py b/python/hsfs/core/job_configuration.py similarity index 100% rename from hsfs/python/hsfs/core/job_configuration.py rename to python/hsfs/core/job_configuration.py diff --git a/hsfs/python/hsfs/core/job_schedule.py b/python/hsfs/core/job_schedule.py similarity index 100% rename from hsfs/python/hsfs/core/job_schedule.py rename to python/hsfs/core/job_schedule.py diff --git a/hsfs/python/hsfs/core/kafka_api.py b/python/hsfs/core/kafka_api.py similarity index 100% rename from hsfs/python/hsfs/core/kafka_api.py rename to python/hsfs/core/kafka_api.py diff --git a/hsfs/python/hsfs/core/kafka_engine.py b/python/hsfs/core/kafka_engine.py similarity index 100% rename from hsfs/python/hsfs/core/kafka_engine.py rename to python/hsfs/core/kafka_engine.py diff --git a/hsfs/python/hsfs/core/monitoring_window_config.py b/python/hsfs/core/monitoring_window_config.py similarity index 100% rename from hsfs/python/hsfs/core/monitoring_window_config.py rename to python/hsfs/core/monitoring_window_config.py diff --git a/hsfs/python/hsfs/core/monitoring_window_config_engine.py b/python/hsfs/core/monitoring_window_config_engine.py similarity index 100% rename from hsfs/python/hsfs/core/monitoring_window_config_engine.py rename to python/hsfs/core/monitoring_window_config_engine.py diff --git a/hsfs/python/hsfs/core/online_store_rest_client_api.py b/python/hsfs/core/online_store_rest_client_api.py similarity index 100% rename from hsfs/python/hsfs/core/online_store_rest_client_api.py rename to python/hsfs/core/online_store_rest_client_api.py diff --git a/hsfs/python/hsfs/core/online_store_rest_client_engine.py b/python/hsfs/core/online_store_rest_client_engine.py similarity index 100% rename from hsfs/python/hsfs/core/online_store_rest_client_engine.py rename to python/hsfs/core/online_store_rest_client_engine.py diff --git a/hsfs/python/hsfs/core/online_store_sql_engine.py b/python/hsfs/core/online_store_sql_engine.py similarity index 100% rename from hsfs/python/hsfs/core/online_store_sql_engine.py rename to python/hsfs/core/online_store_sql_engine.py diff --git a/hsfs/python/hsfs/core/opensearch.py b/python/hsfs/core/opensearch.py similarity index 100% rename from hsfs/python/hsfs/core/opensearch.py rename to python/hsfs/core/opensearch.py diff --git a/hsfs/python/hsfs/core/opensearch_api.py b/python/hsfs/core/opensearch_api.py similarity index 100% rename from hsfs/python/hsfs/core/opensearch_api.py rename to python/hsfs/core/opensearch_api.py diff --git a/hsfs/python/hsfs/core/project_api.py b/python/hsfs/core/project_api.py similarity index 100% rename from hsfs/python/hsfs/core/project_api.py rename to python/hsfs/core/project_api.py diff --git a/hsfs/python/hsfs/core/query_constructor_api.py b/python/hsfs/core/query_constructor_api.py similarity index 100% rename from hsfs/python/hsfs/core/query_constructor_api.py rename to python/hsfs/core/query_constructor_api.py diff --git a/hsfs/python/hsfs/core/services_api.py b/python/hsfs/core/services_api.py similarity index 100% rename from hsfs/python/hsfs/core/services_api.py rename to python/hsfs/core/services_api.py diff --git a/hsfs/python/hsfs/core/spine_group_engine.py b/python/hsfs/core/spine_group_engine.py similarity index 100% rename from hsfs/python/hsfs/core/spine_group_engine.py rename to python/hsfs/core/spine_group_engine.py diff --git a/hsfs/python/hsfs/core/statistics_api.py b/python/hsfs/core/statistics_api.py similarity index 100% rename from hsfs/python/hsfs/core/statistics_api.py rename to python/hsfs/core/statistics_api.py diff --git a/hsfs/python/hsfs/core/statistics_engine.py b/python/hsfs/core/statistics_engine.py similarity index 100% rename from hsfs/python/hsfs/core/statistics_engine.py rename to python/hsfs/core/statistics_engine.py diff --git a/hsfs/python/hsfs/core/storage_connector_api.py b/python/hsfs/core/storage_connector_api.py similarity index 100% rename from hsfs/python/hsfs/core/storage_connector_api.py rename to python/hsfs/core/storage_connector_api.py diff --git a/hsfs/python/hsfs/core/tags_api.py b/python/hsfs/core/tags_api.py similarity index 100% rename from hsfs/python/hsfs/core/tags_api.py rename to python/hsfs/core/tags_api.py diff --git a/hsfs/python/hsfs/core/training_dataset_api.py b/python/hsfs/core/training_dataset_api.py similarity index 100% rename from hsfs/python/hsfs/core/training_dataset_api.py rename to python/hsfs/core/training_dataset_api.py diff --git a/hsfs/python/hsfs/core/training_dataset_engine.py b/python/hsfs/core/training_dataset_engine.py similarity index 100% rename from hsfs/python/hsfs/core/training_dataset_engine.py rename to python/hsfs/core/training_dataset_engine.py diff --git a/hsfs/python/hsfs/core/training_dataset_job_conf.py b/python/hsfs/core/training_dataset_job_conf.py similarity index 100% rename from hsfs/python/hsfs/core/training_dataset_job_conf.py rename to python/hsfs/core/training_dataset_job_conf.py diff --git a/hsfs/python/hsfs/core/transformation_function_api.py b/python/hsfs/core/transformation_function_api.py similarity index 100% rename from hsfs/python/hsfs/core/transformation_function_api.py rename to python/hsfs/core/transformation_function_api.py diff --git a/hsfs/python/hsfs/core/transformation_function_engine.py b/python/hsfs/core/transformation_function_engine.py similarity index 100% rename from hsfs/python/hsfs/core/transformation_function_engine.py rename to python/hsfs/core/transformation_function_engine.py diff --git a/hsfs/python/hsfs/core/util_sql.py b/python/hsfs/core/util_sql.py similarity index 100% rename from hsfs/python/hsfs/core/util_sql.py rename to python/hsfs/core/util_sql.py diff --git a/hsfs/python/hsfs/core/validation_report_api.py b/python/hsfs/core/validation_report_api.py similarity index 100% rename from hsfs/python/hsfs/core/validation_report_api.py rename to python/hsfs/core/validation_report_api.py diff --git a/hsfs/python/hsfs/core/validation_report_engine.py b/python/hsfs/core/validation_report_engine.py similarity index 100% rename from hsfs/python/hsfs/core/validation_report_engine.py rename to python/hsfs/core/validation_report_engine.py diff --git a/hsfs/python/hsfs/core/validation_result_api.py b/python/hsfs/core/validation_result_api.py similarity index 100% rename from hsfs/python/hsfs/core/validation_result_api.py rename to python/hsfs/core/validation_result_api.py diff --git a/hsfs/python/hsfs/core/validation_result_engine.py b/python/hsfs/core/validation_result_engine.py similarity index 100% rename from hsfs/python/hsfs/core/validation_result_engine.py rename to python/hsfs/core/validation_result_engine.py diff --git a/hsfs/python/hsfs/core/variable_api.py b/python/hsfs/core/variable_api.py similarity index 100% rename from hsfs/python/hsfs/core/variable_api.py rename to python/hsfs/core/variable_api.py diff --git a/hsfs/python/hsfs/core/vector_db_client.py b/python/hsfs/core/vector_db_client.py similarity index 100% rename from hsfs/python/hsfs/core/vector_db_client.py rename to python/hsfs/core/vector_db_client.py diff --git a/hsfs/python/hsfs/core/vector_server.py b/python/hsfs/core/vector_server.py similarity index 100% rename from hsfs/python/hsfs/core/vector_server.py rename to python/hsfs/core/vector_server.py diff --git a/hsfs/python/hsfs/decorators.py b/python/hsfs/decorators.py similarity index 100% rename from hsfs/python/hsfs/decorators.py rename to python/hsfs/decorators.py diff --git a/hsfs/python/hsfs/embedding.py b/python/hsfs/embedding.py similarity index 100% rename from hsfs/python/hsfs/embedding.py rename to python/hsfs/embedding.py diff --git a/hsfs/python/hsfs/engine/__init__.py b/python/hsfs/engine/__init__.py similarity index 100% rename from hsfs/python/hsfs/engine/__init__.py rename to python/hsfs/engine/__init__.py diff --git a/hsfs/python/hsfs/engine/python.py b/python/hsfs/engine/python.py similarity index 100% rename from hsfs/python/hsfs/engine/python.py rename to python/hsfs/engine/python.py diff --git a/hsfs/python/hsfs/engine/spark.py b/python/hsfs/engine/spark.py similarity index 100% rename from hsfs/python/hsfs/engine/spark.py rename to python/hsfs/engine/spark.py diff --git a/hsfs/python/hsfs/engine/spark_no_metastore.py b/python/hsfs/engine/spark_no_metastore.py similarity index 100% rename from hsfs/python/hsfs/engine/spark_no_metastore.py rename to python/hsfs/engine/spark_no_metastore.py diff --git a/hsfs/python/hsfs/expectation_suite.py b/python/hsfs/expectation_suite.py similarity index 100% rename from hsfs/python/hsfs/expectation_suite.py rename to python/hsfs/expectation_suite.py diff --git a/hsfs/python/hsfs/feature.py b/python/hsfs/feature.py similarity index 100% rename from hsfs/python/hsfs/feature.py rename to python/hsfs/feature.py diff --git a/hsfs/python/hsfs/feature_group.py b/python/hsfs/feature_group.py similarity index 98% rename from hsfs/python/hsfs/feature_group.py rename to python/hsfs/feature_group.py index bbd92c2f1..409ae6ecd 100644 --- a/hsfs/python/hsfs/feature_group.py +++ b/python/hsfs/feature_group.py @@ -39,6 +39,7 @@ import avro.schema import confluent_kafka +import hsfs.expectation_suite import humps import numpy as np import pandas as pd @@ -89,7 +90,6 @@ # if great_expectations is not installed, we will default to using native Hopsworks class as return values from hsfs.decorators import typechecked, uses_great_expectations from hsfs.embedding import EmbeddingIndex -from hsfs.expectation_suite import ExpectationSuite from hsfs.ge_validation_result import ValidationResult from hsfs.statistics import Statistics from hsfs.statistics_config import StatisticsConfig @@ -117,7 +117,7 @@ def __init__( embedding_index: Optional[EmbeddingIndex] = None, expectation_suite: Optional[ Union[ - ExpectationSuite, + hsfs.expectation_suite.ExpectationSuite, great_expectations.core.ExpectationSuite, Dict[str, Any], ] @@ -911,7 +911,11 @@ def append_features( def get_expectation_suite( self, ge_type: bool = HAS_GREAT_EXPECTATIONS - ) -> Union[ExpectationSuite, great_expectations.core.ExpectationSuite, None]: + ) -> Union[ + hsfs.expectation_suite.ExpectationSuite, + great_expectations.core.ExpectationSuite, + None, + ]: """Return the expectation suite attached to the feature group if it exists. !!! example @@ -949,12 +953,16 @@ def get_expectation_suite( def save_expectation_suite( self, expectation_suite: Union[ - ExpectationSuite, great_expectations.core.ExpectationSuite + hsfs.expectation_suite.ExpectationSuite, + great_expectations.core.ExpectationSuite, ], run_validation: bool = True, validation_ingestion_policy: Literal["always", "strict"] = "always", overwrite: bool = False, - ) -> Union[ExpectationSuite, great_expectations.core.ExpectationSuite]: + ) -> Union[ + hsfs.expectation_suite.ExpectationSuite, + great_expectations.core.ExpectationSuite, + ]: """Attach an expectation suite to a feature group and saves it for future use. If an expectation suite is already attached, it is replaced. Note that the provided expectation suite is modified inplace to include expectationId fields. @@ -985,18 +993,22 @@ def save_expectation_suite( if HAS_GREAT_EXPECTATIONS and isinstance( expectation_suite, great_expectations.core.ExpectationSuite ): - tmp_expectation_suite = ExpectationSuite.from_ge_type( - ge_expectation_suite=expectation_suite, - run_validation=run_validation, - validation_ingestion_policy=validation_ingestion_policy, - feature_store_id=self._feature_store_id, - feature_group_id=self._id, + tmp_expectation_suite = ( + hsfs.expectation_suite.ExpectationSuite.from_ge_type( + ge_expectation_suite=expectation_suite, + run_validation=run_validation, + validation_ingestion_policy=validation_ingestion_policy, + feature_store_id=self._feature_store_id, + feature_group_id=self._id, + ) ) - elif isinstance(expectation_suite, ExpectationSuite): + elif isinstance(expectation_suite, hsfs.expectation_suite.ExpectationSuite): tmp_expectation_suite = expectation_suite.to_json_dict(decamelize=True) tmp_expectation_suite["feature_group_id"] = self._id tmp_expectation_suite["feature_store_id"] = self._feature_store_id - tmp_expectation_suite = ExpectationSuite(**tmp_expectation_suite) + tmp_expectation_suite = hsfs.expectation_suite.ExpectationSuite( + **tmp_expectation_suite + ) else: raise TypeError( "The provided expectation suite type `{}` is not supported. Use Great Expectation `ExpectationSuite` or HSFS' own `ExpectationSuite` object.".format( @@ -1243,7 +1255,7 @@ def validate( dataframe: Optional[ Union[pd.DataFrame, TypeVar("pyspark.sql.DataFrame")] # noqa: F821 ] = None, - expectation_suite: Optional[ExpectationSuite] = None, + expectation_suite: Optional[hsfs.expectation_suite.ExpectationSuite] = None, save_report: Optional[bool] = False, validation_options: Optional[Dict[str, Any]] = None, ingestion_result: Literal[ @@ -1859,7 +1871,7 @@ def location(self) -> Optional[str]: @property def expectation_suite( self, - ) -> Optional[ExpectationSuite]: + ) -> Optional[hsfs.expectation_suite.ExpectationSuite]: """Expectation Suite configuration object defining the settings for data validation of the feature group.""" return self._expectation_suite @@ -1868,22 +1880,24 @@ def expectation_suite( def expectation_suite( self, expectation_suite: Union[ - ExpectationSuite, + hsfs.expectation_suite.ExpectationSuite, great_expectations.core.ExpectationSuite, Dict[str, Any], None, ], ) -> None: - if isinstance(expectation_suite, ExpectationSuite): + if isinstance(expectation_suite, hsfs.expectation_suite.ExpectationSuite): tmp_expectation_suite = expectation_suite.to_json_dict(decamelize=True) tmp_expectation_suite["feature_group_id"] = self._id tmp_expectation_suite["feature_store_id"] = self._feature_store_id - self._expectation_suite = ExpectationSuite(**tmp_expectation_suite) + self._expectation_suite = hsfs.expectation_suite.ExpectationSuite( + **tmp_expectation_suite + ) elif HAS_GREAT_EXPECTATIONS and isinstance( expectation_suite, great_expectations.core.expectation_suite.ExpectationSuite, ): - self._expectation_suite = ExpectationSuite( + self._expectation_suite = hsfs.expectation_suite.ExpectationSuite( **expectation_suite.to_json_dict(), feature_store_id=self._feature_store_id, feature_group_id=self._id, @@ -1892,7 +1906,9 @@ def expectation_suite( tmp_expectation_suite = expectation_suite.copy() tmp_expectation_suite["feature_store_id"] = self._feature_store_id tmp_expectation_suite["feature_group_id"] = self._id - self._expectation_suite = ExpectationSuite(**tmp_expectation_suite) + self._expectation_suite = hsfs.expectation_suite.ExpectationSuite( + **tmp_expectation_suite + ) elif expectation_suite is None: self._expectation_suite = None else: @@ -2077,7 +2093,7 @@ def __init__( expectation_suite: Optional[ Union[ great_expectations.core.ExpectationSuite, - ExpectationSuite, + hsfs.expectation_suite.ExpectationSuite, Dict[str, Any], ] ] = None, @@ -3493,7 +3509,7 @@ def __init__( event_time: Optional[str] = None, expectation_suite: Optional[ Union[ - ExpectationSuite, + hsfs.expectation_suite.ExpectationSuite, great_expectations.core.ExpectationSuite, Dict[str, Any], ] @@ -4033,7 +4049,10 @@ def __init__( statistics_config: Optional[StatisticsConfig] = None, event_time: Optional[str] = None, expectation_suite: Optional[ - Union[ExpectationSuite, great_expectations.core.ExpectationSuite] + Union[ + hsfs.expectation_suite.ExpectationSuite, + great_expectations.core.ExpectationSuite, + ] ] = None, online_enabled: bool = False, href: Optional[str] = None, diff --git a/hsfs/python/hsfs/feature_group_commit.py b/python/hsfs/feature_group_commit.py similarity index 100% rename from hsfs/python/hsfs/feature_group_commit.py rename to python/hsfs/feature_group_commit.py diff --git a/hsfs/python/hsfs/feature_group_writer.py b/python/hsfs/feature_group_writer.py similarity index 100% rename from hsfs/python/hsfs/feature_group_writer.py rename to python/hsfs/feature_group_writer.py diff --git a/hsfs/python/hsfs/feature_store.py b/python/hsfs/feature_store.py similarity index 100% rename from hsfs/python/hsfs/feature_store.py rename to python/hsfs/feature_store.py diff --git a/hsfs/python/hsfs/feature_view.py b/python/hsfs/feature_view.py similarity index 100% rename from hsfs/python/hsfs/feature_view.py rename to python/hsfs/feature_view.py diff --git a/hsfs/python/hsfs/ge_expectation.py b/python/hsfs/ge_expectation.py similarity index 100% rename from hsfs/python/hsfs/ge_expectation.py rename to python/hsfs/ge_expectation.py diff --git a/hsfs/python/hsfs/ge_validation_result.py b/python/hsfs/ge_validation_result.py similarity index 100% rename from hsfs/python/hsfs/ge_validation_result.py rename to python/hsfs/ge_validation_result.py diff --git a/hsfs/python/hsfs/hopsworks_udf.py b/python/hsfs/hopsworks_udf.py similarity index 100% rename from hsfs/python/hsfs/hopsworks_udf.py rename to python/hsfs/hopsworks_udf.py diff --git a/hsfs/python/hsfs/serving_key.py b/python/hsfs/serving_key.py similarity index 100% rename from hsfs/python/hsfs/serving_key.py rename to python/hsfs/serving_key.py diff --git a/hsfs/python/hsfs/split_statistics.py b/python/hsfs/split_statistics.py similarity index 100% rename from hsfs/python/hsfs/split_statistics.py rename to python/hsfs/split_statistics.py diff --git a/hsfs/python/hsfs/statistics.py b/python/hsfs/statistics.py similarity index 100% rename from hsfs/python/hsfs/statistics.py rename to python/hsfs/statistics.py diff --git a/hsfs/python/hsfs/statistics_config.py b/python/hsfs/statistics_config.py similarity index 100% rename from hsfs/python/hsfs/statistics_config.py rename to python/hsfs/statistics_config.py diff --git a/hsfs/python/hsfs/storage_connector.py b/python/hsfs/storage_connector.py similarity index 100% rename from hsfs/python/hsfs/storage_connector.py rename to python/hsfs/storage_connector.py diff --git a/hsfs/python/hsfs/tag.py b/python/hsfs/tag.py similarity index 100% rename from hsfs/python/hsfs/tag.py rename to python/hsfs/tag.py diff --git a/hsfs/python/hsfs/training_dataset.py b/python/hsfs/training_dataset.py similarity index 100% rename from hsfs/python/hsfs/training_dataset.py rename to python/hsfs/training_dataset.py diff --git a/hsfs/python/hsfs/training_dataset_feature.py b/python/hsfs/training_dataset_feature.py similarity index 100% rename from hsfs/python/hsfs/training_dataset_feature.py rename to python/hsfs/training_dataset_feature.py diff --git a/hsfs/python/hsfs/training_dataset_split.py b/python/hsfs/training_dataset_split.py similarity index 100% rename from hsfs/python/hsfs/training_dataset_split.py rename to python/hsfs/training_dataset_split.py diff --git a/hsfs/python/hsfs/transformation_function.py b/python/hsfs/transformation_function.py similarity index 100% rename from hsfs/python/hsfs/transformation_function.py rename to python/hsfs/transformation_function.py diff --git a/hsfs/python/hsfs/transformation_statistics.py b/python/hsfs/transformation_statistics.py similarity index 100% rename from hsfs/python/hsfs/transformation_statistics.py rename to python/hsfs/transformation_statistics.py diff --git a/hsfs/python/hsfs/usage.py b/python/hsfs/usage.py similarity index 100% rename from hsfs/python/hsfs/usage.py rename to python/hsfs/usage.py diff --git a/hsfs/python/hsfs/user.py b/python/hsfs/user.py similarity index 100% rename from hsfs/python/hsfs/user.py rename to python/hsfs/user.py diff --git a/hsfs/python/hsfs/util.py b/python/hsfs/util.py similarity index 100% rename from hsfs/python/hsfs/util.py rename to python/hsfs/util.py diff --git a/hsfs/python/hsfs/validation_report.py b/python/hsfs/validation_report.py similarity index 100% rename from hsfs/python/hsfs/validation_report.py rename to python/hsfs/validation_report.py diff --git a/hsfs/python/hsfs/version.py b/python/hsfs/version.py similarity index 100% rename from hsfs/python/hsfs/version.py rename to python/hsfs/version.py diff --git a/hsml/python/hsml/__init__.py b/python/hsml/__init__.py similarity index 100% rename from hsml/python/hsml/__init__.py rename to python/hsml/__init__.py diff --git a/hsml/python/hsml/client/__init__.py b/python/hsml/client/__init__.py similarity index 97% rename from hsml/python/hsml/client/__init__.py rename to python/hsml/client/__init__.py index 3982f0c56..b3475258c 100644 --- a/hsml/python/hsml/client/__init__.py +++ b/python/hsml/client/__init__.py @@ -20,7 +20,7 @@ from hsml.client.istio import base as ist_base from hsml.client.istio import external as ist_external from hsml.client.istio import internal as ist_internal -from hsml.connection import CONNECTION_SAAS_HOSTNAME +from hsml.constants import CONNECTION _client_type = None @@ -49,7 +49,7 @@ def init( _client_type = client_type global _saas_connection - _saas_connection = host == CONNECTION_SAAS_HOSTNAME + _saas_connection = host == CONNECTION.SAAS_HOSTNAME global _hopsworks_client if not _hopsworks_client: diff --git a/hsml/python/hsml/client/auth.py b/python/hsml/client/auth.py similarity index 100% rename from hsml/python/hsml/client/auth.py rename to python/hsml/client/auth.py diff --git a/hsml/python/hsml/client/base.py b/python/hsml/client/base.py similarity index 100% rename from hsml/python/hsml/client/base.py rename to python/hsml/client/base.py diff --git a/hsml/python/hsml/client/exceptions.py b/python/hsml/client/exceptions.py similarity index 100% rename from hsml/python/hsml/client/exceptions.py rename to python/hsml/client/exceptions.py diff --git a/hsml/python/hsml/client/hopsworks/__init__.py b/python/hsml/client/hopsworks/__init__.py similarity index 100% rename from hsml/python/hsml/client/hopsworks/__init__.py rename to python/hsml/client/hopsworks/__init__.py diff --git a/hsml/python/hsml/client/hopsworks/base.py b/python/hsml/client/hopsworks/base.py similarity index 100% rename from hsml/python/hsml/client/hopsworks/base.py rename to python/hsml/client/hopsworks/base.py diff --git a/hsml/python/hsml/client/hopsworks/external.py b/python/hsml/client/hopsworks/external.py similarity index 100% rename from hsml/python/hsml/client/hopsworks/external.py rename to python/hsml/client/hopsworks/external.py diff --git a/hsml/python/hsml/client/hopsworks/internal.py b/python/hsml/client/hopsworks/internal.py similarity index 100% rename from hsml/python/hsml/client/hopsworks/internal.py rename to python/hsml/client/hopsworks/internal.py diff --git a/hsml/python/hsml/client/istio/__init__.py b/python/hsml/client/istio/__init__.py similarity index 100% rename from hsml/python/hsml/client/istio/__init__.py rename to python/hsml/client/istio/__init__.py diff --git a/hsml/python/hsml/client/istio/base.py b/python/hsml/client/istio/base.py similarity index 100% rename from hsml/python/hsml/client/istio/base.py rename to python/hsml/client/istio/base.py diff --git a/hsml/python/hsml/client/istio/external.py b/python/hsml/client/istio/external.py similarity index 100% rename from hsml/python/hsml/client/istio/external.py rename to python/hsml/client/istio/external.py diff --git a/hsml/python/hsml/client/istio/grpc/proto/__init__.py b/python/hsml/client/istio/grpc/__init__.py similarity index 100% rename from hsml/python/hsml/client/istio/grpc/proto/__init__.py rename to python/hsml/client/istio/grpc/__init__.py diff --git a/hsml/python/hsml/client/istio/grpc/errors.py b/python/hsml/client/istio/grpc/errors.py similarity index 100% rename from hsml/python/hsml/client/istio/grpc/errors.py rename to python/hsml/client/istio/grpc/errors.py diff --git a/hsml/python/hsml/client/istio/grpc/exceptions.py b/python/hsml/client/istio/grpc/exceptions.py similarity index 100% rename from hsml/python/hsml/client/istio/grpc/exceptions.py rename to python/hsml/client/istio/grpc/exceptions.py diff --git a/hsml/python/hsml/client/istio/grpc/inference_client.py b/python/hsml/client/istio/grpc/inference_client.py similarity index 100% rename from hsml/python/hsml/client/istio/grpc/inference_client.py rename to python/hsml/client/istio/grpc/inference_client.py diff --git a/hsml/python/hsml/client/istio/utils/__init__.py b/python/hsml/client/istio/grpc/proto/__init__.py similarity index 100% rename from hsml/python/hsml/client/istio/utils/__init__.py rename to python/hsml/client/istio/grpc/proto/__init__.py diff --git a/hsml/python/hsml/client/istio/grpc/proto/grpc_predict_v2.proto b/python/hsml/client/istio/grpc/proto/grpc_predict_v2.proto similarity index 100% rename from hsml/python/hsml/client/istio/grpc/proto/grpc_predict_v2.proto rename to python/hsml/client/istio/grpc/proto/grpc_predict_v2.proto diff --git a/hsml/python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2.py b/python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2.py similarity index 100% rename from hsml/python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2.py rename to python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2.py diff --git a/hsml/python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2.pyi b/python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2.pyi similarity index 100% rename from hsml/python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2.pyi rename to python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2.pyi diff --git a/hsml/python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2_grpc.py b/python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2_grpc.py similarity index 100% rename from hsml/python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2_grpc.py rename to python/hsml/client/istio/grpc/proto/grpc_predict_v2_pb2_grpc.py diff --git a/hsml/python/hsml/client/istio/internal.py b/python/hsml/client/istio/internal.py similarity index 100% rename from hsml/python/hsml/client/istio/internal.py rename to python/hsml/client/istio/internal.py diff --git a/hsml/python/tests/fixtures/__init__.py b/python/hsml/client/istio/utils/__init__.py similarity index 100% rename from hsml/python/tests/fixtures/__init__.py rename to python/hsml/client/istio/utils/__init__.py diff --git a/hsml/python/hsml/client/istio/utils/infer_type.py b/python/hsml/client/istio/utils/infer_type.py similarity index 100% rename from hsml/python/hsml/client/istio/utils/infer_type.py rename to python/hsml/client/istio/utils/infer_type.py diff --git a/hsml/python/hsml/client/istio/utils/numpy_codec.py b/python/hsml/client/istio/utils/numpy_codec.py similarity index 100% rename from hsml/python/hsml/client/istio/utils/numpy_codec.py rename to python/hsml/client/istio/utils/numpy_codec.py diff --git a/hsml/python/hsml/connection.py b/python/hsml/connection.py similarity index 98% rename from hsml/python/hsml/connection.py rename to python/hsml/connection.py index d9d61b9e8..899589a4e 100644 --- a/hsml/python/hsml/connection.py +++ b/python/hsml/connection.py @@ -16,14 +16,10 @@ import os -from hsml import client -from hsml.core import model_api, model_registry_api, model_serving_api from hsml.decorators import connected, not_connected from requests.exceptions import ConnectionError -CONNECTION_SAAS_HOSTNAME = "c.app.hopsworks.ai" - HOPSWORKS_PORT_DEFAULT = 443 HOSTNAME_VERIFICATION_DEFAULT = True @@ -100,6 +96,7 @@ def __init__( api_key_file: str = None, api_key_value: str = None, ): + from hsml.core import model_api, model_registry_api, model_serving_api self._host = host self._port = port self._project = project @@ -164,6 +161,8 @@ def connect(self): conn.connect() ``` """ + from hsml import client + from hsml.core import model_api self._connected = True try: # init client @@ -196,6 +195,7 @@ def close(self): Usage is recommended but optional. """ + from hsml import client client.stop() self._model_api = None self._connected = False diff --git a/hsml/python/hsml/constants.py b/python/hsml/constants.py similarity index 97% rename from hsml/python/hsml/constants.py rename to python/hsml/constants.py index 6ec99ff3c..d7af16967 100644 --- a/hsml/python/hsml/constants.py +++ b/python/hsml/constants.py @@ -18,6 +18,10 @@ DEFAULT = dict() # used as default parameter for a class object +class CONNECTION: + SAAS_HOSTNAME = "c.app.hopsworks.ai" + + class MODEL: FRAMEWORK_TENSORFLOW = "TENSORFLOW" FRAMEWORK_TORCH = "TORCH" diff --git a/hsml/python/hsml/core/__init__.py b/python/hsml/core/__init__.py similarity index 100% rename from hsml/python/hsml/core/__init__.py rename to python/hsml/core/__init__.py diff --git a/hsml/python/hsml/core/dataset_api.py b/python/hsml/core/dataset_api.py similarity index 100% rename from hsml/python/hsml/core/dataset_api.py rename to python/hsml/core/dataset_api.py diff --git a/hsml/python/hsml/core/explicit_provenance.py b/python/hsml/core/explicit_provenance.py similarity index 100% rename from hsml/python/hsml/core/explicit_provenance.py rename to python/hsml/core/explicit_provenance.py diff --git a/hsml/python/hsml/core/model_api.py b/python/hsml/core/model_api.py similarity index 100% rename from hsml/python/hsml/core/model_api.py rename to python/hsml/core/model_api.py diff --git a/hsml/python/hsml/core/model_registry_api.py b/python/hsml/core/model_registry_api.py similarity index 100% rename from hsml/python/hsml/core/model_registry_api.py rename to python/hsml/core/model_registry_api.py diff --git a/hsml/python/hsml/core/model_serving_api.py b/python/hsml/core/model_serving_api.py similarity index 100% rename from hsml/python/hsml/core/model_serving_api.py rename to python/hsml/core/model_serving_api.py diff --git a/hsml/python/hsml/core/native_hdfs_api.py b/python/hsml/core/native_hdfs_api.py similarity index 100% rename from hsml/python/hsml/core/native_hdfs_api.py rename to python/hsml/core/native_hdfs_api.py diff --git a/hsml/python/hsml/core/serving_api.py b/python/hsml/core/serving_api.py similarity index 100% rename from hsml/python/hsml/core/serving_api.py rename to python/hsml/core/serving_api.py diff --git a/hsml/python/hsml/decorators.py b/python/hsml/decorators.py similarity index 100% rename from hsml/python/hsml/decorators.py rename to python/hsml/decorators.py diff --git a/hsml/python/hsml/deployable_component.py b/python/hsml/deployable_component.py similarity index 100% rename from hsml/python/hsml/deployable_component.py rename to python/hsml/deployable_component.py diff --git a/hsml/python/hsml/deployable_component_logs.py b/python/hsml/deployable_component_logs.py similarity index 100% rename from hsml/python/hsml/deployable_component_logs.py rename to python/hsml/deployable_component_logs.py diff --git a/hsml/python/hsml/deployment.py b/python/hsml/deployment.py similarity index 100% rename from hsml/python/hsml/deployment.py rename to python/hsml/deployment.py diff --git a/hsml/python/hsml/engine/__init__.py b/python/hsml/engine/__init__.py similarity index 100% rename from hsml/python/hsml/engine/__init__.py rename to python/hsml/engine/__init__.py diff --git a/hsml/python/hsml/engine/hopsworks_engine.py b/python/hsml/engine/hopsworks_engine.py similarity index 100% rename from hsml/python/hsml/engine/hopsworks_engine.py rename to python/hsml/engine/hopsworks_engine.py diff --git a/hsml/python/hsml/engine/local_engine.py b/python/hsml/engine/local_engine.py similarity index 100% rename from hsml/python/hsml/engine/local_engine.py rename to python/hsml/engine/local_engine.py diff --git a/hsml/python/hsml/engine/model_engine.py b/python/hsml/engine/model_engine.py similarity index 100% rename from hsml/python/hsml/engine/model_engine.py rename to python/hsml/engine/model_engine.py diff --git a/hsml/python/hsml/engine/serving_engine.py b/python/hsml/engine/serving_engine.py similarity index 100% rename from hsml/python/hsml/engine/serving_engine.py rename to python/hsml/engine/serving_engine.py diff --git a/hsml/python/hsml/inference_batcher.py b/python/hsml/inference_batcher.py similarity index 100% rename from hsml/python/hsml/inference_batcher.py rename to python/hsml/inference_batcher.py diff --git a/hsml/python/hsml/inference_endpoint.py b/python/hsml/inference_endpoint.py similarity index 100% rename from hsml/python/hsml/inference_endpoint.py rename to python/hsml/inference_endpoint.py diff --git a/hsml/python/hsml/inference_logger.py b/python/hsml/inference_logger.py similarity index 100% rename from hsml/python/hsml/inference_logger.py rename to python/hsml/inference_logger.py diff --git a/hsml/python/hsml/kafka_topic.py b/python/hsml/kafka_topic.py similarity index 100% rename from hsml/python/hsml/kafka_topic.py rename to python/hsml/kafka_topic.py diff --git a/hsml/python/hsml/model.py b/python/hsml/model.py similarity index 100% rename from hsml/python/hsml/model.py rename to python/hsml/model.py diff --git a/hsml/python/hsml/model_registry.py b/python/hsml/model_registry.py similarity index 100% rename from hsml/python/hsml/model_registry.py rename to python/hsml/model_registry.py diff --git a/hsml/python/hsml/model_schema.py b/python/hsml/model_schema.py similarity index 100% rename from hsml/python/hsml/model_schema.py rename to python/hsml/model_schema.py diff --git a/hsml/python/hsml/model_serving.py b/python/hsml/model_serving.py similarity index 100% rename from hsml/python/hsml/model_serving.py rename to python/hsml/model_serving.py diff --git a/hsml/python/hsml/predictor.py b/python/hsml/predictor.py similarity index 100% rename from hsml/python/hsml/predictor.py rename to python/hsml/predictor.py diff --git a/hsml/python/hsml/predictor_state.py b/python/hsml/predictor_state.py similarity index 100% rename from hsml/python/hsml/predictor_state.py rename to python/hsml/predictor_state.py diff --git a/hsml/python/hsml/predictor_state_condition.py b/python/hsml/predictor_state_condition.py similarity index 100% rename from hsml/python/hsml/predictor_state_condition.py rename to python/hsml/predictor_state_condition.py diff --git a/hsml/python/hsml/python/__init__.py b/python/hsml/python/__init__.py similarity index 100% rename from hsml/python/hsml/python/__init__.py rename to python/hsml/python/__init__.py diff --git a/hsml/python/hsml/python/model.py b/python/hsml/python/model.py similarity index 100% rename from hsml/python/hsml/python/model.py rename to python/hsml/python/model.py diff --git a/hsml/python/hsml/python/predictor.py b/python/hsml/python/predictor.py similarity index 100% rename from hsml/python/hsml/python/predictor.py rename to python/hsml/python/predictor.py diff --git a/hsml/python/hsml/python/signature.py b/python/hsml/python/signature.py similarity index 100% rename from hsml/python/hsml/python/signature.py rename to python/hsml/python/signature.py diff --git a/hsml/python/hsml/resources.py b/python/hsml/resources.py similarity index 100% rename from hsml/python/hsml/resources.py rename to python/hsml/resources.py diff --git a/hsml/python/hsml/schema.py b/python/hsml/schema.py similarity index 100% rename from hsml/python/hsml/schema.py rename to python/hsml/schema.py diff --git a/hsml/python/hsml/sklearn/__init__.py b/python/hsml/sklearn/__init__.py similarity index 100% rename from hsml/python/hsml/sklearn/__init__.py rename to python/hsml/sklearn/__init__.py diff --git a/hsml/python/hsml/sklearn/model.py b/python/hsml/sklearn/model.py similarity index 100% rename from hsml/python/hsml/sklearn/model.py rename to python/hsml/sklearn/model.py diff --git a/hsml/python/hsml/sklearn/predictor.py b/python/hsml/sklearn/predictor.py similarity index 100% rename from hsml/python/hsml/sklearn/predictor.py rename to python/hsml/sklearn/predictor.py diff --git a/hsml/python/hsml/sklearn/signature.py b/python/hsml/sklearn/signature.py similarity index 100% rename from hsml/python/hsml/sklearn/signature.py rename to python/hsml/sklearn/signature.py diff --git a/hsml/python/hsml/tag.py b/python/hsml/tag.py similarity index 100% rename from hsml/python/hsml/tag.py rename to python/hsml/tag.py diff --git a/hsml/python/hsml/tensorflow/__init__.py b/python/hsml/tensorflow/__init__.py similarity index 100% rename from hsml/python/hsml/tensorflow/__init__.py rename to python/hsml/tensorflow/__init__.py diff --git a/hsml/python/hsml/tensorflow/model.py b/python/hsml/tensorflow/model.py similarity index 100% rename from hsml/python/hsml/tensorflow/model.py rename to python/hsml/tensorflow/model.py diff --git a/hsml/python/hsml/tensorflow/predictor.py b/python/hsml/tensorflow/predictor.py similarity index 100% rename from hsml/python/hsml/tensorflow/predictor.py rename to python/hsml/tensorflow/predictor.py diff --git a/hsml/python/hsml/tensorflow/signature.py b/python/hsml/tensorflow/signature.py similarity index 100% rename from hsml/python/hsml/tensorflow/signature.py rename to python/hsml/tensorflow/signature.py diff --git a/hsml/python/hsml/torch/__init__.py b/python/hsml/torch/__init__.py similarity index 100% rename from hsml/python/hsml/torch/__init__.py rename to python/hsml/torch/__init__.py diff --git a/hsml/python/hsml/torch/model.py b/python/hsml/torch/model.py similarity index 100% rename from hsml/python/hsml/torch/model.py rename to python/hsml/torch/model.py diff --git a/hsml/python/hsml/torch/predictor.py b/python/hsml/torch/predictor.py similarity index 100% rename from hsml/python/hsml/torch/predictor.py rename to python/hsml/torch/predictor.py diff --git a/hsml/python/hsml/torch/signature.py b/python/hsml/torch/signature.py similarity index 100% rename from hsml/python/hsml/torch/signature.py rename to python/hsml/torch/signature.py diff --git a/hsml/python/hsml/transformer.py b/python/hsml/transformer.py similarity index 100% rename from hsml/python/hsml/transformer.py rename to python/hsml/transformer.py diff --git a/hsml/python/hsml/util.py b/python/hsml/util.py similarity index 90% rename from hsml/python/hsml/util.py rename to python/hsml/util.py index 96380b6f4..6ef6d9053 100644 --- a/hsml/python/hsml/util.py +++ b/python/hsml/util.py @@ -28,16 +28,6 @@ import pandas as pd from hsml import client from hsml.constants import DEFAULT, MODEL, PREDICTOR -from hsml.model import Model as BaseModel -from hsml.predictor import Predictor as BasePredictor -from hsml.python.model import Model as PyModel -from hsml.python.predictor import Predictor as PyPredictor -from hsml.sklearn.model import Model as SkLearnModel -from hsml.sklearn.predictor import Predictor as SkLearnPredictor -from hsml.tensorflow.model import Model as TFModel -from hsml.tensorflow.predictor import Predictor as TFPredictor -from hsml.torch.model import Model as TorchModel -from hsml.torch.predictor import Predictor as TorchPredictor from six import string_types @@ -105,6 +95,11 @@ def default(self, obj): # pylint: disable=E0202 def set_model_class(model): + from hsml.model import Model as BaseModel + from hsml.python.model import Model as PyModel + from hsml.sklearn.model import Model as SkLearnModel + from hsml.tensorflow.model import Model as TFModel + from hsml.torch.model import Model as TorchModel if "href" in model: _ = model.pop("href") if "type" in model: # backwards compatibility @@ -236,6 +231,16 @@ def validate_metrics(metrics): def get_predictor_for_model(model, **kwargs): + from hsml.model import Model as BaseModel + from hsml.predictor import Predictor as BasePredictor + from hsml.python.model import Model as PyModel + from hsml.python.predictor import Predictor as PyPredictor + from hsml.sklearn.model import Model as SkLearnModel + from hsml.sklearn.predictor import Predictor as SkLearnPredictor + from hsml.tensorflow.model import Model as TFModel + from hsml.tensorflow.predictor import Predictor as TFPredictor + from hsml.torch.model import Model as TorchModel + from hsml.torch.predictor import Predictor as TorchPredictor if not isinstance(model, BaseModel): raise ValueError( "model is of type {}, but an instance of {} class is expected".format( @@ -243,15 +248,15 @@ def get_predictor_for_model(model, **kwargs): ) ) - if type(model) == TFModel: + if type(model) is TFModel: return TFPredictor(**kwargs) - if type(model) == TorchModel: + if type(model) is TorchModel: return TorchPredictor(**kwargs) - if type(model) == SkLearnModel: + if type(model) is SkLearnModel: return SkLearnPredictor(**kwargs) - if type(model) == PyModel: + if type(model) is PyModel: return PyPredictor(**kwargs) - if type(model) == BaseModel: + if type(model) is BaseModel: return BasePredictor( # python as default framework and model server model_framework=MODEL.FRAMEWORK_PYTHON, model_server=PREDICTOR.MODEL_SERVER_PYTHON, diff --git a/hsml/python/hsml/utils/__init__.py b/python/hsml/utils/__init__.py similarity index 100% rename from hsml/python/hsml/utils/__init__.py rename to python/hsml/utils/__init__.py diff --git a/hsml/python/hsml/utils/schema/__init__.py b/python/hsml/utils/schema/__init__.py similarity index 100% rename from hsml/python/hsml/utils/schema/__init__.py rename to python/hsml/utils/schema/__init__.py diff --git a/hsml/python/hsml/utils/schema/column.py b/python/hsml/utils/schema/column.py similarity index 100% rename from hsml/python/hsml/utils/schema/column.py rename to python/hsml/utils/schema/column.py diff --git a/hsml/python/hsml/utils/schema/columnar_schema.py b/python/hsml/utils/schema/columnar_schema.py similarity index 100% rename from hsml/python/hsml/utils/schema/columnar_schema.py rename to python/hsml/utils/schema/columnar_schema.py diff --git a/hsml/python/hsml/utils/schema/tensor.py b/python/hsml/utils/schema/tensor.py similarity index 100% rename from hsml/python/hsml/utils/schema/tensor.py rename to python/hsml/utils/schema/tensor.py diff --git a/hsml/python/hsml/utils/schema/tensor_schema.py b/python/hsml/utils/schema/tensor_schema.py similarity index 100% rename from hsml/python/hsml/utils/schema/tensor_schema.py rename to python/hsml/utils/schema/tensor_schema.py diff --git a/hsml/python/hsml/version.py b/python/hsml/version.py similarity index 100% rename from hsml/python/hsml/version.py rename to python/hsml/version.py diff --git a/python/pyproject.toml b/python/pyproject.toml index 4333adc8b..e3970c466 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,10 +4,25 @@ dynamic = ["version"] requires-python = ">=3.8,<3.13" readme = "README.md" description = "Hopsworks Python SDK to interact with Hopsworks Platform, Feature Store, Model Registry and Model Serving" -keywords = ["Hopsworks", "Feature Store", "Spark", "Machine Learning", "MLOps", "DataOps"] - +keywords = [ + "Hopsworks", + "Feature Store", + "hsfs", + "Spark", + "Machine Learning", + "MLOps", + "DataOps", + "Model Registry", + "hsml", + "Models", + "ML", + "Machine Learning Models", + "TensorFlow", + "PyTorch", +] authors = [{ name = "Hopsworks AB", email = "robin@hopsworks.ai" }] license = { text = "Apache-2.0" } + classifiers = [ "Development Status :: 5 - Production/Stable", "Topic :: Utilities", @@ -22,19 +37,56 @@ classifiers = [ ] dependencies = [ - "hsfs[python] @ git+https://git@github.com/logicalclocks/feature-store-api@master#subdirectory=python", - "hsml @ git+https://git@github.com/logicalclocks/machine-learning-api@main#subdirectory=python", "pyhumps==1.6.1", "requests", "furl", "boto3", + "pandas<2.2.0", + "numpy<2", "pyjks", "mock", + "avro==1.11.3", + "sqlalchemy", + "PyMySQL[rsa]", + "tzlocal", + "fsspec", + "retrying", + "hopsworks_aiomysql[sa]==0.2.1", + "polars>=0.20.18,<=0.21.0", + "opensearch-py>=1.1.0,<=2.4.2", "tqdm", + "grpcio>=1.49.1,<2.0.0", # ^1.49.1 + "protobuf>=3.19.0,<4.0.0", # ^3.19.0 ] [project.optional-dependencies] -dev = [ "ruff", "pytest"] +python = [ + "pyarrow>=10.0", + "confluent-kafka<=2.3.0", + "fastavro>=1.4.11,<=1.8.4", + "tqdm", +] +great-expectations = ["great_expectations==0.18.12"] +dev-no-opt = [ + "hopsworks[python]", + "pytest==7.4.4", + "pytest-mock==3.12.0", + "ruff", + "pyspark==3.1.1", + "moto[s3]==5.0.0", + "typeguard==4.2.1", +] +dev-pandas1 = [ + "hopsworks[python]", + "pytest==7.4.4", + "pytest-mock==3.12.0", + "ruff", + "pyspark==3.1.1", + "moto[s3]==5.0.0", + "pandas<=1.5.3", + "sqlalchemy<=1.4.48", +] +dev = ["hopsworks[dev-no-opt,great-expectations]"] [build-system] requires = ["setuptools", "wheel"] @@ -42,12 +94,11 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] exclude = ["tests*"] -include = ["../Readme.md", "../LICENSE", "hopsworks", "hopsworks.*"] +include = ["../README.md", "../LICENSE", "hopsworks*", "hsfs*", "hsml*", "hopsworks_common*"] [tool.setuptools.dynamic] version = { attr = "hopsworks.version.__version__" } - [project.urls] Documentation = "https://docs.hopsworks.ai/latest" Repository = "https://github.com/logicalclocks/hopsworks-api" @@ -115,7 +166,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" [tool.ruff.lint.isort] lines-after-imports = 2 -known-third-party = ["hopsworks", "hsfs", "hsml"] +known-third-party = ["hopsworks", "hsfs", "hsml", "hopsworks_common"] [tool.ruff.format] diff --git a/hsfs/python/tests/client/test_base_client.py b/python/tests/client/test_base_client.py similarity index 99% rename from hsfs/python/tests/client/test_base_client.py rename to python/tests/client/test_base_client.py index b90b3b6f1..7717f6bbe 100644 --- a/hsfs/python/tests/client/test_base_client.py +++ b/python/tests/client/test_base_client.py @@ -20,6 +20,7 @@ import requests from hsfs.client.base import Client from hsfs.client.exceptions import RestAPIError + from tests.util import changes_environ diff --git a/hsfs/python/tests/conftest.py b/python/tests/conftest.py similarity index 93% rename from hsfs/python/tests/conftest.py rename to python/tests/conftest.py index 5d20f6318..52132b0bb 100644 --- a/hsfs/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -1,5 +1,5 @@ # -# Copyright 2022 Hopsworks AB +# Copyright 2024 Hopsworks AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ pytest_plugins = [ "tests.fixtures.backend_fixtures", + "tests.fixtures.model_fixtures", "tests.fixtures.dataframe_fixtures", ] diff --git a/hsfs/python/tests/constructor/test_external_feature_group_alias.py b/python/tests/constructor/test_external_feature_group_alias.py similarity index 100% rename from hsfs/python/tests/constructor/test_external_feature_group_alias.py rename to python/tests/constructor/test_external_feature_group_alias.py diff --git a/hsfs/python/tests/constructor/test_filter.py b/python/tests/constructor/test_filter.py similarity index 100% rename from hsfs/python/tests/constructor/test_filter.py rename to python/tests/constructor/test_filter.py diff --git a/hsfs/python/tests/constructor/test_fs_query.py b/python/tests/constructor/test_fs_query.py similarity index 100% rename from hsfs/python/tests/constructor/test_fs_query.py rename to python/tests/constructor/test_fs_query.py diff --git a/hsfs/python/tests/constructor/test_hudi_feature_group_alias.py b/python/tests/constructor/test_hudi_feature_group_alias.py similarity index 100% rename from hsfs/python/tests/constructor/test_hudi_feature_group_alias.py rename to python/tests/constructor/test_hudi_feature_group_alias.py diff --git a/hsfs/python/tests/constructor/test_join.py b/python/tests/constructor/test_join.py similarity index 100% rename from hsfs/python/tests/constructor/test_join.py rename to python/tests/constructor/test_join.py diff --git a/hsfs/python/tests/constructor/test_prepared_statement_parameter.py b/python/tests/constructor/test_prepared_statement_parameter.py similarity index 100% rename from hsfs/python/tests/constructor/test_prepared_statement_parameter.py rename to python/tests/constructor/test_prepared_statement_parameter.py diff --git a/hsfs/python/tests/constructor/test_query.py b/python/tests/constructor/test_query.py similarity index 100% rename from hsfs/python/tests/constructor/test_query.py rename to python/tests/constructor/test_query.py diff --git a/hsfs/python/tests/constructor/test_serving_prepared_statement.py b/python/tests/constructor/test_serving_prepared_statement.py similarity index 100% rename from hsfs/python/tests/constructor/test_serving_prepared_statement.py rename to python/tests/constructor/test_serving_prepared_statement.py diff --git a/hsfs/python/tests/core/__init__.py b/python/tests/core/__init__.py similarity index 100% rename from hsfs/python/tests/core/__init__.py rename to python/tests/core/__init__.py diff --git a/hsfs/python/tests/core/test_arrow_flight_client.py b/python/tests/core/test_arrow_flight_client.py similarity index 100% rename from hsfs/python/tests/core/test_arrow_flight_client.py rename to python/tests/core/test_arrow_flight_client.py diff --git a/hsfs/python/tests/core/test_code_engine.py b/python/tests/core/test_code_engine.py similarity index 100% rename from hsfs/python/tests/core/test_code_engine.py rename to python/tests/core/test_code_engine.py diff --git a/hsfs/python/tests/core/test_execution.py b/python/tests/core/test_execution.py similarity index 100% rename from hsfs/python/tests/core/test_execution.py rename to python/tests/core/test_execution.py diff --git a/hsfs/python/tests/core/test_expectation_engine.py b/python/tests/core/test_expectation_engine.py similarity index 100% rename from hsfs/python/tests/core/test_expectation_engine.py rename to python/tests/core/test_expectation_engine.py diff --git a/hsfs/python/tests/core/test_expectation_suite_engine.py b/python/tests/core/test_expectation_suite_engine.py similarity index 100% rename from hsfs/python/tests/core/test_expectation_suite_engine.py rename to python/tests/core/test_expectation_suite_engine.py diff --git a/hsfs/python/tests/core/test_external_feature_group_engine.py b/python/tests/core/test_external_feature_group_engine.py similarity index 100% rename from hsfs/python/tests/core/test_external_feature_group_engine.py rename to python/tests/core/test_external_feature_group_engine.py diff --git a/hsfs/python/tests/core/test_feature_descriptive_statistics.py b/python/tests/core/test_feature_descriptive_statistics.py similarity index 100% rename from hsfs/python/tests/core/test_feature_descriptive_statistics.py rename to python/tests/core/test_feature_descriptive_statistics.py diff --git a/hsfs/python/tests/core/test_feature_group_api.py b/python/tests/core/test_feature_group_api.py similarity index 100% rename from hsfs/python/tests/core/test_feature_group_api.py rename to python/tests/core/test_feature_group_api.py diff --git a/hsfs/python/tests/core/test_feature_group_base_engine.py b/python/tests/core/test_feature_group_base_engine.py similarity index 100% rename from hsfs/python/tests/core/test_feature_group_base_engine.py rename to python/tests/core/test_feature_group_base_engine.py diff --git a/hsfs/python/tests/core/test_feature_group_engine.py b/python/tests/core/test_feature_group_engine.py similarity index 100% rename from hsfs/python/tests/core/test_feature_group_engine.py rename to python/tests/core/test_feature_group_engine.py diff --git a/hsfs/python/tests/core/test_feature_monitoring_config.py b/python/tests/core/test_feature_monitoring_config.py similarity index 100% rename from hsfs/python/tests/core/test_feature_monitoring_config.py rename to python/tests/core/test_feature_monitoring_config.py diff --git a/hsfs/python/tests/core/test_feature_monitoring_config_engine.py b/python/tests/core/test_feature_monitoring_config_engine.py similarity index 100% rename from hsfs/python/tests/core/test_feature_monitoring_config_engine.py rename to python/tests/core/test_feature_monitoring_config_engine.py diff --git a/hsfs/python/tests/core/test_feature_monitoring_result.py b/python/tests/core/test_feature_monitoring_result.py similarity index 100% rename from hsfs/python/tests/core/test_feature_monitoring_result.py rename to python/tests/core/test_feature_monitoring_result.py diff --git a/hsfs/python/tests/core/test_feature_monitoring_result_engine.py b/python/tests/core/test_feature_monitoring_result_engine.py similarity index 100% rename from hsfs/python/tests/core/test_feature_monitoring_result_engine.py rename to python/tests/core/test_feature_monitoring_result_engine.py diff --git a/hsfs/python/tests/core/test_feature_view_engine.py b/python/tests/core/test_feature_view_engine.py similarity index 100% rename from hsfs/python/tests/core/test_feature_view_engine.py rename to python/tests/core/test_feature_view_engine.py diff --git a/hsfs/python/tests/core/test_great_expectation_engine.py b/python/tests/core/test_great_expectation_engine.py similarity index 100% rename from hsfs/python/tests/core/test_great_expectation_engine.py rename to python/tests/core/test_great_expectation_engine.py diff --git a/hsfs/python/tests/core/test_hudi_engine.py b/python/tests/core/test_hudi_engine.py similarity index 100% rename from hsfs/python/tests/core/test_hudi_engine.py rename to python/tests/core/test_hudi_engine.py diff --git a/hsfs/python/tests/core/test_ingestion_job.py b/python/tests/core/test_ingestion_job.py similarity index 100% rename from hsfs/python/tests/core/test_ingestion_job.py rename to python/tests/core/test_ingestion_job.py diff --git a/hsfs/python/tests/core/test_inode.py b/python/tests/core/test_inode.py similarity index 100% rename from hsfs/python/tests/core/test_inode.py rename to python/tests/core/test_inode.py diff --git a/hsfs/python/tests/core/test_job.py b/python/tests/core/test_job.py similarity index 100% rename from hsfs/python/tests/core/test_job.py rename to python/tests/core/test_job.py diff --git a/hsfs/python/tests/core/test_job_configuration.py b/python/tests/core/test_job_configuration.py similarity index 100% rename from hsfs/python/tests/core/test_job_configuration.py rename to python/tests/core/test_job_configuration.py diff --git a/hsfs/python/tests/core/test_kafka_engine.py b/python/tests/core/test_kafka_engine.py similarity index 100% rename from hsfs/python/tests/core/test_kafka_engine.py rename to python/tests/core/test_kafka_engine.py diff --git a/hsfs/python/tests/core/test_monitoring_window_config.py b/python/tests/core/test_monitoring_window_config.py similarity index 100% rename from hsfs/python/tests/core/test_monitoring_window_config.py rename to python/tests/core/test_monitoring_window_config.py diff --git a/hsfs/python/tests/core/test_monitoring_window_config_engine.py b/python/tests/core/test_monitoring_window_config_engine.py similarity index 100% rename from hsfs/python/tests/core/test_monitoring_window_config_engine.py rename to python/tests/core/test_monitoring_window_config_engine.py diff --git a/hsfs/python/tests/core/test_online_store_rest_client.py b/python/tests/core/test_online_store_rest_client.py similarity index 100% rename from hsfs/python/tests/core/test_online_store_rest_client.py rename to python/tests/core/test_online_store_rest_client.py diff --git a/hsfs/python/tests/core/test_online_store_rest_client_api.py b/python/tests/core/test_online_store_rest_client_api.py similarity index 100% rename from hsfs/python/tests/core/test_online_store_rest_client_api.py rename to python/tests/core/test_online_store_rest_client_api.py diff --git a/hsfs/python/tests/core/test_online_store_rest_client_engine.py b/python/tests/core/test_online_store_rest_client_engine.py similarity index 100% rename from hsfs/python/tests/core/test_online_store_rest_client_engine.py rename to python/tests/core/test_online_store_rest_client_engine.py diff --git a/hsfs/python/tests/core/test_opensearch.py b/python/tests/core/test_opensearch.py similarity index 100% rename from hsfs/python/tests/core/test_opensearch.py rename to python/tests/core/test_opensearch.py diff --git a/hsfs/python/tests/core/test_statistics_engine.py b/python/tests/core/test_statistics_engine.py similarity index 100% rename from hsfs/python/tests/core/test_statistics_engine.py rename to python/tests/core/test_statistics_engine.py diff --git a/hsfs/python/tests/core/test_training_dataset_engine.py b/python/tests/core/test_training_dataset_engine.py similarity index 100% rename from hsfs/python/tests/core/test_training_dataset_engine.py rename to python/tests/core/test_training_dataset_engine.py diff --git a/hsfs/python/tests/core/test_transformation_function_engine.py b/python/tests/core/test_transformation_function_engine.py similarity index 100% rename from hsfs/python/tests/core/test_transformation_function_engine.py rename to python/tests/core/test_transformation_function_engine.py diff --git a/hsfs/python/tests/core/test_validation_report_engine.py b/python/tests/core/test_validation_report_engine.py similarity index 100% rename from hsfs/python/tests/core/test_validation_report_engine.py rename to python/tests/core/test_validation_report_engine.py diff --git a/hsfs/python/tests/core/test_validation_result_engine.py b/python/tests/core/test_validation_result_engine.py similarity index 100% rename from hsfs/python/tests/core/test_validation_result_engine.py rename to python/tests/core/test_validation_result_engine.py diff --git a/hsfs/python/tests/core/test_vector_db_client.py b/python/tests/core/test_vector_db_client.py similarity index 100% rename from hsfs/python/tests/core/test_vector_db_client.py rename to python/tests/core/test_vector_db_client.py diff --git a/hsfs/python/tests/data/hadoop/bin/winutils.exe b/python/tests/data/hadoop/bin/winutils.exe similarity index 100% rename from hsfs/python/tests/data/hadoop/bin/winutils.exe rename to python/tests/data/hadoop/bin/winutils.exe diff --git a/hsfs/python/tests/data/test_basic.csv b/python/tests/data/test_basic.csv similarity index 100% rename from hsfs/python/tests/data/test_basic.csv rename to python/tests/data/test_basic.csv diff --git a/hsfs/python/tests/data/test_basic.parquet b/python/tests/data/test_basic.parquet similarity index 100% rename from hsfs/python/tests/data/test_basic.parquet rename to python/tests/data/test_basic.parquet diff --git a/hsfs/python/tests/data/test_basic.tsv b/python/tests/data/test_basic.tsv similarity index 100% rename from hsfs/python/tests/data/test_basic.tsv rename to python/tests/data/test_basic.tsv diff --git a/hsfs/python/tests/engine/__init__.py b/python/tests/engine/__init__.py similarity index 100% rename from hsfs/python/tests/engine/__init__.py rename to python/tests/engine/__init__.py diff --git a/hsfs/python/tests/engine/test_python.py b/python/tests/engine/test_python.py similarity index 100% rename from hsfs/python/tests/engine/test_python.py rename to python/tests/engine/test_python.py diff --git a/hsfs/python/tests/engine/test_python_reader.py b/python/tests/engine/test_python_reader.py similarity index 100% rename from hsfs/python/tests/engine/test_python_reader.py rename to python/tests/engine/test_python_reader.py diff --git a/hsfs/python/tests/engine/test_python_spark_convert_dataframe.py b/python/tests/engine/test_python_spark_convert_dataframe.py similarity index 100% rename from hsfs/python/tests/engine/test_python_spark_convert_dataframe.py rename to python/tests/engine/test_python_spark_convert_dataframe.py diff --git a/hsfs/python/tests/engine/test_python_spark_transformation_functions.py b/python/tests/engine/test_python_spark_transformation_functions.py similarity index 100% rename from hsfs/python/tests/engine/test_python_spark_transformation_functions.py rename to python/tests/engine/test_python_spark_transformation_functions.py diff --git a/hsfs/python/tests/engine/test_python_writer.py b/python/tests/engine/test_python_writer.py similarity index 100% rename from hsfs/python/tests/engine/test_python_writer.py rename to python/tests/engine/test_python_writer.py diff --git a/hsfs/python/tests/engine/test_spark.py b/python/tests/engine/test_spark.py similarity index 100% rename from hsfs/python/tests/engine/test_spark.py rename to python/tests/engine/test_spark.py diff --git a/hsml/python/tests/utils/__init__.py b/python/tests/fixtures/__init__.py similarity index 100% rename from hsml/python/tests/utils/__init__.py rename to python/tests/fixtures/__init__.py diff --git a/hsfs/python/tests/fixtures/backend_fixtures.py b/python/tests/fixtures/backend_fixtures.py similarity index 87% rename from hsfs/python/tests/fixtures/backend_fixtures.py rename to python/tests/fixtures/backend_fixtures.py index 5a7029172..dd455b699 100644 --- a/hsfs/python/tests/fixtures/backend_fixtures.py +++ b/python/tests/fixtures/backend_fixtures.py @@ -1,5 +1,5 @@ # -# Copyright 2022 Hopsworks AB +# Copyright 2024 Hopsworks AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,6 +14,7 @@ # limitations under the License. # +import copy import json import os @@ -25,12 +26,12 @@ FIXTURES = [ "execution", "expectation_suite", - "external_feature_group_alias", "external_feature_group", + "external_feature_group_alias", "feature", "feature_descriptive_statistics", - "feature_group_commit", "feature_group", + "feature_group_commit", "feature_monitoring_config", "feature_monitoring_result", "feature_store", @@ -40,28 +41,36 @@ "ge_expectation", "ge_validation_result", "hudi_feature_group_alias", + "inference_batcher", + "inference_endpoint", + "inference_logger", "ingestion_job", "inode", "job", "join", + "kafka_topic", "logic", + "model", + "predictor", "prepared_statement_parameter", "query", + "resources", + "rondb_server", + "serving_keys", "serving_prepared_statement", + "spine_group", "split_statistics", - "statistics_config", "statistics", + "statistics_config", "storage_connector", "tag", - "training_dataset_feature", "training_dataset", + "training_dataset_feature", "training_dataset_split", "transformation_function", + "transformer", "user", "validation_report", - "serving_keys", - "rondb_server", - "spine_group", ] backend_fixtures_json = {} @@ -72,4 +81,4 @@ @pytest.fixture def backend_fixtures(): - return backend_fixtures_json + return copy.deepcopy(backend_fixtures_json) diff --git a/hsfs/python/tests/fixtures/dataframe_fixtures.py b/python/tests/fixtures/dataframe_fixtures.py similarity index 100% rename from hsfs/python/tests/fixtures/dataframe_fixtures.py rename to python/tests/fixtures/dataframe_fixtures.py diff --git a/hsfs/python/tests/fixtures/execution_fixtures.json b/python/tests/fixtures/execution_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/execution_fixtures.json rename to python/tests/fixtures/execution_fixtures.json diff --git a/hsfs/python/tests/fixtures/expectation_suite_fixtures.json b/python/tests/fixtures/expectation_suite_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/expectation_suite_fixtures.json rename to python/tests/fixtures/expectation_suite_fixtures.json diff --git a/hsfs/python/tests/fixtures/external_feature_group_alias_fixtures.json b/python/tests/fixtures/external_feature_group_alias_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/external_feature_group_alias_fixtures.json rename to python/tests/fixtures/external_feature_group_alias_fixtures.json diff --git a/hsfs/python/tests/fixtures/external_feature_group_fixtures.json b/python/tests/fixtures/external_feature_group_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/external_feature_group_fixtures.json rename to python/tests/fixtures/external_feature_group_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_descriptive_statistics_fixtures.json b/python/tests/fixtures/feature_descriptive_statistics_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_descriptive_statistics_fixtures.json rename to python/tests/fixtures/feature_descriptive_statistics_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_fixtures.json b/python/tests/fixtures/feature_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_fixtures.json rename to python/tests/fixtures/feature_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_group_commit_fixtures.json b/python/tests/fixtures/feature_group_commit_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_group_commit_fixtures.json rename to python/tests/fixtures/feature_group_commit_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_group_fixtures.json b/python/tests/fixtures/feature_group_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_group_fixtures.json rename to python/tests/fixtures/feature_group_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_monitoring_config_fixtures.json b/python/tests/fixtures/feature_monitoring_config_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_monitoring_config_fixtures.json rename to python/tests/fixtures/feature_monitoring_config_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_monitoring_result_fixtures.json b/python/tests/fixtures/feature_monitoring_result_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_monitoring_result_fixtures.json rename to python/tests/fixtures/feature_monitoring_result_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_store_fixtures.json b/python/tests/fixtures/feature_store_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_store_fixtures.json rename to python/tests/fixtures/feature_store_fixtures.json diff --git a/hsfs/python/tests/fixtures/feature_view_fixtures.json b/python/tests/fixtures/feature_view_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/feature_view_fixtures.json rename to python/tests/fixtures/feature_view_fixtures.json diff --git a/hsfs/python/tests/fixtures/filter_fixtures.json b/python/tests/fixtures/filter_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/filter_fixtures.json rename to python/tests/fixtures/filter_fixtures.json diff --git a/hsfs/python/tests/fixtures/fs_query_fixtures.json b/python/tests/fixtures/fs_query_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/fs_query_fixtures.json rename to python/tests/fixtures/fs_query_fixtures.json diff --git a/hsfs/python/tests/fixtures/ge_expectation_fixtures.json b/python/tests/fixtures/ge_expectation_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/ge_expectation_fixtures.json rename to python/tests/fixtures/ge_expectation_fixtures.json diff --git a/hsfs/python/tests/fixtures/ge_validation_result_fixtures.json b/python/tests/fixtures/ge_validation_result_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/ge_validation_result_fixtures.json rename to python/tests/fixtures/ge_validation_result_fixtures.json diff --git a/hsfs/python/tests/fixtures/generate_backend_fixtures.ipynb b/python/tests/fixtures/generate_backend_fixtures.ipynb similarity index 100% rename from hsfs/python/tests/fixtures/generate_backend_fixtures.ipynb rename to python/tests/fixtures/generate_backend_fixtures.ipynb diff --git a/hsfs/python/tests/fixtures/hudi_feature_group_alias_fixtures.json b/python/tests/fixtures/hudi_feature_group_alias_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/hudi_feature_group_alias_fixtures.json rename to python/tests/fixtures/hudi_feature_group_alias_fixtures.json diff --git a/hsml/python/tests/fixtures/inference_batcher_fixtures.json b/python/tests/fixtures/inference_batcher_fixtures.json similarity index 100% rename from hsml/python/tests/fixtures/inference_batcher_fixtures.json rename to python/tests/fixtures/inference_batcher_fixtures.json diff --git a/hsml/python/tests/fixtures/inference_endpoint_fixtures.json b/python/tests/fixtures/inference_endpoint_fixtures.json similarity index 100% rename from hsml/python/tests/fixtures/inference_endpoint_fixtures.json rename to python/tests/fixtures/inference_endpoint_fixtures.json diff --git a/hsml/python/tests/fixtures/inference_logger_fixtures.json b/python/tests/fixtures/inference_logger_fixtures.json similarity index 100% rename from hsml/python/tests/fixtures/inference_logger_fixtures.json rename to python/tests/fixtures/inference_logger_fixtures.json diff --git a/hsfs/python/tests/fixtures/ingestion_job_fixtures.json b/python/tests/fixtures/ingestion_job_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/ingestion_job_fixtures.json rename to python/tests/fixtures/ingestion_job_fixtures.json diff --git a/hsfs/python/tests/fixtures/inode_fixtures.json b/python/tests/fixtures/inode_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/inode_fixtures.json rename to python/tests/fixtures/inode_fixtures.json diff --git a/hsfs/python/tests/fixtures/job_fixtures.json b/python/tests/fixtures/job_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/job_fixtures.json rename to python/tests/fixtures/job_fixtures.json diff --git a/hsfs/python/tests/fixtures/join_fixtures.json b/python/tests/fixtures/join_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/join_fixtures.json rename to python/tests/fixtures/join_fixtures.json diff --git a/hsml/python/tests/fixtures/kafka_topic_fixtures.json b/python/tests/fixtures/kafka_topic_fixtures.json similarity index 100% rename from hsml/python/tests/fixtures/kafka_topic_fixtures.json rename to python/tests/fixtures/kafka_topic_fixtures.json diff --git a/hsfs/python/tests/fixtures/logic_fixtures.json b/python/tests/fixtures/logic_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/logic_fixtures.json rename to python/tests/fixtures/logic_fixtures.json diff --git a/hsml/python/tests/fixtures/model_fixtures.json b/python/tests/fixtures/model_fixtures.json similarity index 100% rename from hsml/python/tests/fixtures/model_fixtures.json rename to python/tests/fixtures/model_fixtures.json diff --git a/hsml/python/tests/fixtures/model_fixtures.py b/python/tests/fixtures/model_fixtures.py similarity index 100% rename from hsml/python/tests/fixtures/model_fixtures.py rename to python/tests/fixtures/model_fixtures.py diff --git a/hsml/python/tests/fixtures/predictor_fixtures.json b/python/tests/fixtures/predictor_fixtures.json similarity index 100% rename from hsml/python/tests/fixtures/predictor_fixtures.json rename to python/tests/fixtures/predictor_fixtures.json diff --git a/hsfs/python/tests/fixtures/prepared_statement_parameter_fixtures.json b/python/tests/fixtures/prepared_statement_parameter_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/prepared_statement_parameter_fixtures.json rename to python/tests/fixtures/prepared_statement_parameter_fixtures.json diff --git a/hsfs/python/tests/fixtures/query_fixtures.json b/python/tests/fixtures/query_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/query_fixtures.json rename to python/tests/fixtures/query_fixtures.json diff --git a/hsml/python/tests/fixtures/resources_fixtures.json b/python/tests/fixtures/resources_fixtures.json similarity index 100% rename from hsml/python/tests/fixtures/resources_fixtures.json rename to python/tests/fixtures/resources_fixtures.json diff --git a/hsfs/python/tests/fixtures/rondb_server_fixtures.json b/python/tests/fixtures/rondb_server_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/rondb_server_fixtures.json rename to python/tests/fixtures/rondb_server_fixtures.json diff --git a/hsfs/python/tests/fixtures/serving_keys_fixtures.json b/python/tests/fixtures/serving_keys_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/serving_keys_fixtures.json rename to python/tests/fixtures/serving_keys_fixtures.json diff --git a/hsfs/python/tests/fixtures/serving_prepared_statement_fixtures.json b/python/tests/fixtures/serving_prepared_statement_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/serving_prepared_statement_fixtures.json rename to python/tests/fixtures/serving_prepared_statement_fixtures.json diff --git a/hsfs/python/tests/fixtures/spine_group_fixtures.json b/python/tests/fixtures/spine_group_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/spine_group_fixtures.json rename to python/tests/fixtures/spine_group_fixtures.json diff --git a/hsfs/python/tests/fixtures/split_statistics_fixtures.json b/python/tests/fixtures/split_statistics_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/split_statistics_fixtures.json rename to python/tests/fixtures/split_statistics_fixtures.json diff --git a/hsfs/python/tests/fixtures/statistics_config_fixtures.json b/python/tests/fixtures/statistics_config_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/statistics_config_fixtures.json rename to python/tests/fixtures/statistics_config_fixtures.json diff --git a/hsfs/python/tests/fixtures/statistics_fixtures.json b/python/tests/fixtures/statistics_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/statistics_fixtures.json rename to python/tests/fixtures/statistics_fixtures.json diff --git a/hsfs/python/tests/fixtures/storage_connector_fixtures.json b/python/tests/fixtures/storage_connector_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/storage_connector_fixtures.json rename to python/tests/fixtures/storage_connector_fixtures.json diff --git a/hsml/python/tests/fixtures/tag_fixtures.json b/python/tests/fixtures/tag_fixtures.json similarity index 100% rename from hsml/python/tests/fixtures/tag_fixtures.json rename to python/tests/fixtures/tag_fixtures.json diff --git a/hsfs/python/tests/fixtures/training_dataset_feature_fixtures.json b/python/tests/fixtures/training_dataset_feature_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/training_dataset_feature_fixtures.json rename to python/tests/fixtures/training_dataset_feature_fixtures.json diff --git a/hsfs/python/tests/fixtures/training_dataset_fixtures.json b/python/tests/fixtures/training_dataset_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/training_dataset_fixtures.json rename to python/tests/fixtures/training_dataset_fixtures.json diff --git a/hsfs/python/tests/fixtures/training_dataset_split_fixtures.json b/python/tests/fixtures/training_dataset_split_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/training_dataset_split_fixtures.json rename to python/tests/fixtures/training_dataset_split_fixtures.json diff --git a/hsfs/python/tests/fixtures/transformation_function_attached_fixtures.json b/python/tests/fixtures/transformation_function_attached_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/transformation_function_attached_fixtures.json rename to python/tests/fixtures/transformation_function_attached_fixtures.json diff --git a/hsfs/python/tests/fixtures/transformation_function_fixtures.json b/python/tests/fixtures/transformation_function_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/transformation_function_fixtures.json rename to python/tests/fixtures/transformation_function_fixtures.json diff --git a/hsml/python/tests/fixtures/transformer_fixtures.json b/python/tests/fixtures/transformer_fixtures.json similarity index 100% rename from hsml/python/tests/fixtures/transformer_fixtures.json rename to python/tests/fixtures/transformer_fixtures.json diff --git a/hsfs/python/tests/fixtures/user_fixtures.json b/python/tests/fixtures/user_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/user_fixtures.json rename to python/tests/fixtures/user_fixtures.json diff --git a/hsfs/python/tests/fixtures/validation_report_fixtures.json b/python/tests/fixtures/validation_report_fixtures.json similarity index 100% rename from hsfs/python/tests/fixtures/validation_report_fixtures.json rename to python/tests/fixtures/validation_report_fixtures.json diff --git a/python/tests/hopsworks/test_login.py b/python/tests/hopsworks/test_login.py index bec4ba729..34d5c1787 100644 --- a/python/tests/hopsworks/test_login.py +++ b/python/tests/hopsworks/test_login.py @@ -13,15 +13,17 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from unittest import TestCase, mock -from contextlib import contextmanager -import hopsworks import getpass -import os -import uuid -import tempfile import importlib +import os import shutil +import tempfile +import uuid +from contextlib import contextmanager +from datetime import date +from unittest import TestCase, mock, skipIf + +import hopsworks from hopsworks.client import exceptions from hopsworks.project import Project @@ -63,7 +65,6 @@ def tearDown(self): hopsworks.logout() def _check_api_key_existence(self): - path = hopsworks._get_cached_api_key_path() api_key_name = ".hw_api_key" @@ -87,6 +88,7 @@ def _check_api_key_existence(self): path == temp_api_key_path, ) + @skipIf(date.today() <= date(2024, 7, 22), "Robin is on vacation.") def test_login_api_key_as_input(self): # Should accept api key as input from command line @@ -106,6 +108,7 @@ def test_login_api_key_as_input(self): assert in_home is True and os.path.exists(path) assert in_tmp is False + @skipIf(date.today() <= date(2024, 7, 22), "Robin is on vacation.") def test_login_api_key_as_argument(self): # Should accept api key as argument path, in_cwd, in_home, in_tmp = self._check_api_key_existence() @@ -123,6 +126,7 @@ def test_login_api_key_as_argument(self): assert in_home is True and not os.path.exists(path) assert in_tmp is False + @skipIf(date.today() <= date(2024, 7, 22), "Robin is on vacation.") def test_login_cmd_input_incorrect(self): # Should fail to login with incorrect API key @@ -136,6 +140,7 @@ def test_login_cmd_input_incorrect(self): with input({"hidden": "incorrect_api_key"}): hopsworks.login() + @skipIf(date.today() <= date(2024, 7, 22), "Robin is on vacation.") def test_login_fallback_to_tmp(self): # Should fall back to storing api key in tmp folder if home is not write and executable for user os.chmod(self.home_dir, 0o400) @@ -155,6 +160,7 @@ def test_login_fallback_to_tmp(self): assert in_home is False assert in_tmp is True and os.path.exists(path) + @skipIf(date.today() <= date(2024, 7, 22), "Robin is on vacation.") def test_login_use_cwd_api_key(self): # Should use API key in cwd if exists @@ -177,6 +183,7 @@ def test_login_use_cwd_api_key(self): assert in_home is False assert in_tmp is False + @skipIf(date.today() <= date(2024, 7, 22), "Robin is on vacation.") def test_login_use_home_api_key(self): # Should use API key in home if exists @@ -202,6 +209,7 @@ def test_login_use_home_api_key(self): assert in_home is True and os.path.exists(path) assert in_tmp is False + @skipIf(date.today() <= date(2024, 7, 22), "Robin is on vacation.") def test_login_api_key_as_environ(self): # Should accept api key as environmet variable try: @@ -226,6 +234,7 @@ def test_login_api_key_as_environ(self): finally: del os.environ["HOPSWORKS_API_KEY"] + @skipIf(date.today() <= date(2024, 7, 22), "Robin is on vacation.") def test_login_newline_in_api_key(self): try: imaginaryApiKey = "ImaginaryApiKey\n" diff --git a/hsml/python/tests/test_connection.py b/python/tests/test_connection.py similarity index 98% rename from hsml/python/tests/test_connection.py rename to python/tests/test_connection.py index c8d100279..5ca15536a 100644 --- a/hsml/python/tests/test_connection.py +++ b/python/tests/test_connection.py @@ -15,11 +15,11 @@ # from hsml.connection import ( - CONNECTION_SAAS_HOSTNAME, HOPSWORKS_PORT_DEFAULT, HOSTNAME_VERIFICATION_DEFAULT, Connection, ) +from hsml.constants import CONNECTION from hsml.core import model_api, model_registry_api, model_serving_api @@ -30,7 +30,7 @@ def test_constants(self): # The purpose of this test is to ensure that (1) we don't make undesired changes to contant values # that might break things somewhere else, and (2) we remember to update the pytests accordingly by # adding / removing / updating tests, if necessary. - assert CONNECTION_SAAS_HOSTNAME == "c.app.hopsworks.ai" + assert CONNECTION.SAAS_HOSTNAME == "c.app.hopsworks.ai" assert HOPSWORKS_PORT_DEFAULT == 443 assert HOSTNAME_VERIFICATION_DEFAULT diff --git a/hsml/python/tests/test_constants.py b/python/tests/test_constants.py similarity index 100% rename from hsml/python/tests/test_constants.py rename to python/tests/test_constants.py diff --git a/hsml/python/tests/test_decorators.py b/python/tests/test_decorators.py similarity index 100% rename from hsml/python/tests/test_decorators.py rename to python/tests/test_decorators.py diff --git a/hsml/python/tests/test_deployable_component.py b/python/tests/test_deployable_component.py similarity index 100% rename from hsml/python/tests/test_deployable_component.py rename to python/tests/test_deployable_component.py diff --git a/hsml/python/tests/test_deployable_component_logs.py b/python/tests/test_deployable_component_logs.py similarity index 100% rename from hsml/python/tests/test_deployable_component_logs.py rename to python/tests/test_deployable_component_logs.py diff --git a/hsml/python/tests/test_deployment.py b/python/tests/test_deployment.py similarity index 100% rename from hsml/python/tests/test_deployment.py rename to python/tests/test_deployment.py diff --git a/hsfs/python/tests/test_expectation_suite.py b/python/tests/test_expectation_suite.py similarity index 100% rename from hsfs/python/tests/test_expectation_suite.py rename to python/tests/test_expectation_suite.py diff --git a/hsml/python/tests/test_explicit_provenance.py b/python/tests/test_explicit_provenance.py similarity index 100% rename from hsml/python/tests/test_explicit_provenance.py rename to python/tests/test_explicit_provenance.py diff --git a/hsfs/python/tests/test_feature.py b/python/tests/test_feature.py similarity index 100% rename from hsfs/python/tests/test_feature.py rename to python/tests/test_feature.py diff --git a/hsfs/python/tests/test_feature_group.py b/python/tests/test_feature_group.py similarity index 100% rename from hsfs/python/tests/test_feature_group.py rename to python/tests/test_feature_group.py diff --git a/hsfs/python/tests/test_feature_group_commit.py b/python/tests/test_feature_group_commit.py similarity index 100% rename from hsfs/python/tests/test_feature_group_commit.py rename to python/tests/test_feature_group_commit.py diff --git a/hsfs/python/tests/test_feature_group_writer.py b/python/tests/test_feature_group_writer.py similarity index 100% rename from hsfs/python/tests/test_feature_group_writer.py rename to python/tests/test_feature_group_writer.py diff --git a/hsfs/python/tests/test_feature_store.py b/python/tests/test_feature_store.py similarity index 100% rename from hsfs/python/tests/test_feature_store.py rename to python/tests/test_feature_store.py diff --git a/hsfs/python/tests/test_feature_view.py b/python/tests/test_feature_view.py similarity index 100% rename from hsfs/python/tests/test_feature_view.py rename to python/tests/test_feature_view.py diff --git a/hsfs/python/tests/test_ge_expectation.py b/python/tests/test_ge_expectation.py similarity index 100% rename from hsfs/python/tests/test_ge_expectation.py rename to python/tests/test_ge_expectation.py diff --git a/hsfs/python/tests/test_ge_validation_result.py b/python/tests/test_ge_validation_result.py similarity index 100% rename from hsfs/python/tests/test_ge_validation_result.py rename to python/tests/test_ge_validation_result.py diff --git a/hsfs/python/tests/test_helpers/__init__.py b/python/tests/test_helpers/__init__.py similarity index 100% rename from hsfs/python/tests/test_helpers/__init__.py rename to python/tests/test_helpers/__init__.py diff --git a/hsfs/python/tests/test_helpers/transformation_test_helper.py b/python/tests/test_helpers/transformation_test_helper.py similarity index 100% rename from hsfs/python/tests/test_helpers/transformation_test_helper.py rename to python/tests/test_helpers/transformation_test_helper.py diff --git a/hsfs/python/tests/test_hopswork_udf.py b/python/tests/test_hopswork_udf.py similarity index 94% rename from hsfs/python/tests/test_hopswork_udf.py rename to python/tests/test_hopswork_udf.py index 8494d018f..c175f64fb 100644 --- a/hsfs/python/tests/test_hopswork_udf.py +++ b/python/tests/test_hopswork_udf.py @@ -99,7 +99,7 @@ def test_get_module_imports(self): ] def test_extract_source_code(self): - from test_helpers.transformation_test_helper import test_function + from .test_helpers.transformation_test_helper import test_function assert """import pandas as pd from hsfs.transformation_statistics import TransformationStatistics @@ -107,7 +107,7 @@ def test_function(): return True""" == HopsworksUdf._extract_source_code(test_function).strip() def test_extract_function_arguments_no_arguments(self): - from test_helpers.transformation_test_helper import test_function + from .test_helpers.transformation_test_helper import test_function with pytest.raises(FeatureStoreException) as exception: HopsworksUdf._extract_function_arguments(test_function) @@ -118,7 +118,7 @@ def test_extract_function_arguments_no_arguments(self): ) def test_extract_function_arguments_one_argument(self): - from test_helpers.transformation_test_helper import test_function_one_argument + from .test_helpers.transformation_test_helper import test_function_one_argument function_argument = HopsworksUdf._extract_function_arguments( test_function_one_argument @@ -129,7 +129,7 @@ def test_extract_function_arguments_one_argument(self): ] def test_extract_function_arguments_one_argument_with_statistics(self): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_one_argument_with_statistics, ) @@ -142,7 +142,7 @@ def test_extract_function_arguments_one_argument_with_statistics(self): ] def test_extract_function_arguments_one_argument_with_typehint(self): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_one_argument_with_typehints, ) @@ -157,7 +157,7 @@ def test_extract_function_arguments_one_argument_with_typehint(self): def test_extract_function_arguments_one_argument_with_statistics_and_typehints( self, ): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_one_argument_with_statistics_and_typehints, ) @@ -170,7 +170,7 @@ def test_extract_function_arguments_one_argument_with_statistics_and_typehints( ] def test_extract_function_arguments_multiple_argument(self): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_multiple_argument, ) @@ -184,7 +184,7 @@ def test_extract_function_arguments_multiple_argument(self): ] def test_extract_function_arguments_multiple_argument_with_statistics(self): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_multiple_argument_with_statistics, ) @@ -199,7 +199,7 @@ def test_extract_function_arguments_multiple_argument_with_statistics(self): ] def test_extract_function_arguments_multiple_argument_with_typehints(self): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_multiple_argument_with_typehints, ) @@ -215,7 +215,7 @@ def test_extract_function_arguments_multiple_argument_with_typehints(self): def test_extract_function_arguments_multiple_argument_with_statistics_and_typehints( self, ): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_multiple_argument_with_statistics_and_typehints, ) @@ -231,7 +231,7 @@ def test_extract_function_arguments_multiple_argument_with_statistics_and_typehi def test_extract_function_arguments_multiple_argument_with_mixed_statistics_and_typehints( self, ): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_multiple_argument_with_mixed_statistics_and_typehints, ) @@ -248,7 +248,7 @@ def test_extract_function_arguments_multiple_argument_with_mixed_statistics_and_ def test_extract_function_arguments_multiple_argument_all_parameter_with_spaces( self, ): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_multiple_argument_all_parameter_with_spaces, ) @@ -262,7 +262,7 @@ def test_extract_function_arguments_multiple_argument_all_parameter_with_spaces( ] def test_extract_function_arguments_multiple_argument_all_parameter_multiline(self): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_multiple_argument_all_parameter_multiline, ) @@ -279,7 +279,7 @@ def test_extract_function_arguments_multiple_argument_all_parameter_multiline(se def test_extract_function_arguments_multiple_argumen_all_parameter_multiline_with_comments( self, ): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_multiple_argument_all_parameter_multiline_with_comments, ) @@ -294,7 +294,7 @@ def test_extract_function_arguments_multiple_argumen_all_parameter_multiline_wit ] def test_extract_function_arguments_statistics_invalid(self): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_statistics_invalid, ) @@ -307,7 +307,7 @@ def test_extract_function_arguments_statistics_invalid(self): ) def test_format_source_code(self): - from test_helpers.transformation_test_helper import ( + from .test_helpers.transformation_test_helper import ( test_function_multiple_argument_all_parameter_multiline_with_comments, ) diff --git a/hsml/python/tests/test_inference_batcher.py b/python/tests/test_inference_batcher.py similarity index 100% rename from hsml/python/tests/test_inference_batcher.py rename to python/tests/test_inference_batcher.py diff --git a/hsml/python/tests/test_inference_endpoint.py b/python/tests/test_inference_endpoint.py similarity index 100% rename from hsml/python/tests/test_inference_endpoint.py rename to python/tests/test_inference_endpoint.py diff --git a/hsml/python/tests/test_inference_logger.py b/python/tests/test_inference_logger.py similarity index 100% rename from hsml/python/tests/test_inference_logger.py rename to python/tests/test_inference_logger.py diff --git a/hsml/python/tests/test_kafka_topic.py b/python/tests/test_kafka_topic.py similarity index 100% rename from hsml/python/tests/test_kafka_topic.py rename to python/tests/test_kafka_topic.py diff --git a/hsml/python/tests/test_model.py b/python/tests/test_model.py similarity index 100% rename from hsml/python/tests/test_model.py rename to python/tests/test_model.py diff --git a/hsml/python/tests/test_model_schema.py b/python/tests/test_model_schema.py similarity index 100% rename from hsml/python/tests/test_model_schema.py rename to python/tests/test_model_schema.py diff --git a/hsml/python/tests/test_predictor.py b/python/tests/test_predictor.py similarity index 100% rename from hsml/python/tests/test_predictor.py rename to python/tests/test_predictor.py diff --git a/hsml/python/tests/test_predictor_state.py b/python/tests/test_predictor_state.py similarity index 100% rename from hsml/python/tests/test_predictor_state.py rename to python/tests/test_predictor_state.py diff --git a/hsml/python/tests/test_predictor_state_condition.py b/python/tests/test_predictor_state_condition.py similarity index 100% rename from hsml/python/tests/test_predictor_state_condition.py rename to python/tests/test_predictor_state_condition.py diff --git a/hsml/python/tests/test_resources.py b/python/tests/test_resources.py similarity index 100% rename from hsml/python/tests/test_resources.py rename to python/tests/test_resources.py diff --git a/hsml/python/tests/test_schema.py b/python/tests/test_schema.py similarity index 100% rename from hsml/python/tests/test_schema.py rename to python/tests/test_schema.py diff --git a/hsfs/python/tests/test_serving_keys.py b/python/tests/test_serving_keys.py similarity index 100% rename from hsfs/python/tests/test_serving_keys.py rename to python/tests/test_serving_keys.py diff --git a/hsfs/python/tests/test_split_statistics.py b/python/tests/test_split_statistics.py similarity index 100% rename from hsfs/python/tests/test_split_statistics.py rename to python/tests/test_split_statistics.py diff --git a/hsfs/python/tests/test_statistics.py b/python/tests/test_statistics.py similarity index 100% rename from hsfs/python/tests/test_statistics.py rename to python/tests/test_statistics.py diff --git a/hsfs/python/tests/test_statistics_config.py b/python/tests/test_statistics_config.py similarity index 100% rename from hsfs/python/tests/test_statistics_config.py rename to python/tests/test_statistics_config.py diff --git a/hsfs/python/tests/test_storage_connector.py b/python/tests/test_storage_connector.py similarity index 100% rename from hsfs/python/tests/test_storage_connector.py rename to python/tests/test_storage_connector.py diff --git a/hsml/python/tests/test_tag.py b/python/tests/test_tag.py similarity index 100% rename from hsml/python/tests/test_tag.py rename to python/tests/test_tag.py diff --git a/hsfs/python/tests/test_training_dataset.py b/python/tests/test_training_dataset.py similarity index 100% rename from hsfs/python/tests/test_training_dataset.py rename to python/tests/test_training_dataset.py diff --git a/hsfs/python/tests/test_training_dataset_feature.py b/python/tests/test_training_dataset_feature.py similarity index 100% rename from hsfs/python/tests/test_training_dataset_feature.py rename to python/tests/test_training_dataset_feature.py diff --git a/hsfs/python/tests/test_training_dataset_split.py b/python/tests/test_training_dataset_split.py similarity index 100% rename from hsfs/python/tests/test_training_dataset_split.py rename to python/tests/test_training_dataset_split.py diff --git a/hsfs/python/tests/test_transformation_function.py b/python/tests/test_transformation_function.py similarity index 100% rename from hsfs/python/tests/test_transformation_function.py rename to python/tests/test_transformation_function.py diff --git a/hsml/python/tests/test_transformer.py b/python/tests/test_transformer.py similarity index 100% rename from hsml/python/tests/test_transformer.py rename to python/tests/test_transformer.py diff --git a/hsfs/python/tests/test_user.py b/python/tests/test_user.py similarity index 100% rename from hsfs/python/tests/test_user.py rename to python/tests/test_user.py diff --git a/hsml/python/tests/test_util.py b/python/tests/test_util.py similarity index 72% rename from hsml/python/tests/test_util.py rename to python/tests/test_util.py index 3e7d18166..b39501162 100644 --- a/hsml/python/tests/test_util.py +++ b/python/tests/test_util.py @@ -14,10 +14,18 @@ # limitations under the License. # +import asyncio import os +from datetime import date, datetime from urllib.parse import ParseResult +import hsfs.util import pytest +import pytz +from hsfs.client.exceptions import FeatureStoreException +from hsfs.core.constants import HAS_AIOMYSQL, HAS_SQLALCHEMY +from hsfs.embedding import EmbeddingFeature, EmbeddingIndex +from hsfs.feature import Feature from hsml import util from hsml.constants import MODEL from hsml.model import Model as BaseModel @@ -30,6 +38,11 @@ from hsml.tensorflow.predictor import Predictor as TFPredictor from hsml.torch.model import Model as TorchModel from hsml.torch.predictor import Predictor as TorchPredictor +from mock import patch + + +if HAS_SQLALCHEMY and HAS_AIOMYSQL: + from hsfs.core import util_sql class TestUtil: @@ -583,7 +596,7 @@ def test_extract_field_from_json_as_instance_of_list_str(self, mocker): assert b == ["2", "2", "2"] assert get_obj_from_json.call_count == 3 assert get_obj_from_json.call_args[1]["obj"] == "2" - assert get_obj_from_json.call_args[1]["cls"] == str + assert get_obj_from_json.call_args[1]["cls"] is str def test_get_obj_from_json_cls(self, mocker): # Arrange @@ -643,3 +656,200 @@ class Test: # Assert assert "cannot be converted to class" in str(e_info.value) + + def test_get_hudi_datestr_from_timestamp(self): + dt = hsfs.util.get_hudi_datestr_from_timestamp(1640995200000) + assert dt == "20220101000000000" + + def test_convert_event_time_to_timestamp_timestamp(self): + dt = hsfs.util.convert_event_time_to_timestamp(1640995200) + assert dt == 1640995200000 + + def test_convert_event_time_to_timestamp_datetime(self): + dt = hsfs.util.convert_event_time_to_timestamp(datetime(2022, 1, 1, 0, 0, 0)) + assert dt == 1640995200000 + + def test_convert_event_time_to_timestamp_datetime_tz(self): + dt = hsfs.util.convert_event_time_to_timestamp( + pytz.timezone("US/Pacific").localize(datetime(2021, 12, 31, 16, 0, 0)) + ) + assert dt == 1640995200000 + + def test_convert_event_time_to_timestamp_date(self): + dt = hsfs.util.convert_event_time_to_timestamp(date(2022, 1, 1)) + assert dt == 1640995200000 + + def test_convert_event_time_to_timestamp_string(self): + dt = hsfs.util.convert_event_time_to_timestamp("2022-01-01 00:00:00") + assert dt == 1640995200000 + + def test_convert_iso_event_time_to_timestamp_string(self): + dt = hsfs.util.convert_event_time_to_timestamp("2022-01-01T00:00:00.000000Z") + assert dt == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd(self): + timestamp = hsfs.util.get_timestamp_from_date_string("2022-01-01") + assert timestamp == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh(self): + timestamp = hsfs.util.get_timestamp_from_date_string("2022-01-01 00") + assert timestamp == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm(self): + timestamp = hsfs.util.get_timestamp_from_date_string("2022-01-01 00:00") + assert timestamp == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss(self): + timestamp = hsfs.util.get_timestamp_from_date_string("2022-01-01 00:00:00") + assert timestamp == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_f(self): + timestamp = hsfs.util.get_timestamp_from_date_string("2022-01-01 00:00:00.000") + assert timestamp == 1640995200000 + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error(self): + with pytest.raises(ValueError): + hsfs.util.get_timestamp_from_date_string("2022-13-01 00:00:00") + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error2(self): + with pytest.raises(ValueError): + hsfs.util.get_timestamp_from_date_string("202-13-01 00:00:00") + + def test_convert_event_time_to_timestamp_yyyy_mm_dd_hh_mm_ss_error3(self): + with pytest.raises(ValueError): + hsfs.util.get_timestamp_from_date_string("00:00:00 2022-01-01") + + def test_convert_hudi_commit_time_to_timestamp(self): + timestamp = hsfs.util.get_timestamp_from_date_string("20221118095233099") + assert timestamp == 1668765153099 + + def test_get_dataset_type_HIVEDB(self): + db_type = hsfs.util.get_dataset_type( + "/apps/hive/warehouse/temp_featurestore.db/storage_connector_resources/kafka__tstore.jks" + ) + assert db_type == "HIVEDB" + + def test_get_dataset_type_HIVEDB_with_dfs(self): + db_type = hsfs.util.get_dataset_type( + "hdfs:///apps/hive/warehouse/temp_featurestore.db/storage_connector_resources/kafka__tstore.jks" + ) + assert db_type == "HIVEDB" + + def test_get_dataset_type_DATASET(self): + db_type = hsfs.util.get_dataset_type("/Projects/temp/Resources/kafka__tstore.jks") + assert db_type == "DATASET" + + def test_get_dataset_type_DATASET_with_dfs(self): + db_type = hsfs.util.get_dataset_type( + "hdfs:///Projects/temp/Resources/kafka__tstore.jks" + ) + assert db_type == "DATASET" + + def test_get_job_url(self, mocker): + # Arrange + mock_client_get_instance = mocker.patch("hsfs.client.get_instance") + + # Act + hsfs.util.get_job_url(href="1/2/3/4/5/6/7/8") + + # Assert + assert ( + mock_client_get_instance.return_value.replace_public_host.call_args[0][ + 0 + ].path + == "p/5/jobs/named/7/executions" + ) + + def test_get_feature_group_url(self, mocker): + # Arrange + feature_store_id = 99 + feature_group_id = 10 + mock_client_get_instance = mocker.patch("hsfs.client.get_instance") + mock_util_get_hostname_replaced_url = mocker.patch( + "hsfs.util.get_hostname_replaced_url" + ) + mock_client_get_instance.return_value._project_id = 50 + + # Act + hsfs.util.get_feature_group_url( + feature_group_id=feature_group_id, feature_store_id=feature_store_id + ) + + # Assert + assert mock_util_get_hostname_replaced_url.call_count == 1 + assert ( + mock_util_get_hostname_replaced_url.call_args[0][0] == "/p/50/fs/99/fg/10" + ) + + def test_valid_embedding_type(self): + embedding_index = EmbeddingIndex( + features=[ + EmbeddingFeature("feature1", 3), + EmbeddingFeature("feature2", 3), + EmbeddingFeature("feature3", 3), + EmbeddingFeature("feature4", 3), + ] + ) + # Define a schema with valid feature types + schema = [ + Feature(name="feature1", type="array"), + Feature(name="feature2", type="array"), + Feature(name="feature3", type="array"), + Feature(name="feature4", type="array"), + ] + # Call the method and expect no exceptions + hsfs.util.validate_embedding_feature_type(embedding_index, schema) + + def test_invalid_embedding_type(self): + embedding_index = EmbeddingIndex( + features=[ + EmbeddingFeature("feature1", 3), + EmbeddingFeature("feature2", 3), + ] + ) + # Define a schema with an invalid feature type + schema = [ + Feature(name="feature1", type="array"), + Feature(name="feature2", type="array"), # Invalid type + ] + # Call the method and expect a FeatureStoreException + with pytest.raises(FeatureStoreException): + hsfs.util.validate_embedding_feature_type(embedding_index, schema) + + def test_missing_embedding_index(self): + # Define a schema without an embedding index + schema = [ + Feature(name="feature1", type="array"), + Feature(name="feature2", type="array"), + ] + # Call the method with an empty feature_group (no embedding index) + hsfs.util.validate_embedding_feature_type(None, schema) + # No exception should be raised + + def test_empty_schema(self): + embedding_index = EmbeddingIndex( + features=[ + EmbeddingFeature("feature1", 3), + EmbeddingFeature("feature2", 3), + ] + ) + # Define an empty schema + schema = [] + # Call the method with an empty schema + hsfs.util.validate_embedding_feature_type(embedding_index, schema) + # No exception should be raised + + @pytest.mark.skipif( + not HAS_SQLALCHEMY or not HAS_AIOMYSQL, + reason="SQLAlchemy or aiomysql is not installed", + ) + def test_create_async_engine(self, mocker): + # Test when get_running_loop() raises a RuntimeError + with patch("asyncio.get_running_loop", side_effect=RuntimeError): + # mock storage connector + online_connector = patch.object(hsfs.util, "get_online_connector") + with pytest.raises( + RuntimeError, + match="Event loop is not running. Please invoke this co-routine from a running loop or provide an event loop.", + ): + asyncio.run(util_sql.create_async_engine(online_connector, True, 1)) diff --git a/hsfs/python/tests/test_validation_report.py b/python/tests/test_validation_report.py similarity index 100% rename from hsfs/python/tests/test_validation_report.py rename to python/tests/test_validation_report.py diff --git a/hsfs/python/tests/util.py b/python/tests/util.py similarity index 100% rename from hsfs/python/tests/util.py rename to python/tests/util.py diff --git a/hsfs/python/tests/fixtures/__init__.py b/python/tests/utils/__init__.py similarity index 94% rename from hsfs/python/tests/fixtures/__init__.py rename to python/tests/utils/__init__.py index 3ed3ff38a..ff8055b9b 100644 --- a/hsfs/python/tests/fixtures/__init__.py +++ b/python/tests/utils/__init__.py @@ -1,5 +1,5 @@ # -# Copyright 2022 Hopsworks AB +# Copyright 2024 Hopsworks AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hsml/python/tests/utils/schema/test_column.py b/python/tests/utils/schema/test_column.py similarity index 100% rename from hsml/python/tests/utils/schema/test_column.py rename to python/tests/utils/schema/test_column.py diff --git a/hsml/python/tests/utils/schema/test_columnar_schema.py b/python/tests/utils/schema/test_columnar_schema.py similarity index 100% rename from hsml/python/tests/utils/schema/test_columnar_schema.py rename to python/tests/utils/schema/test_columnar_schema.py diff --git a/hsml/python/tests/utils/schema/test_tensor.py b/python/tests/utils/schema/test_tensor.py similarity index 100% rename from hsml/python/tests/utils/schema/test_tensor.py rename to python/tests/utils/schema/test_tensor.py diff --git a/hsml/python/tests/utils/schema/test_tensor_schema.py b/python/tests/utils/schema/test_tensor_schema.py similarity index 100% rename from hsml/python/tests/utils/schema/test_tensor_schema.py rename to python/tests/utils/schema/test_tensor_schema.py diff --git a/requirements-docs.txt b/requirements-docs.txt index d1499a262..8bc8d6230 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,7 +1,7 @@ mkdocs==1.5.3 mkdocs-material==9.5.17 mike==2.0.0 -sphinx==7.2.6 +sphinx==7.3.7 keras_autodoc @ git+https://git@github.com/logicalclocks/keras-autodoc markdown-include==0.8.1 mkdocs-jupyter==0.24.3 diff --git a/hsfs/utils/java/pom.xml b/utils/java/pom.xml similarity index 100% rename from hsfs/utils/java/pom.xml rename to utils/java/pom.xml diff --git a/hsfs/utils/java/src/main/java/com/logicalclocks/utils/MainClass.java b/utils/java/src/main/java/com/logicalclocks/utils/MainClass.java similarity index 100% rename from hsfs/utils/java/src/main/java/com/logicalclocks/utils/MainClass.java rename to utils/java/src/main/java/com/logicalclocks/utils/MainClass.java diff --git a/hsfs/utils/java/src/main/resources/checkstyle.xml b/utils/java/src/main/resources/checkstyle.xml similarity index 100% rename from hsfs/utils/java/src/main/resources/checkstyle.xml rename to utils/java/src/main/resources/checkstyle.xml diff --git a/hsfs/utils/java/src/main/resources/suppressions.xml b/utils/java/src/main/resources/suppressions.xml similarity index 100% rename from hsfs/utils/java/src/main/resources/suppressions.xml rename to utils/java/src/main/resources/suppressions.xml diff --git a/hsfs/utils/python/hsfs_utils.py b/utils/python/hsfs_utils.py similarity index 100% rename from hsfs/utils/python/hsfs_utils.py rename to utils/python/hsfs_utils.py