From 77ebf847fa86d69264e8a889bf189e738884df8d Mon Sep 17 00:00:00 2001 From: Aleksander Wojnarowicz Date: Fri, 31 Mar 2023 18:20:57 +0200 Subject: [PATCH 1/8] downgrade pytest --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2a775e5..1c88b19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ graphviz = "*" # dev pre-commit = { version = "*", optional = true } -pytest = { version = ">=5.0", optional = true } +pytest = { version = ">=4.0", optional = true } pytest-cov = { version = "2.10.1", optional = true } neptune = { version = ">=1.0.0", optional = true } From a501b79ed39c0a28da9e462e5cc0373856b9a60d Mon Sep 17 00:00:00 2001 From: Aleksander Wojnarowicz Date: Fri, 31 Mar 2023 18:35:11 +0200 Subject: [PATCH 2/8] try with pytest flag --- .github/actions/e2e/action.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/e2e/action.yml b/.github/actions/e2e/action.yml index fc90780..dce6ca2 100644 --- a/.github/actions/e2e/action.yml +++ b/.github/actions/e2e/action.yml @@ -33,5 +33,5 @@ runs: - name: Run tests working-directory: ${{ inputs.working_directory }} - run: pytest -v + run: pytest -v -p no:faulthandler shell: bash diff --git a/pyproject.toml b/pyproject.toml index 1c88b19..2a775e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ graphviz = "*" # dev pre-commit = { version = "*", optional = true } -pytest = { version = ">=4.0", optional = true } +pytest = { version = ">=5.0", optional = true } pytest-cov = { version = "2.10.1", optional = true } neptune = { version = ">=1.0.0", optional = true } From c47bb84d9bab71139875b8881eb4dc6878d4aba0 Mon Sep 17 00:00:00 2001 From: Aleksander Wojnarowicz Date: Tue, 4 Apr 2023 17:07:43 +0200 Subject: [PATCH 3/8] apply code review suggestions --- .github/actions/e2e/action.yml | 2 +- pyproject.toml | 3 +++ src/neptune_xgboost/impl/__init__.py | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/actions/e2e/action.yml b/.github/actions/e2e/action.yml index dce6ca2..fc90780 100644 --- a/.github/actions/e2e/action.yml +++ b/.github/actions/e2e/action.yml @@ -33,5 +33,5 @@ runs: - name: Run tests working-directory: ${{ inputs.working_directory }} - run: pytest -v -p no:faulthandler + run: pytest -v shell: bash diff --git a/pyproject.toml b/pyproject.toml index 2a775e5..02cc617 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,3 +97,6 @@ force_grid_wrap = 2 [tool.flake8] max-line-length = 120 extend-ignore = "E203" + +[tool.pytest.ini_options] +addopts = "--no-faulthandler" diff --git a/src/neptune_xgboost/impl/__init__.py b/src/neptune_xgboost/impl/__init__.py index 24d8c43..1c3132d 100644 --- a/src/neptune_xgboost/impl/__init__.py +++ b/src/neptune_xgboost/impl/__init__.py @@ -26,7 +26,10 @@ import matplotlib.pyplot as plt import xgboost as xgb -from matplotlib import image +from matplotlib import ( + image, + use, +) try: # neptune-client>=1.0.0 package structure @@ -104,7 +107,7 @@ def __init__( log_tree=None, tree_figsize=30, ): - + use("Agg") expect_not_an_experiment(run) verify_type("run", run, (Run, Handler)) verify_type("base_namespace", base_namespace, str) From 4681fd807de7dc51084f92fd5cb5fffdb308c93a Mon Sep 17 00:00:00 2001 From: Aleksander Wojnarowicz Date: Tue, 4 Apr 2023 17:16:20 +0200 Subject: [PATCH 4/8] fix pytest option --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 02cc617..f29dad1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,4 +99,4 @@ max-line-length = 120 extend-ignore = "E203" [tool.pytest.ini_options] -addopts = "--no-faulthandler" +addopts = "-p no:faulthandler" From 96d8e1bac5bc1f4c738b1f1ce83d49d2d5c1c23c Mon Sep 17 00:00:00 2001 From: Aleksander Wojnarowicz Date: Tue, 4 Apr 2023 17:27:58 +0200 Subject: [PATCH 5/8] move use(Agg) to e2e tests --- src/neptune_xgboost/impl/__init__.py | 6 +----- tests/test_e2e.py | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/neptune_xgboost/impl/__init__.py b/src/neptune_xgboost/impl/__init__.py index 1c3132d..f350219 100644 --- a/src/neptune_xgboost/impl/__init__.py +++ b/src/neptune_xgboost/impl/__init__.py @@ -26,10 +26,7 @@ import matplotlib.pyplot as plt import xgboost as xgb -from matplotlib import ( - image, - use, -) +from matplotlib import image try: # neptune-client>=1.0.0 package structure @@ -107,7 +104,6 @@ def __init__( log_tree=None, tree_figsize=30, ): - use("Agg") expect_not_an_experiment(run) verify_type("run", run, (Run, Handler)) verify_type("base_namespace", base_namespace, str) diff --git a/tests/test_e2e.py b/tests/test_e2e.py index 88e4393..433148a 100644 --- a/tests/test_e2e.py +++ b/tests/test_e2e.py @@ -1,5 +1,6 @@ import pytest import xgboost as xgb +from matplotlib import use from neptune.new.integrations.xgboost import NeptuneCallback try: @@ -12,6 +13,8 @@ @pytest.mark.parametrize("log_tree", [None, [0, 1, 2, 3]]) def test_e2e(dataset, log_tree): + use("Agg") + # Start a run run = init_run() From 42b13f17c96be3a3db7a753ea268095b7687edee Mon Sep 17 00:00:00 2001 From: Aleksander Wojnarowicz Date: Wed, 5 Apr 2023 13:39:18 +0200 Subject: [PATCH 6/8] check if pytest option is neccessary --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f29dad1..3694548 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,5 +98,5 @@ force_grid_wrap = 2 max-line-length = 120 extend-ignore = "E203" -[tool.pytest.ini_options] -addopts = "-p no:faulthandler" +#[tool.pytest.ini_options] +#addopts = "-p no:faulthandler" From 5aaa317556e6c5a7f6562982b8c466338a3aea04 Mon Sep 17 00:00:00 2001 From: Patrycja-J <97611089+Patrycja-J@users.noreply.github.com> Date: Mon, 14 Aug 2023 18:23:37 +0200 Subject: [PATCH 7/8] Update README.md --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 63fcfbf..3b83cba 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ # Neptune + XGBoost integration -Experiment tracking, model registry, data versioning, and live model monitoring for XGBoost trained models. +Experiment tracking for XGBoost-trained models. ## What will you get with this integration? -* Log, display, organize, and compare ML experiments in a single place -* Version, store, manage, and query trained models, and model building metadata -* Record and monitor model training, evaluation, or production runs live +* Log, organize, visualize, and compare ML experiments in a single place +* Monitor model training live +* Version and query production-ready models and associated metadata (e.g., datasets) +* Collaborate with the team and across the organization ## What will be logged to Neptune? @@ -20,9 +21,7 @@ Experiment tracking, model registry, data versioning, and live model monitoring * training code and Git commit information, * [other metadata](https://docs.neptune.ai/logging/what_you_can_log) -![image](https://user-images.githubusercontent.com/97611089/160614588-5d839a11-e2f9-4eed-a3d1-39314ebdb1ea.png) -*Example dashboard with train-valid metrics and selected parameters* - +![image](https://docs.neptune.ai/img/app/integrations/xgboost.png) ## Resources From 36c7955dae9d9b7687da9851685646901299b784 Mon Sep 17 00:00:00 2001 From: Sabine Date: Thu, 14 Sep 2023 09:34:08 +0300 Subject: [PATCH 8/8] make graphviz error more helpful --- src/neptune_xgboost/impl/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/neptune_xgboost/impl/__init__.py b/src/neptune_xgboost/impl/__init__.py index f350219..784fd06 100644 --- a/src/neptune_xgboost/impl/__init__.py +++ b/src/neptune_xgboost/impl/__init__.py @@ -128,7 +128,9 @@ def __init__( self.log_tree = None message = ( "Graphviz executables not found, so trees will not be logged. " - "Make sure the Graphviz executables are on your systems' PATH" + "Make sure the Graphviz executables are on your systems' PATH. " + "Note that you need to have both the Graphviz software and the Python interface installed. " + "For installation details, see the integration docs: https://docs.neptune.ai/integrations/xgboost/" ) warnings.warn(message)