Skip to content

Verify & fix tutorials against Hopsworks 5.0#350

Open
MagicLex wants to merge 3 commits into
masterfrom
fix-tutorials-5.0
Open

Verify & fix tutorials against Hopsworks 5.0#350
MagicLex wants to merge 3 commits into
masterfrom
fix-tutorials-5.0

Conversation

@MagicLex

Copy link
Copy Markdown
Collaborator

Running the tutorials end-to-end against 5.0.0.dev1 and fixing what breaks. One commit per logical fix.

Batch AI systems — verified end-to-end on a live 5.0 cluster

  • fraud_batch: feature_view.log() called positionally; 5.0 prepended a logging_data param, so args landed in the wrong slots. Pass by keyword.
  • credit_scores: 5.0 enforces that a FV join covers the full primary key (270249). The previous_* groups are (sk_id_prev, sk_id_curr) grain but joined on sk_id_curr only. Collapse them to applicant grain; handle null labels/input_example.
  • hospital_wait_time: was not runnable end-to-end. 5.0 transformed-column renaming + event-time prefixing, NaN handling for Prophet regressors, a cell-order bug, and a plt import.
  • quickstart, churn, loan_approval, nyc_taxi_fares: pass, no code change.

Depends on an SDK fix

credit_scores and hospital_wait_time only run once the hsfs builtin label_encoder is made null-safe (1-line). Tracked separately.

Still to verify

real-time, llm, api_examples, integrations.

Note: branch-5.0 is a protected pattern, so this targets master.

🤖 Generated with Claude Code

MagicLex and others added 3 commits June 12, 2026 14:44
5.0 prepended a `logging_data` parameter to FeatureView.log(), shifting
positional args. The inference notebook passed untransformed features and
predictions positionally, so they landed in the wrong slots and logging
raised FeatureStoreException. Pass them by keyword.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s/example

5.0 enforces that a feature view join covers every column of the joined
feature group's primary key (errorCode 270249). The previous_applications,
pos_cash_balances, installment_payments and credit_card_balances groups are at
(sk_id_prev, sk_id_curr) grain but were joined on sk_id_curr only, so FV
creation was rejected.

- functions.py: add collapse_to_customer() — reduce a previous-credit table to
  one row per sk_id_curr (most recent by datetime), dropping sk_id_prev.
- nb1: apply it before the four inserts; set their primary key to [sk_id_curr].
- nb3: drop sk_id_prev from the four select_except lists so the join is on the
  full primary key.

Two pre-existing data-hygiene issues surfaced once the FV builds:
- the bureaus-rooted left join leaves a null target for bureau records whose
  applicant is absent from applications; drop those rows before training.
- the input_example carried pd.NA (encoded null categoricals); sample a
  complete row.

Note: running this end-to-end also requires the hsfs builtin label_encoder
null-safety fix (separate SDK change).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This Prophet tutorial was not runnable end to end. Fixes:

- 5.0 renames transformed columns to `<transform>_<feature>_` and prefixes
  joined event-time columns with `<project>_<fg>_<version>_`. Add
  restore_column_names() after train_test_split / get_batch_data so the `date`
  column and the per-feature Prophet regressors resolve again.
- Prophet rejects NaN in regressor columns; drop rows with a missing regressor
  or label before fit/predict (train, test and batch).
- nb2: the MAE cell referenced `forecast` before the predict cell defined it;
  reorder predict before MAE.
- nb2: matplotlib was imported as `from matplotlib import pyplot` but the plot
  helpers use `plt`; import as `plt`.
- input_example: sample a complete row (encoded nulls are pd.NA, not JSON
  serializable).

Running end-to-end also requires the hsfs builtin label_encoder null-safety fix
(separate SDK change).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant