Skip to content

Desktop Using Trained Pipelines#550

Merged
BryonLewis merged 8 commits into
masterfrom
DIVE/desktop-trainedpipelines
Feb 1, 2021
Merged

Desktop Using Trained Pipelines#550
BryonLewis merged 8 commits into
masterfrom
DIVE/desktop-trainedpipelines

Conversation

@BryonLewis
Copy link
Copy Markdown
Collaborator

@BryonLewis BryonLewis commented Jan 28, 2021

Pipeline outputs follow the way the web is done with a {type}.pipe file and a .zip file that are moved into a folder in the DIVE_Pipelines. This folder is spread onto the pipeline object with the category of 'trained' when the pipeline list is requested.

  • After a pipeline is complete it will check the job folder for a category_models folder and then check the contents for the [type].pipe file. Then it will move that into the DIVE_Pipelines directory.
  • Modified the exit function for training to include some errors if it can't find the .pipe file or directory. I wish I knew a bit more about what is expected in there for the different training configurations.

Question:

  • Let me know if you think it should be a JSON file indexed with trained pipeline folder instead of utilizing the folder names. The one nice thing about folder names is that if a user wants to import or delete pipelines right now they can do it by going to the folder and either adding or removing the folder.

Note:
This has had the basic train_netharn_cascade.viame_csv.conf testing process done on it.

Future PRs:

  • Deletion of trained pipelines through an interface. I don't know if this lives in "Training" or somewhere else but it may be nice to do that.
  • As an aside to the above I think I want to implement dataset deletion from the recents folder
  • Importing trained pipelines from the web to the desktop version (I've tested this manually by moving the files into a proper folder and it works well at least for train_netharn_cascade.viame_csv.conf pipelines). This could be done in a few ways:
    • I think either having them provide a folder and giving it a name and it moves/copies the items to that directory after some basic checking to make sure there is a .pipe and other data
    • Allowing a zip file to be uploaded and we use something like jszip or other utilities to check it.
    • Advanced?? - we provide them with a link directly to the folder and let them add/remove files. Obviously this has the potential for allowing to break stuff as well.

@BryonLewis BryonLewis marked this pull request as ready for review January 31, 2021 22:35
@BryonLewis BryonLewis changed the title WIP Desktop Using Trained Pipelines Desktop Using Trained Pipelines Feb 1, 2021
@BryonLewis BryonLewis linked an issue Feb 1, 2021 that may be closed by this pull request
@BryonLewis BryonLewis requested a review from subdavis February 1, 2021 15:44
@subdavis
Copy link
Copy Markdown
Contributor

subdavis commented Feb 1, 2021

Looks like u got some conflicts.

Copy link
Copy Markdown
Contributor

@subdavis subdavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor thing. This looks great!

Comment on lines +23 to +33
const trainedPipelines = computed(() => {
const list: string[] = [];
Object.entries(unsortedPipelines.value).forEach(([, category]) => {
category.pipes.forEach((pipe) => {
if (pipe.type === 'trained') {
list.push(pipe.name);
}
});
});
return list;
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const trainedPipelines = computed(() => {
const list: string[] = [];
Object.entries(unsortedPipelines.value).forEach(([, category]) => {
category.pipes.forEach((pipe) => {
if (pipe.type === 'trained') {
list.push(pipe.name);
}
});
});
return list;
});
const trainedPipelines = computed(() => {
return unsortedPipelines.value.trained || [];
});

Untested, but doesn't this work? The pipes are already divided by category. You don't need to check their type, that's just a convenience of the schema.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be slightly changed because I'm using an includes on an array and trained is an Category which contains an array of Pipes. So it's either modify the includes to be a find or something else or modify the source. I've adjusted to simplify the computed property with TS guaranteeing that if trained exists then pipes is an array..

interface Pipe {
  name: string;
  pipe: string;
  type: string;
}

interface Category {
  description: string;
  pipes: Pipe[];
}

@BryonLewis BryonLewis merged commit 2bac536 into master Feb 1, 2021
@BryonLewis BryonLewis deleted the DIVE/desktop-trainedpipelines branch February 3, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] [Desktop] Run trained pipelines

2 participants