Skip to content
Merged
Prev Previous commit
Next Next commit
address some comments
  • Loading branch information
1vn committed Jul 5, 2019
commit 86ecdbf8b79c31f4e25a7acdeafd22b2d221a76d
2 changes: 2 additions & 0 deletions examples/models/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tensorflow
sklearn
9 changes: 8 additions & 1 deletion pkg/workloads/tf_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,14 @@ def valid_model_dir(model_dir):
"""
version = os.listdir(model_dir)[0]
if not version.isdigit():
raise UserException("No versions of servable default found under base path in model_dir")
raise UserException(
"No versions of servable default found under base path in model_dir. See docs.cortex.dev for how to properly package your TensorFlow model"
)

if "saved_model.pb" not in os.listdir(os.path.join(model_dir, version)):
raise UserException(
"Expected packaged model to have a \"saved_model.pb\" file. See docs.cortex.dev for how to properly package your TensorFlow model"
)


def start(args):
Expand Down