Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python client] backwards incompatibility issue with v3.42.04 #16479

Open
itsmunishbhardwaj opened this issue Jan 14, 2025 · 3 comments
Open
Assignees
Milestone

Comments

@itsmunishbhardwaj
Copy link

H2O version, Operating System and Environment
(e.g. 3.38.0.1, Mac OS w/ M1 chip, R v4.0.1). Please let us know if you're running on K8s/Hadoop and if so, what version.

H2O Version: v3.42.0.4
OS: Ubuntu 22.04
Environement: http://jenkins.h2o.local:8080/job/h2o-ai-cloud-tests/job/release-tests/job/environments/job/for_mlops_v0.67.0_and_below/job/mlops%252F0.67.0/25/allure/#suites/7e3daadf797fdaa5207fb79d3cce47ba/bc67e7510347fbd/

Actual behavior

when I try to use upload_file method for h2o version 3.42.04. I hit the following error:

h2o.exceptions.H2OResponseError: Server error water.exceptions.H2OIllegalArgumentException:
  Error: Unknown parameter: force_col_types
  Request: POST /3/Parse
    data: {'destination_frame': 'Key_Frame__upload_814bc7e66ebcc459c9312a7b66974f48.hex', 'parse_type': 'CSV', 'separator': '44', 'check_header': '1', 'number_columns': '21', 'chunk_size': '4194304', 'delete_on_done': 'True', 'blocking': 'False', 'column_types': '["String","Enum","Numeric","Enum","Enum","Numeric","Enum","Enum","Enum","Enum","Enum","Enum","Enum","Enum","Enum","Enum","Enum","Enum","Numeric","Numeric","Enum"]', 'force_col_types': 'False', 'single_quotes': 'False', 'escapechar': '0', 'column_names': '["customerID","gender","SeniorCitizen","Partner","Dependents","tenure","PhoneService","MultipleLines","InternetService","OnlineSecurity","OnlineBackup","DeviceProtection","TechSupport","StreamingTV","StreamingMovies","Contract","PaperlessBilling","PaymentMethod","MonthlyCharges","TotalCharges","Churn"]', 'source_frames': '["upload_814bc7e66ebcc459c9312a7b66974f48"]'}

Expected behavior
uploading a file using the python client should work.

Steps to reproduce
Steps to reproduce the behavior (with working code on a sample dataset, if possible):

  1. using python client create h2o3 instance on cloud-dev aiem: https://cloud-dev.h2o.dev/aiengines
  2. create the instance using v3.42.04
  3. upload any dataset to it
  4. you should see the following error h2o.exceptions.H2OResponseError: Server error water.exceptions.H2OIllegalArgumentException:

Upload logs
http://jenkins.h2o.local:8080/job/h2o-ai-cloud-tests/job/release-tests/job/environments/job/for_mlops_v0.67.0_and_below/job/mlops%252F0.67.0/25/allure/#suites/7e3daadf797fdaa5207fb79d3cce47ba/bc67e7510347fbd/

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
I strongly think its an issue of backward incompatibility where the parameter force_col_types is unknown to an older h2o3 version

Permalink

def upload_file(path, destination_frame=None, header=0, sep=None, col_names=None, col_types=None,

@valenad1
Copy link
Collaborator

Clients are not backwards compatible. Each h2o version need to use client with the same version. Are you sure that your backend is 3.42.0.4?

The current version is 3.46.0.6. It works there. Nevertheless, we are not supporting 3.42.0.4 anymore.

@valenad1 valenad1 removed the bug label Jan 14, 2025
@valenad1 valenad1 added this to the 3.46.0.7 milestone Jan 14, 2025
@itsmunishbhardwaj
Copy link
Author

thanks! @valenad1.
Upon trying this again with the correct backend, I'm facing a new issue

h2o.exceptions.H2OResponseError: Server error water.exceptions.H2OIllegalArgumentException:
  Error: Unknown parameter: tz_adjust_to_local

I understand that v3.42.0.4 is not supported anymore but I'm afraid we are still selling it to the customers in HAIC 24.11.1 cc @coolsat @JeffreyCanisius04

I wasnt aware of the backwards incompatibility but can we please atleast resolve the issue within the client?

--------------------------  --------------------------------------------------
H2O_cluster_uptime:         11 secs
H2O_cluster_timezone:       Etc/GMT
H2O_data_parsing_timezone:  UTC
H2O_cluster_version:        3.42.0.4
H2O_cluster_version_age:    1 year, 3 months and 12 days
H2O_cluster_name:           test-34204
H2O_cluster_total_nodes:    1
H2O_cluster_free_memory:    3.185 Gb
H2O_cluster_total_cores:    1
H2O_cluster_allowed_cores:  1
H2O_cluster_status:         locked, healthy
H2O_connection_url:         https://steam.mani.qa.h2o.dev:443/proxy/h2o-k8s/63
H2O_connection_proxy:       null
H2O_internal_security:      True
Python_version:             3.12.5 final
--------------------------  --------------------------------------------------
Connected successfully!
trying to upload data now
Traceback (most recent call last):
  File "/Users/munish/code-wars/h2o-34204.py", line 48, in <module>
    data = h2o.upload_file("/Users/munish/code-wars/dummy_car_prices.csv")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/munish/code-wars/h2o-venv/lib/python3.12/site-packages/h2o/h2o.py", line 411, in upload_file
    return H2OFrame()._upload_parse(path, destination_frame, header, sep, col_names, col_types, na_strings, skipped_columns,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/munish/code-wars/h2o-venv/lib/python3.12/site-packages/h2o/frame.py", line 468, in _upload_parse
    self._parse(rawkey, destination_frame, header, sep, column_names, column_types, na_strings, skipped_columns,
  File "/Users/munish/code-wars/h2o-venv/lib/python3.12/site-packages/h2o/frame.py", line 475, in _parse
    setup = h2o.parse_setup(rawkey, destination_frame, header, separator, column_names, column_types, na_strings,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/munish/code-wars/h2o-venv/lib/python3.12/site-packages/h2o/h2o.py", line 858, in parse_setup
    j = api("POST /3/ParseSetup", data=kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/munish/code-wars/h2o-venv/lib/python3.12/site-packages/h2o/h2o.py", line 123, in api
    return h2oconn.request(endpoint, data=data, json=json, filename=filename, save_to=save_to)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/munish/code-wars/h2o-venv/lib/python3.12/site-packages/h2o/backend/connection.py", line 499, in request
    return self._process_response(resp, save_to)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/munish/code-wars/h2o-venv/lib/python3.12/site-packages/h2o/backend/connection.py", line 853, in _process_response
    raise H2OResponseError(data)
h2o.exceptions.H2OResponseError: Server error water.exceptions.H2OIllegalArgumentException:
  Error: Unknown parameter: tz_adjust_to_local
  Request: POST /3/ParseSetup
    data: {'check_header': '0', 'source_frames': '["upload_a06f437c611391fa91670c93f7404290"]', 'single_quotes': 'False', 'tz_adjust_to_local': 'False'}

Closing connection _sid_bd65 at exit
H2O session _sid_bd65 closed.

@valenad1
Copy link
Collaborator

It seems, that you still have a wrong client. tz_adjust_to_local was added in 3.46.0.6

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

No branches or pull requests

4 participants