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

Spark tests fail with AttributeError: 'pyarrow.lib.Schema' object has no attribute 'to_arrow_schema' #3829

Closed
maxhgerlach opened this issue Jan 27, 2023 · 0 comments · Fixed by #3830
Labels

Comments

@maxhgerlach
Copy link
Collaborator

Spark tests fail with

Traceback (most recent call last):
  File "/horovod/examples/spark/pytorch/pytorch_spark_mnist.py", line 122, in <module>
    torch_model = torch_estimator.fit(train_df).setOutputCols(['label_prob'])
  File "/usr/local/lib/python3.8/dist-packages/horovod/spark/common/estimator.py", line 35, in fit
    return super(HorovodEstimator, self).fit(df, params)
  File "/usr/local/lib/python3.8/dist-packages/pyspark/ml/base.py", line 205, in fit
    return self._fit(dataset)
  File "/usr/local/lib/python3.8/dist-packages/horovod/spark/common/estimator.py", line 68, in _fit
    with util.prepare_data(backend.num_processes(),
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.8/dist-packages/horovod/spark/common/util.py", line 735, in prepare_data
    dataset_idx = _get_or_create_dataset(key, store, df, feature_columns, label_columns,
  File "/usr/local/lib/python3.8/dist-packages/horovod/spark/common/util.py", line 672, in _get_or_create_dataset
    train_rows, val_rows, pq_metadata, avg_row_size = get_simple_meta_from_parquet(
  File "/usr/local/lib/python3.8/dist-packages/horovod/spark/common/util.py", line 495, in get_simple_meta_from_parquet
    train_data_schema = train_data.schema.to_arrow_schema()
AttributeError: 'pyarrow.lib.Schema' object has no attribute 'to_arrow_schema'

https://github.com/horovod/horovod/actions/runs/4025636527/jobs/6919132641

It's probably related to the 11.0 release of pyarrow. https://pypi.org/project/pyarrow/#history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant