Title: [BUG] fit_surrogate silently converts valid integer objectives into failures · Issue #367 · deephyper/deephyper · GitHub
Open Graph Title: [BUG] fit_surrogate silently converts valid integer objectives into failures · Issue #367 · deephyper/deephyper
X Title: [BUG] fit_surrogate silently converts valid integer objectives into failures · Issue #367 · deephyper/deephyper
Description: Describe the bug Integer objective values are treated as failed evaluations. The same values represented as floats are accepted. This changes the observations passed to the surrogate and also affects analysis helpers using the shared fai...
Open Graph Description: Describe the bug Integer objective values are treated as failed evaluations. The same values represented as floats are accepted. This changes the observations passed to the surrogate and also affec...
X Description: Describe the bug Integer objective values are treated as failed evaluations. The same values represented as floats are accepted. This changes the observations passed to the surrogate and also affec...
Opengraph URL: https://github.com/deephyper/deephyper/issues/367
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] fit_surrogate silently converts valid integer objectives into failures","articleBody":"### Describe the bug\n\nInteger objective values are treated as failed evaluations. The same values represented as floats are accepted. This changes the observations passed to the surrogate and also affects analysis helpers using the shared failure filter.\n\n### Steps to reproduce\n\n```python\nimport tempfile\nimport pandas as pd\nfrom deephyper.analysis.hpo import filter_failed_objectives\nfrom deephyper.hpo import CBO, HpProblem\n\ndf = pd.DataFrame({\"p:x\": [0.2, 0.8], \"objective\": [1, 2]})\nsuccesses, failures = filter_failed_objectives(df)\nprint(len(successes), len(failures)) # 0 2\n\np = HpProblem()\np.add_hyperparameter((0.0, 1.0), \"x\")\nwith tempfile.TemporaryDirectory() as directory:\n search = CBO(p, n_initial_points=10, log_dir=directory)\n search.fit_surrogate(df)\n print(search._opt.yi) # ['F', 'F']\n```\n\nWriting this DataFrame to CSV and passing the CSV path produces the same result. Converting `objective` to float produces zero failures and `yi == [-1.0, -2.0]`.\n\n### Expected behavior\n\nValid integer objectives should remain successful numeric observations, with the same semantics as equivalent float objectives. Only failed outcomes should become `\"F\"`.\n\n### Additional context\n\n`get_mask_of_rows_without_failures` uses `isinstance(x, float)` for non-string columns. This classifies valid integers as failures. The same predicate accepts float `NaN` as successful. Numeric validation should also handle non-finite values and preserve explicit failure markers.\n\nFound while revisiting #186; this also reproduces directly on a DataFrame without CSV parsing.\n\n### System information\n\nLinux; Python 3.11.15; DeepHyper 0.13.2; pandas 3.1.1; NumPy 2.4.6. Also reproduced with current master 7cd3f019032832be1f195c08a5fd26fe827f1483.\n\nSource: https://github.com/deephyper/deephyper/blob/7cd3f019032832be1f195c08a5fd26fe827f1483/src/deephyper/analysis/hpo/_hpo.py#L15-L26\n","author":{"url":"https://github.com/evvaletov","@type":"Person","name":"evvaletov"},"datePublished":"2026-11-07T09:46:37Z","url":"https://github.com/deephyper/deephyper/issues/367"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:49f48103-178d-c246-793b-7928f76b9a9f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8532:237D74:5BD2FA:7C236D:6B043FD6 |
| html-safe-nonce | bc4baef264261a36f0a3c0a4c5e32fabc81acde7892f935ea14a4153f797ec29 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTMyOjIzN0Q3NDo1QkQyRkE6N0MyMzZEOjZCMDQzRkQ2IiwidmlzaXRvcl9pZCI6IjQwNTQ1ODYxNTQ4MzUxNDgzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 47fee2000887d233e4f94cf39f6f803e29c15c862e7da4cbe22b9b6272e2569e |
| hovercard-subject-tag | issue:6257585847 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/deephyper/deephyper/367/issue_layout |
| twitter:image | https://opengraph.githubassets.com/340d805a2249c004b7765833b3250e5c89ba13deb9f8e5b4a342f75f4bf67929/deephyper/deephyper/issues/367 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/340d805a2249c004b7765833b3250e5c89ba13deb9f8e5b4a342f75f4bf67929/deephyper/deephyper/issues/367 |
| og:image:alt | Describe the bug Integer objective values are treated as failed evaluations. The same values represented as floats are accepted. This changes the observations passed to the surrogate and also affec... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | evvaletov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| turbo-cache-control | no-preview |
| go-import | github.com/deephyper/deephyper git https://github.com/deephyper/deephyper.git |
| octolytics-dimension-user_id | 44810957 |
| octolytics-dimension-user_login | deephyper |
| octolytics-dimension-repository_id | 156403341 |
| octolytics-dimension-repository_nwo | deephyper/deephyper |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 156403341 |
| octolytics-dimension-repository_network_root_nwo | deephyper/deephyper |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width