Skip to content

Commit

Permalink
Revert "debug"
Browse files Browse the repository at this point in the history
This reverts commit 537283a.
  • Loading branch information
mshr-h committed Jan 9, 2024
1 parent 537283a commit a840ca6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
# We don't run pytest for Linux py3.8 since we do coverage for that case.
- name: Test with pytest
if: ${{ matrix.python-version != '3.8' || startsWith(matrix.os, 'ubuntu') != true }}
run: pytest -k test_extra_trees_tvm_tree_trav_regressor_converter -s
run: pytest -v
# Run and push coverage only for Linux py3.8
- name: Coverage 3.8 Linux
if: ${{ matrix.python-version == '3.8' && startsWith(matrix.os, 'ubuntu') }}
Expand Down
3 changes: 0 additions & 3 deletions tests/test_sklearn_decision_tree_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,13 @@ def test_random_forest_perf_tree_trav_classifier_shifted_labels_converter(self):
def _run_tree_regressor_converter(self, model_type, num_classes, backend="torch", extra_config={}, **kwargs):
warnings.filterwarnings("ignore")
for max_depth in [1, 3, 8, 10, 12, None]:
print(f"max_depth: {max_depth}")
model = model_type(max_depth=max_depth, **kwargs)
np.random.seed(0)
X = np.random.rand(100, 200)
X = np.array(X, dtype=np.float32)
y = np.random.randint(num_classes, size=100)

print(" start training on skl")
model.fit(X, y)
print(" convert skl model with HB")
torch_model = hummingbird.ml.convert(model, backend, X, extra_config=extra_config)
self.assertIsNotNone(torch_model)
np.testing.assert_allclose(model.predict(X), torch_model.predict(X), rtol=1e-06, atol=1e-06)
Expand Down

0 comments on commit a840ca6

Please sign in to comment.