Skip to content

feat(piplines, components)[AutoML]: add new param eval_metric#114

Merged
openshift-merge-bot[bot] merged 7 commits into
opendatahub-io:mainfrom
Mateusz-Switala:feat-automl-add-new-param-eval-metric
Jun 8, 2026
Merged

feat(piplines, components)[AutoML]: add new param eval_metric#114
openshift-merge-bot[bot] merged 7 commits into
opendatahub-io:mainfrom
Mateusz-Switala:feat-automl-add-new-param-eval-metric

Conversation

@Mateusz-Switala

@Mateusz-Switala Mateusz-Switala commented Jun 1, 2026

Copy link
Copy Markdown

Assisted-by: Claude Code

Description of your changes:
Adds an eval_metric parameter to both the tabular and timeseries AutoML training components and their corresponding pipelines, allowing callers to control the metric used for model ranking without forking the pipeline.

Tabular (autogluon_models_training + pipeline)

  • autogluon_models_training: adds eval_metric: str = "" input parameter. When empty (default), the component resolves to "r2" for regression and "accuracy" for classification — preserving existing behaviour. The resolved metric is passed to TabularPredictor constructor
    and returned directly (previously read from predictor.eval_metric after fit).
  • Pipeline (autogluon_tabular_training_pipeline): exposes eval_metric: str = "" and forwards it to the training component.
  • Tests: 4 new unit tests covering explicit metric forwarding and per-task-type default resolution (r2 / accuracy). Pipeline signature test updated. Regression smoke config gains "eval_metric": "r2"; new classification_binary_eval_metric integration config added.

Timeseries (autogluon_timeseries_models_training + pipeline)

  • autogluon_timeseries_models_training: adds eval_metric: str = "MASE" input parameter (previously hardcoded as DEFAULT_EVAL_METRIC). Validates that the value is a non-empty string. Metric is passed to both the selection TimeSeriesPredictor and each refit predictor,
    stored in model_config, and returned as a component output.
  • Pipeline (autogluon_timeseries_training_pipeline): exposes eval_metric: str = "MASE" and forwards it to the training component.
  • Tests: 2 new unit tests — test_empty_eval_metric_raises and test_custom_eval_metric_passed_to_predictors_and_returned. Pipeline signature test updated. New timeseries_wql_eval_metric integration config added.

Documentation

README inputs tables for both components and both pipelines updated with the new eval_metric parameter.
Checklist:

Pre-Submission Checklist

Additional Checklist Items for New or Updated Components/Pipelines

  • metadata.yaml includes fresh lastVerified timestamp
  • All required files
    are present and complete
  • OWNERS file lists appropriate maintainers
  • README provides clear documentation with usage examples
  • Component follows snake_case naming convention
  • No security vulnerabilities in dependencies
  • Containerfile included if using a custom base image

Summary by CodeRabbit

  • New Features

    • Added eval_metric input across tabular and timeseries training pipelines/components; tabular accepts empty to resolve to task-type default (e.g., r2 for regression, accuracy for classification), timeseries defaults to "MASE" and requires a valid metric. The chosen metric is exposed as a component output.
  • Documentation

    • Updated READMEs and pipeline docs to describe eval_metric, defaults, and allowed values.
  • Tests

    • Added unit tests for validation, default resolution, propagation to trainers, and error cases.

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 9c41b7b8-7db4-4976-b3ee-3b3c22bf9798

📥 Commits

Reviewing files that changed from the base of the PR and between 53c8038 and 5f0fdee.

📒 Files selected for processing (1)
  • components/training/automl/autogluon_models_training/component.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/training/automl/autogluon_models_training/component.py

📝 Walkthrough

Walkthrough

This PR exposes eval_metric as a pipeline/component input for AutoGluon tabular and timeseries training. Tabular component accepts eval_metric: str = "" and conditionally defaults to task-type metric (regression → "r2", else "accuracy"); it validates non-blank and membership in METRICS and returns the resolved metric. Timeseries component accepts eval_metric: str = "MASE", removes the internal fallback, validates membership in AVAILABLE_METRICS, and propagates the input into predictor construction and returned model_config. Both pipelines surface and wire the parameter; unit tests and test configs are added or extended to cover validation, forwarding, default resolution, and artifact metadata.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding a new eval_metric parameter to AutoML pipelines and components.
Description check ✅ Passed The description comprehensively documents changes across tabular and timeseries components, parameters, test coverage, and documentation updates. All required template sections are addressed with substantive detail.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
components/training/automl/autogluon_models_training/component.py (2)

178-179: 💤 Low value

Consider adding whitespace validation for defensive consistency.

The defaulting logic uses a truthiness check that catches empty string and None, but not whitespace-only strings like " ". Other string parameters in this component (e.g., label_column at line 98-99) validate with .strip().

While AutoGluon's TabularPredictor will reject invalid metric names anyway, adding a .strip() check would be more defensive and consistent:

if not eval_metric or not eval_metric.strip():
    eval_metric = "r2" if task_type == "regression" else "accuracy"

This matches the validation pattern used by the downstream leaderboard_evaluation component (which checks eval_metric.strip() per the context snippet).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/training/automl/autogluon_models_training/component.py` around
lines 178 - 179, The eval_metric defaulting uses a truthiness check that misses
whitespace-only strings; update the conditional around eval_metric in the
AutoGluon training component so it treats empty or whitespace-only values as
unset (e.g., use eval_metric.strip() in the condition), then default to "r2" for
task_type == "regression" or "accuracy" otherwise; locate the logic that sets
eval_metric (the eval_metric variable assignment in the
autogluon_models_training component) and change the check to reject
whitespace-only strings consistent with other validations like
label_column.strip().

30-30: 💤 Low value

Type hint inconsistency with test expectations.

The signature declares eval_metric: str = "", but the unit test at test_component_unit.py:1390 explicitly passes eval_metric=None. While this works at runtime (the truthiness check at line 178 handles both "" and None), it violates the type contract.

For consistency with similar optional parameters like positive_class: Optional[str] = None (line 29), consider either:

  1. Update the signature to eval_metric: Optional[str] = "" to explicitly accept None, or
  2. Keep the signature as-is and update the test to pass eval_metric="" instead of None.

Option 2 is cleaner since the empty string default already triggers the desired defaulting behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/training/automl/autogluon_models_training/component.py` at line
30, The parameter eval_metric is declared as eval_metric: str = "" but tests
pass None; to keep the type contract, update the unit test to pass
eval_metric="" (empty string) instead of None so the existing
defaulting/truthiness logic still applies; do not change the function
signature—leave eval_metric as str = "" to match other optional string params
like positive_class and ensure the test uses an empty string.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@components/training/automl/autogluon_timeseries_models_training/component.py`:
- Around line 129-130: The current guard only checks that eval_metric is a
non-empty string but doesn't ensure it's one of AutoGluon’s supported metrics;
import autogluon.timeseries.metrics.AVAILABLE_METRICS and add a membership check
after the existing isinstance/strip guard (where eval_metric is validated) to
raise a TypeError if eval_metric not in AVAILABLE_METRICS, including a message
listing or referencing AVAILABLE_METRICS to show valid options; keep the
exception type as TypeError and update any tests or usage that assume the
earlier behavior.

---

Nitpick comments:
In `@components/training/automl/autogluon_models_training/component.py`:
- Around line 178-179: The eval_metric defaulting uses a truthiness check that
misses whitespace-only strings; update the conditional around eval_metric in the
AutoGluon training component so it treats empty or whitespace-only values as
unset (e.g., use eval_metric.strip() in the condition), then default to "r2" for
task_type == "regression" or "accuracy" otherwise; locate the logic that sets
eval_metric (the eval_metric variable assignment in the
autogluon_models_training component) and change the check to reject
whitespace-only strings consistent with other validations like
label_column.strip().
- Line 30: The parameter eval_metric is declared as eval_metric: str = "" but
tests pass None; to keep the type contract, update the unit test to pass
eval_metric="" (empty string) instead of None so the existing
defaulting/truthiness logic still applies; do not change the function
signature—leave eval_metric as str = "" to match other optional string params
like positive_class and ensure the test uses an empty string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c9257135-ad04-4817-a36c-028e7d084c9d

📥 Commits

Reviewing files that changed from the base of the PR and between ed02191 and ca2d996.

📒 Files selected for processing (14)
  • components/training/automl/autogluon_models_training/README.md
  • components/training/automl/autogluon_models_training/component.py
  • components/training/automl/autogluon_models_training/tests/test_component_unit.py
  • components/training/automl/autogluon_timeseries_models_training/README.md
  • components/training/automl/autogluon_timeseries_models_training/component.py
  • components/training/automl/autogluon_timeseries_models_training/tests/test_component_unit.py
  • pipelines/training/automl/autogluon_tabular_training_pipeline/README.md
  • pipelines/training/automl/autogluon_tabular_training_pipeline/pipeline.py
  • pipelines/training/automl/autogluon_tabular_training_pipeline/tests/test_configs.json
  • pipelines/training/automl/autogluon_tabular_training_pipeline/tests/test_pipeline_unit.py
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/README.md
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/pipeline.py
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_configs.json
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_pipeline_unit.py

Comment thread components/training/automl/autogluon_timeseries_models_training/component.py Outdated
@Mateusz-Switala Mateusz-Switala force-pushed the feat-automl-add-new-param-eval-metric branch from 9e0c72b to d8cc0d5 Compare June 2, 2026 14:36

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@components/training/automl/autogluon_models_training/tests/test_component_unit.py`:
- Around line 1400-1526: The tests only exercise eval_metric=None but the
pipeline default is an empty string, so add explicit test coverage for
eval_metric=="" (the pipeline sentinel) so the component behaves the same as
None; update or add tests alongside
test_eval_metric_none_regression_resolves_to_r2,
test_eval_metric_none_binary_resolves_to_accuracy and
test_eval_metric_none_multiclass_resolves_to_accuracy to call
autogluon_models_training.python_func with eval_metric="" and assert the same
resolved metrics and constructor arg (check
mock_predictor_class.call_args[1]["eval_metric"] and result.eval_metric), or
alternatively make the component signature accept Optional[str] end-to-end and
update those tests to pass "" as the real default sentinel.

In
`@pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_pipeline_unit.py`:
- Around line 113-121: The test reads the compiled YAML into the bytes variable
content and then performs string containment checks, causing a TypeError; fix by
decoding content to an ASCII string once after reading (e.g., replace using
content.decode("ascii") -> assign back to content_str) and use that decoded
string for the subsequent assertions and decode-based error handling in the
try/except block around tmp_path reading/unlinking; update references to content
in the assertions ("componentInputParameter: eval_metric" and
"outputParameterKey: eval_metric") to use the decoded string variable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 7ec26a22-045f-4080-9d45-d13a1c8ffd5e

📥 Commits

Reviewing files that changed from the base of the PR and between ca2d996 and d8cc0d5.

📒 Files selected for processing (14)
  • components/training/automl/autogluon_models_training/README.md
  • components/training/automl/autogluon_models_training/component.py
  • components/training/automl/autogluon_models_training/tests/test_component_unit.py
  • components/training/automl/autogluon_timeseries_models_training/README.md
  • components/training/automl/autogluon_timeseries_models_training/component.py
  • components/training/automl/autogluon_timeseries_models_training/tests/test_component_unit.py
  • pipelines/training/automl/autogluon_tabular_training_pipeline/README.md
  • pipelines/training/automl/autogluon_tabular_training_pipeline/pipeline.py
  • pipelines/training/automl/autogluon_tabular_training_pipeline/tests/test_configs.json
  • pipelines/training/automl/autogluon_tabular_training_pipeline/tests/test_pipeline_unit.py
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/README.md
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/pipeline.py
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_configs.json
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_pipeline_unit.py
✅ Files skipped from review due to trivial changes (4)
  • components/training/automl/autogluon_models_training/README.md
  • pipelines/training/automl/autogluon_tabular_training_pipeline/README.md
  • components/training/automl/autogluon_timeseries_models_training/README.md
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/README.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_configs.json
  • pipelines/training/automl/autogluon_tabular_training_pipeline/pipeline.py
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/pipeline.py
  • components/training/automl/autogluon_timeseries_models_training/component.py
  • components/training/automl/autogluon_models_training/component.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@components/training/automl/autogluon_models_training/tests/test_component_unit.py`:
- Around line 1400-1526: The tests only exercise eval_metric=None but the
pipeline default is an empty string, so add explicit test coverage for
eval_metric=="" (the pipeline sentinel) so the component behaves the same as
None; update or add tests alongside
test_eval_metric_none_regression_resolves_to_r2,
test_eval_metric_none_binary_resolves_to_accuracy and
test_eval_metric_none_multiclass_resolves_to_accuracy to call
autogluon_models_training.python_func with eval_metric="" and assert the same
resolved metrics and constructor arg (check
mock_predictor_class.call_args[1]["eval_metric"] and result.eval_metric), or
alternatively make the component signature accept Optional[str] end-to-end and
update those tests to pass "" as the real default sentinel.

In
`@pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_pipeline_unit.py`:
- Around line 113-121: The test reads the compiled YAML into the bytes variable
content and then performs string containment checks, causing a TypeError; fix by
decoding content to an ASCII string once after reading (e.g., replace using
content.decode("ascii") -> assign back to content_str) and use that decoded
string for the subsequent assertions and decode-based error handling in the
try/except block around tmp_path reading/unlinking; update references to content
in the assertions ("componentInputParameter: eval_metric" and
"outputParameterKey: eval_metric") to use the decoded string variable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 7ec26a22-045f-4080-9d45-d13a1c8ffd5e

📥 Commits

Reviewing files that changed from the base of the PR and between ca2d996 and d8cc0d5.

📒 Files selected for processing (14)
  • components/training/automl/autogluon_models_training/README.md
  • components/training/automl/autogluon_models_training/component.py
  • components/training/automl/autogluon_models_training/tests/test_component_unit.py
  • components/training/automl/autogluon_timeseries_models_training/README.md
  • components/training/automl/autogluon_timeseries_models_training/component.py
  • components/training/automl/autogluon_timeseries_models_training/tests/test_component_unit.py
  • pipelines/training/automl/autogluon_tabular_training_pipeline/README.md
  • pipelines/training/automl/autogluon_tabular_training_pipeline/pipeline.py
  • pipelines/training/automl/autogluon_tabular_training_pipeline/tests/test_configs.json
  • pipelines/training/automl/autogluon_tabular_training_pipeline/tests/test_pipeline_unit.py
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/README.md
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/pipeline.py
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_configs.json
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_pipeline_unit.py
✅ Files skipped from review due to trivial changes (4)
  • components/training/automl/autogluon_models_training/README.md
  • pipelines/training/automl/autogluon_tabular_training_pipeline/README.md
  • components/training/automl/autogluon_timeseries_models_training/README.md
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/README.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_configs.json
  • pipelines/training/automl/autogluon_tabular_training_pipeline/pipeline.py
  • pipelines/training/automl/autogluon_timeseries_training_pipeline/pipeline.py
  • components/training/automl/autogluon_timeseries_models_training/component.py
  • components/training/automl/autogluon_models_training/component.py
🛑 Comments failed to post (2)
components/training/automl/autogluon_models_training/tests/test_component_unit.py (1)

1400-1526: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Cover the actual pipeline default sentinel.

These fallback tests only exercise eval_metric=None, but the pipeline contract now defaults eval_metric to "". A component that resolves None but rejects "" would still pass this suite and then fail when the pipeline omits eval_metric. Add explicit cases for eval_metric="" on regression and classification, or make the component contract Optional[str] end-to-end.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@components/training/automl/autogluon_models_training/tests/test_component_unit.py`
around lines 1400 - 1526, The tests only exercise eval_metric=None but the
pipeline default is an empty string, so add explicit test coverage for
eval_metric=="" (the pipeline sentinel) so the component behaves the same as
None; update or add tests alongside
test_eval_metric_none_regression_resolves_to_r2,
test_eval_metric_none_binary_resolves_to_accuracy and
test_eval_metric_none_multiclass_resolves_to_accuracy to call
autogluon_models_training.python_func with eval_metric="" and assert the same
resolved metrics and constructor arg (check
mock_predictor_class.call_args[1]["eval_metric"] and result.eval_metric), or
alternatively make the component signature accept Optional[str] end-to-end and
update those tests to pass "" as the real default sentinel.
pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_pipeline_unit.py (1)

113-121: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '103,121p' pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_pipeline_unit.py

python - <<'PY'
content = b"componentInputParameter: eval_metric"
try:
    "componentInputParameter: eval_metric" in content
except TypeError as exc:
    print(f"{type(exc).__name__}: {exc}")
PY

Repository: opendatahub-io/pipelines-components

Length of output: 1020


Fix failing ASCII-only test: decode YAML to str before str containment checks

content is bytes, but the test asserts using string literals (e.g., "componentInputParameter: eval_metric" in content), which raises TypeError and prevents the wiring assertions from running. Decode once to ASCII text and assert on that decoded string.

Patch
-            content = Path(tmp_path).read_bytes()
             try:
-                content.decode("ascii")
+                content = Path(tmp_path).read_text(encoding="ascii")
             except UnicodeDecodeError as exc:
                 pytest.fail(f"Compiled pipeline YAML must be ASCII-only: {exc}")
         finally:
             Path(tmp_path).unlink(missing_ok=True)
         assert "componentInputParameter: eval_metric" in content
         assert "outputParameterKey: eval_metric" in content
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

            try:
                content = Path(tmp_path).read_text(encoding="ascii")
            except UnicodeDecodeError as exc:
                pytest.fail(f"Compiled pipeline YAML must be ASCII-only: {exc}")
        finally:
            Path(tmp_path).unlink(missing_ok=True)
        assert "componentInputParameter: eval_metric" in content
        assert "outputParameterKey: eval_metric" in content
🧰 Tools
🪛 GitHub Actions: Run Tests and Validate Example Pipelines for Updated Components / 0_targeted-tests.txt

[error] 120-120: Test failed in test_compiled_pipeline_yaml_is_ascii_only: TypeError: a bytes-like object is required, not 'str' (assertion 'componentInputParameter: eval_metric' in content where content is bytes).

🪛 GitHub Actions: Run Tests and Validate Example Pipelines for Updated Components / targeted-tests

[error] 120-120: Test failed with TypeError in test_compiled_pipeline_yaml_is_ascii_only: 'a bytes-like object is required, not str' (assertion comparing a bytes content variable to a string).


[error] 104-121: Assertion failure in test_compiled_pipeline_yaml_is_ascii_only expecting "componentInputParameter: eval_metric" in compiled pipeline YAML, but the test crashes due to bytes-vs-str mismatch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@pipelines/training/automl/autogluon_timeseries_training_pipeline/tests/test_pipeline_unit.py`
around lines 113 - 121, The test reads the compiled YAML into the bytes variable
content and then performs string containment checks, causing a TypeError; fix by
decoding content to an ASCII string once after reading (e.g., replace using
content.decode("ascii") -> assign back to content_str) and use that decoded
string for the subsequent assertions and decode-based error handling in the
try/except block around tmp_path reading/unlinking; update references to content
in the assertions ("componentInputParameter: eval_metric" and
"outputParameterKey: eval_metric") to use the decoded string variable.

Signed-off-by: Mateusz Switala <mswitala@redhat.com>
Assisted-by: Claude Code
Signed-off-by: Mateusz Switala <mswitala@redhat.com>
Assisted-by: Claude Code
Signed-off-by: Mateusz Switala <mswitala@redhat.com>
Assisted-by: Claude Code
Signed-off-by: Mateusz Switala <mswitala@redhat.com>
Assisted-by: Claude Code
Signed-off-by: Mateusz Switala <mswitala@redhat.com>
Assisted-by: Claude Code
Signed-off-by: Mateusz Switala <mswitala@redhat.com>
Assisted-by: Claude Code
@Mateusz-Switala Mateusz-Switala force-pushed the feat-automl-add-new-param-eval-metric branch from e84264d to 53c8038 Compare June 5, 2026 15:18
@dryszka

dryszka commented Jun 7, 2026

Copy link
Copy Markdown

@Mateusz-Switala Please rebase - let's merge it beginning of week Jun 8th, so UI team can pick up the changes.
fyi: @LukaszCmielowski @DorotaDR Please help with reviews and approvals

Signed-off-by: Mateusz Switala <mswitala@redhat.com>
@Mateusz-Switala

Copy link
Copy Markdown
Author

@dryszka The branch has been already rebased. The review can be conducted.

@DorotaDR DorotaDR left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DorotaDR

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved label Jun 8, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit a16330f into opendatahub-io:main Jun 8, 2026
22 checks passed
@Mateusz-Switala Mateusz-Switala deleted the feat-automl-add-new-param-eval-metric branch June 9, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants