Skip to content

Commit

Permalink
fix: add preds_mapper to pretraining
Browse files Browse the repository at this point in the history
Also include the pretraining notebook to the circleci config
so that it is tested on every pull request.
  • Loading branch information
eduardocarvp committed Jan 28, 2021
1 parent eeca3e8 commit 76f2c85
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 9 deletions.
25 changes: 22 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,20 @@ jobs:
shell: bash -leo pipefail
command: |
make test-nb-customization
test-nb-pretraining:
executor: python-executor
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "poetry.lock" }}
- install_poetry
- run:
name: run test-nb-pretraining
shell: bash -leo pipefail
command: |
make test-nb-pretraining
workflows:
version: 2
CI-tabnet:
Expand All @@ -200,8 +213,14 @@ workflows:
requires:
- install
- test-nb-multi-task:
requires:
- install
requires:
- install
- test-nb-customization:
requires:
- install
- test-nb-pretraining:
requires:
- install
- lint-code:
requires:
- install
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,31 @@ doc: build ## Build and generate docs

test-nb-census: ## run census income tests using notebooks
$(MAKE) _run_notebook NB_FILE="./census_example.ipynb"
.PHONY: test-obfuscator
.PHONY: test-nb-census

test-nb-forest: ## run census income tests using notebooks
$(MAKE) _run_notebook NB_FILE="./forest_example.ipynb"
.PHONY: test-obfuscator
.PHONY: test-nb-forest

test-nb-regression: ## run regression example tests using notebooks
$(MAKE) _run_notebook NB_FILE="./regression_example.ipynb"
.PHONY: test-obfuscator
.PHONY: test-nb-regression

test-nb-multi-regression: ## run multi regression example tests using notebooks
$(MAKE) _run_notebook NB_FILE="./multi_regression_example.ipynb"
.PHONY: test-obfuscator
.PHONY: test-nb-multi-regression

test-nb-multi-task: ## run multi task classification example tests using notebooks
$(MAKE) _run_notebook NB_FILE="./multi_task_example.ipynb"
.PHONY: test-obfuscator
.PHONY: test-nb-multi-task

test-nb-customization: ## run customization example tests using notebooks
$(MAKE) _run_notebook NB_FILE="./customizing_example.ipynb"
.PHONY: test-obfuscator
.PHONY: test-nb-customization

test-nb-pretraining: ## run customization example tests using notebooks
$(MAKE) _run_notebook NB_FILE="./pretraining_example.ipynb"
.PHONY: test-nb-pretraining

help: ## Display help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Expand Down
1 change: 1 addition & 0 deletions pytorch_tabnet/pretraining.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def update_fit_params(
):
self.updated_weights = weights
filter_weights(self.updated_weights)
self.preds_mapper = None

def fit(
self,
Expand Down

0 comments on commit 76f2c85

Please sign in to comment.