Skip to content

Commit

Permalink
asfd
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Jan 15, 2025
1 parent ad0ebc1 commit 515b81b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
21 changes: 21 additions & 0 deletions python/interpret-core/interpret/glassbox/_ebm/_ebm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,15 @@ def fit(self, X, y, sample_weight=None, bags=None, init_score=None):
# put init_score into the native shared dataframe
init_score_local = init_score_local[bag != 0]

import sys
sys.stderr.write(" paul ")
sys.stderr.write(str(sum(dataset) % 256))
sys.stderr.write(" eats ")
sys.stderr.write(str(sum(rngs[idx]) % 256))
sys.stderr.write(" worms ")
sys.stderr.write(str(sum(bagged_intercept[idx])))
sys.stderr.write(" tonight ")

parallel_args.append(
(
dataset,
Expand Down Expand Up @@ -1143,6 +1152,18 @@ def fit(self, X, y, sample_weight=None, bags=None, init_score=None):
# retrieve our rng state since this was used outside of our process
rngs.append(bagged_rng)


import sys
sys.stderr.write(" peter ")
sys.stderr.write(str(intercept_update))
sys.stderr.write(" asfdasdf ")
sys.stderr.write(str(sum(np.sum(m) for m in model)))
sys.stderr.write(" mmmm ")
sys.stderr.write(str(bag_best_iteration))
sys.stderr.write(" never ")
sys.stderr.write(str(sum(bagged_rng) % 256))


while True: # this isn't for looping. Just for break statements to exit
if interactions is None:
break
Expand Down
10 changes: 5 additions & 5 deletions python/interpret-core/tests/glassbox/ebm/test_ebm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,9 +1245,9 @@ def test_replicatability_classification():
break


@pytest.mark.skip(
reason="Fails on mac. Need to work on getting cross platform identical results."
)
# @pytest.mark.skip(
# reason="Fails on mac. Need to work on getting cross platform identical results."
# )
def test_identical_classification():
from interpret.develop import get_option, set_option

Expand All @@ -1264,14 +1264,14 @@ def test_identical_classification():
seed += 1

ebm = ExplainableBoostingClassifier(
names, types, random_state=seed, max_rounds=10
names, types, random_state=seed, max_rounds=10, interactions=0, outer_bags=1, n_jobs=1
)
ebm.fit(X, y)

pred = ebm.eval_terms(X)
total += np.sum(pred)

expected = 2.220446049250313e-15
expected = 99.0
if total != expected:
assert total == expected
break
Expand Down

0 comments on commit 515b81b

Please sign in to comment.