kamangir commited on
Commit
9d4d402
1 Parent(s): fc0b387

validating image_classifier - kamangir/bolt#689

Browse files
abcli/fashion_mnist.sh CHANGED
@@ -1,6 +1,10 @@
1
  #! /usr/bin/env bash
2
 
3
  function fashion_mnist() {
 
 
 
 
4
  local task=$(abcli_unpack_keyword $1 help)
5
 
6
  if [ $task == "help" ] ; then
@@ -19,7 +23,7 @@ function fashion_mnist() {
19
  fi
20
 
21
  if [ "$task" == "ingest" ] ; then
22
- python3 -m fashion_mnist \
23
  ingest \
24
  --output_path $abcli_object_path \
25
  ${@:2}
@@ -48,8 +52,4 @@ function fashion_mnist() {
48
  fi
49
 
50
  abcli_log_error "-fashion_mnist: $task: command not found."
51
- }
52
-
53
- function abcli_fashion_mnist() {
54
- fashion_mnist $@
55
  }
 
1
  #! /usr/bin/env bash
2
 
3
  function fashion_mnist() {
4
+ abcli_fashion_mnist $@
5
+ }
6
+
7
+ function abcli_fashion_mnist() {
8
  local task=$(abcli_unpack_keyword $1 help)
9
 
10
  if [ $task == "help" ] ; then
 
23
  fi
24
 
25
  if [ "$task" == "ingest" ] ; then
26
+ python3 -m image_classifier.fashion_mnist \
27
  ingest \
28
  --output_path $abcli_object_path \
29
  ${@:2}
 
52
  fi
53
 
54
  abcli_log_error "-fashion_mnist: $task: command not found."
 
 
 
 
55
  }
abcli/image_classifier.sh CHANGED
@@ -1,5 +1,9 @@
1
  #! /usr/bin/env bash
2
 
 
 
 
 
3
  function abcli_image_classifier() {
4
  local task=$(abcli_unpack_keyword "$1" help)
5
 
@@ -27,7 +31,7 @@ function abcli_image_classifier() {
27
 
28
  abcli_download $model_object_name
29
 
30
- python3 -m fashion_mnist.image_classifier \
31
  describe \
32
  --model_path $abcli_object_root/$model_object_name \
33
  ${@:3}
@@ -48,7 +52,7 @@ function abcli_image_classifier_predict() {
48
  abcli_log "image_classifier($model_object).predict($data_object)"
49
 
50
  if [ ! -f "$abcli_object_root/$data_object/test_images.pyndarray" ] ; then
51
- python3 -m fashion_mnist.image_classifier \
52
  preprocess \
53
  --infer_annotation 0 \
54
  --model_path $abcli_object_root/$model_object \
@@ -61,7 +65,7 @@ function abcli_image_classifier_predict() {
61
  cp -v ../$data_object/*.pyndarray .
62
  cp -v ../$model_object/class_names.json .
63
 
64
- python3 -m fashion_mnist.image_classifier \
65
  predict \
66
  --data_path $abcli_object_root/$data_object \
67
  --model_path $abcli_object_root/$model_object \
@@ -84,7 +88,7 @@ function abcli_image_classifier_train() {
84
  local extra_args="--epochs 2"
85
  fi
86
 
87
- python3 -m fashion_mnist.image_classifier \
88
  train \
89
  --color $do_color \
90
  --convnet $do_convnet \
 
1
  #! /usr/bin/env bash
2
 
3
+ function image_classifier() {
4
+ abcli_image_classifier $@
5
+ }
6
+
7
  function abcli_image_classifier() {
8
  local task=$(abcli_unpack_keyword "$1" help)
9
 
 
31
 
32
  abcli_download $model_object_name
33
 
34
+ python3 -m image_classifier \
35
  describe \
36
  --model_path $abcli_object_root/$model_object_name \
37
  ${@:3}
 
52
  abcli_log "image_classifier($model_object).predict($data_object)"
53
 
54
  if [ ! -f "$abcli_object_root/$data_object/test_images.pyndarray" ] ; then
55
+ python3 -m image_classifier \
56
  preprocess \
57
  --infer_annotation 0 \
58
  --model_path $abcli_object_root/$model_object \
 
65
  cp -v ../$data_object/*.pyndarray .
66
  cp -v ../$model_object/class_names.json .
67
 
68
+ python3 -m image_classifier \
69
  predict \
70
  --data_path $abcli_object_root/$data_object \
71
  --model_path $abcli_object_root/$model_object \
 
88
  local extra_args="--epochs 2"
89
  fi
90
 
91
+ python3 -m image_classifier \
92
  train \
93
  --color $do_color \
94
  --convnet $do_convnet \
image_classifier/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
  name = "image_classifier"
2
 
3
- version = "1.1.39"
4
 
5
  description = "fashion-mnist + hugging-face + awesome-bash-cli"
 
1
  name = "image_classifier"
2
 
3
+ version = "1.1.43"
4
 
5
  description = "fashion-mnist + hugging-face + awesome-bash-cli"
setup.py CHANGED
@@ -1,6 +1,6 @@
1
  from setuptools import setup
2
 
3
- from fashion_mnist import *
4
 
5
  setup(
6
  name=name,
 
1
  from setuptools import setup
2
 
3
+ from image_classifier import *
4
 
5
  setup(
6
  name=name,