File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,11 @@ def make_algorithm_config_response(
108
108
109
109
def make_pipeline_config_response (
110
110
Classifier : type [APIMothClassifier ],
111
+ slug : str ,
111
112
) -> PipelineConfigResponse :
113
+ """
114
+ Create a configuration for an entire pipeline, given a species classifier class.
115
+ """
112
116
detector = APIMothDetector (
113
117
source_images = [],
114
118
)
@@ -128,7 +132,7 @@ def make_pipeline_config_response(
128
132
129
133
return PipelineConfigResponse (
130
134
name = classifier .name ,
131
- slug = classifier . get_key () ,
135
+ slug = slug ,
132
136
description = classifier .description ,
133
137
version = 1 ,
134
138
algorithms = [
@@ -141,8 +145,8 @@ def make_pipeline_config_response(
141
145
142
146
# @TODO This requires loading all models into memory! Can we avoid this?
143
147
PIPELINE_CONFIGS = [
144
- make_pipeline_config_response (classifier_class )
145
- for classifier_class in CLASSIFIER_CHOICES .values ()
148
+ make_pipeline_config_response (classifier_class , slug = key )
149
+ for key , classifier_class in CLASSIFIER_CHOICES .items ()
146
150
]
147
151
148
152
You can’t perform that action at this time.
0 commit comments