Skip to content

Commit

Permalink
Exception for providing Experiment instead of Run (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raalsky committed Jul 6, 2021
1 parent 1e18cf3 commit 64a3f4e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## neptune-xgboost 0.9.11

### Features
- Mechanism to prevent using legacy Experiments in new-API integrations ([#5](https://github.com/neptune-ai/neptune-xgboost/pull/5))
7 changes: 5 additions & 2 deletions neptune_xgboost/impl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@
from neptune_xgboost import __version__

try:
# neptune-client=0.9.0 package structure
# neptune-client=0.9.0+ package structure
import neptune.new as neptune
from neptune.new.internal.utils import verify_type
from neptune.new.internal.utils.compatibility import expect_not_an_experiment
except ImportError:
# neptune-client=1.0.0 package structure
# neptune-client>=1.0.0 package structure
import neptune
from neptune.internal.utils import verify_type
from neptune.internal.utils.compatibility import expect_not_an_experiment

INTEGRATION_VERSION_KEY = "source_code/integrations/neptune-xgboost"

Expand Down Expand Up @@ -163,6 +165,7 @@ def __init__(self,
log_tree=None,
tree_figsize=30):

expect_not_an_experiment(run)
verify_type("run", run, neptune.Run)
verify_type("base_namespace", base_namespace, str)
log_model is not None and verify_type("log_model", log_model, bool)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def main():
all_deps += extras[group_name]
extras['all'] = all_deps

base_libs = ['neptune-client>=0.9.8', 'xgboost>=1.3.0', 'matplotlib', 'graphviz']
base_libs = ['neptune-client>=0.10.0', 'xgboost>=1.3.0', 'matplotlib', 'graphviz']

version = None
if os.path.exists('PKG-INFO'):
Expand Down

0 comments on commit 64a3f4e

Please sign in to comment.