Skip to content

Commit 7be599d

Browse files
committed
Fail early for custom model on requirements and model
1 parent 51f311e commit 7be599d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [0.2.0a1]
99

1010
### Fixed
1111

12-
* Fail early if `custom_model_code` or `dependent_dir` are `None` when model type is `ModelType.custom`.
12+
* Fail early if `custom_model_code`, `dependent_dir` or `requirements_txt_file` are `None` when model type is `ModelType.custom`.
13+
* Fail early if `model` is not `None` when model type is `ModelType.custom`.
1314

1415
## [0.2.0a0]
1516

unboxapi/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ def add_model(
317317
assert (
318318
dependent_dir is not None
319319
), "Must specify dependent_dir when using ModelType.custom"
320+
assert (
321+
requirements_txt_file is not None
322+
), "Must specify requirements_txt_file when using ModelType.custom"
323+
assert model is None, "model must be None when using ModelType.custom"
320324
if task_type in [TaskType.TabularClassification, TaskType.TabularRegression]:
321325
required_fields = [
322326
(feature_names, "feature_names"),

0 commit comments

Comments
 (0)