Skip to content

Commit d221fce

Browse files
goatrocksmeghanhickeynkassis
authored
[CAT-151] v5.0 (#137)
* stash * remove valid actions for now * Update workflow.py * args * ??? * model training opts * update * move "wait" from create model group to get model group * Update indico/queries/workflow.py Co-authored-by: meghanhickey <[email protected]> * Update indico/types/model_group.py Co-authored-by: meghanhickey <[email protected]> * fix tests and also deprecte an option we don't use * redirect queries * push questionnaire changes * update workflow examples * update docs * refactor for adding different components * handle model_training_options correctly * filter content * linked label component * use enums, add extra examples * Add all submissions option and submission id to document report (#146) * pluggable ocr dataset options (#148) * API token can be set with env variables (#147) Co-authored-by: meghanhickey <[email protected]> Co-authored-by: Nicolas Kassis <[email protected]>
1 parent ffdd5dc commit d221fce

File tree

87 files changed

+8099
-1813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+8099
-1813
lines changed

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 0f592c025ef0c8ba0f16b9350bad66ff
3+
config: c5cbe4a7624d7549079e7846d28d9da6
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_sources/model_groups.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Model Groups
33

44
.. automodule:: indico.queries.model_groups
55
.. autoclass:: indico.queries.model_groups.CreateModelGroup
6+
.. autoclass:: indico.queries.model_groups.AddModelGroupComponent
67
.. autoclass:: indico.queries.model_groups.ModelGroupPredict
78
.. autoclass:: indico.queries.model_groups.GetModelGroup
89
.. autoclass:: indico.queries.model_groups.GetModelGroupSelectedModelStatus

docs/_sources/object-detection.rst.txt

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Uploading your Dataset and Training your Model
3535
==============================================
3636

3737
With your object detection labels in a CSV alongside either the URL to each image or the local
38-
path to the image on your computer, you can create your dataset via the API::
38+
path to the image on your computer, you can create your dataset and workflow via the API::
3939

4040
from indico.queries import CreateDataset
4141

@@ -52,6 +52,10 @@ path to the image on your computer, you can create your dataset via the API::
5252
For the "files" parameter provide the path to your CSV and for the "image_filename_col" parameter
5353
provide the column name containing the paths/urls of your images.
5454

55+
Next, create a workflow under which your model will live::
56+
57+
new_workflow = client.call(CreateWorkflow(name="Name of your workflow", dataset_id=dataset.id))
58+
5559
To train your model, you can use the parameters you see below and the dataset object
5660
we created above::
5761

@@ -63,17 +67,18 @@ we created above::
6367
"test_size": 0.0,
6468
"use_small_model": False,
6569
}
66-
67-
model_group = client.call(
68-
CreateModelGroup(
69-
name="My Model",
70-
dataset_id=dataset.id,
71-
source_column_id=dataset.datacolumn_by_name("urls").id,
72-
labelset_id=dataset.labelset_by_name("label").id,
73-
model_training_options=model_training_options,
74-
wait=wait,
75-
)
70+
after_component_id = new_workflow.component_by_type("INPUT_IMAGE").id
71+
create_model_request = AddModelGroupComponent(
72+
name=workflow_name,
73+
dataset_id=dataset.id,
74+
after_component_id=after_component_id,
75+
source_column_id=dataset.datacolumn_by_name("urls").id,
76+
labelset_column_id=dataset.labelset_by_name("label").id,
77+
workflow_id=new_workflow.id,
78+
model_training_options = model_training_options
7679
)
80+
client.call(create_model_request)
81+
7782

7883
In the code above, the "labelset_id" should be the CSV column name containing your bounding box labels
7984
(in the example above, we named the column "label"). The column "urls" will be automatically created

docs/_static/basic.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -731,9 +731,8 @@ dl.glossary dt {
731731

732732
.classifier:before {
733733
font-style: normal;
734-
margin: 0 0.5em;
734+
margin: 0.5em;
735735
content: ":";
736-
display: inline-block;
737736
}
738737

739738
abbr, acronym {
@@ -820,7 +819,7 @@ div.code-block-caption code {
820819

821820
table.highlighttable td.linenos,
822821
span.linenos,
823-
div.highlight span.gp { /* gp: Generic.Prompt */
822+
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
824823
user-select: none;
825824
-webkit-user-select: text; /* Safari fallback only */
826825
-webkit-user-select: none; /* Chrome/Safari */

docs/_static/css/theme.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_static/doctools.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,12 @@ var Documentation = {
301301
window.location.href = prevHref;
302302
return false;
303303
}
304-
break;
305304
case 39: // right
306305
var nextHref = $('link[rel="next"]').prop('href');
307306
if (nextHref) {
308307
window.location.href = nextHref;
309308
return false;
310309
}
311-
break;
312310
}
313311
}
314312
});

docs/_static/js/theme.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_static/searchtools.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,7 @@ var Search = {
282282
complete: function(jqxhr, textstatus) {
283283
var data = jqxhr.responseText;
284284
if (data !== '' && data !== undefined) {
285-
var summary = Search.makeSearchSummary(data, searchterms, hlterms);
286-
if (summary) {
287-
listItem.append(summary);
288-
}
285+
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
289286
}
290287
Search.output.append(listItem);
291288
setTimeout(function() {
@@ -328,9 +325,7 @@ var Search = {
328325
var results = [];
329326

330327
for (var prefix in objects) {
331-
for (var iMatch = 0; iMatch != objects[prefix].length; ++iMatch) {
332-
var match = objects[prefix][iMatch];
333-
var name = match[4];
328+
for (var name in objects[prefix]) {
334329
var fullname = (prefix ? prefix + '.' : '') + name;
335330
var fullnameLower = fullname.toLowerCase()
336331
if (fullnameLower.indexOf(object) > -1) {
@@ -344,6 +339,7 @@ var Search = {
344339
} else if (parts[parts.length - 1].indexOf(object) > -1) {
345340
score += Scorer.objPartialMatch;
346341
}
342+
var match = objects[prefix][name];
347343
var objname = objnames[match[1]][2];
348344
var title = titles[match[0]];
349345
// If more than one term searched for, we require other words to be
@@ -502,9 +498,6 @@ var Search = {
502498
*/
503499
makeSearchSummary : function(htmlText, keywords, hlwords) {
504500
var text = Search.htmlToText(htmlText);
505-
if (text == "") {
506-
return null;
507-
}
508501
var textLower = text.toLowerCase();
509502
var start = 0;
510503
$.each(keywords, function() {

docs/_static/underscore.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)