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

More in-memory input support for column split #9685

Merged
merged 13 commits into from
Oct 20, 2023

Conversation

rongou
Copy link
Contributor

@rongou rongou commented Oct 17, 2023

  • test loading from uri
  • test pandas
  • catch exceptions when running worker functions in a thread
  • reformatted test_dmatrix.py and test_with_pandas.py with black

@rongou rongou changed the title [WIP] More in-memory input support for column split More in-memory input support for column split Oct 19, 2023
@@ -101,6 +100,7 @@ def test_arrow_survival(self):
np.testing.assert_equal(y_np_low, y_lower_bound.to_pandas().values)


@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows")
Copy link
Member

Choose a reason for hiding this comment

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

Consider creating a function in python_package/xgboost/testing/__init__.py as def is_win.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -943,12 +944,17 @@ def project_root(path: str) -> str:


def run_with_rabit(world_size: int, test_fn: Callable) -> None:
tracker = RabitTracker(host_ip="127.0.0.1", n_workers=world_size)
tracker.start(world_size)
exception_queue: queue.Queue = queue.Queue()
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a lock here? Or GIL is handling it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Queue itself is synchronized. https://docs.python.org/3/library/queue.html

@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows")
class TestPandasColumnSplit:
@staticmethod
def verify_pandas():
Copy link
Member

Choose a reason for hiding this comment

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

Any chance we can reuse the pandas test instead of copying the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@trivialfis trivialfis merged commit 6fbe624 into dmlc:master Oct 20, 2023
21 checks passed
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.

2 participants