-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Annotator Trainability #244
Open
boyleconnor
wants to merge
28
commits into
nlpsandbox:main
Choose a base branch
from
boyleconnor:add-trainability
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
1f51e6b
Merge pull request #29 from Sage-Bionetworks/develop
tschaffter 0ab43fb
Merge branch 'main' of https://github.com/Sage-Bionetworks/nlp-sandbo…
boyleconnor 04c329d
Merge branch 'main' of https://github.com/Sage-Bionetworks/nlp-sandbo…
boyleconnor 89f97db
Add TrainingStatus Schema
boyleconnor f332421
Add Training Endpoints to Date, Location, and Name Annotators
boyleconnor 720fc2c
Revert "Add Training Endpoints to Date, Location, and Name Annotators"
boyleconnor eb58bbe
Add Info re: Trained Annotator to Schema
boyleconnor 833ae72
Add Description to TrainingStatus
boyleconnor f12ad40
Add Endpoint for Starting Annotator Training
boyleconnor c484380
Add Training Status URL
boyleconnor 07db3b8
Add Model-Loading Endpoint
boyleconnor f29ed6f
Refactor bad `schema` Property of Tool
boyleconnor 1032397
Add `trainable` Property to Example `Tool`
boyleconnor 7b684dc
Remove Empty Request & Response Bodies
boyleconnor e8639ba
Add Training Paths to Annotator Specs
boyleconnor 0c2c61b
Add Training tag to Annotator Merge Exceptions
boyleconnor f111d13
Add Training Tag to nlpsandbox no-merge List
boyleconnor 0ca3068
Switch TrainingStatus Enum to Kebab Case
boyleconnor 83c510b
Add Dataset URIs to TrainedAnnotatorStatus.yaml
boyleconnor 59f1c6e
Add Dataset URIs to TrainedAnnotatorStatus.yaml
boyleconnor be6b00b
Annotator -> Tool
boyleconnor 0151f12
Update Tool.yaml
boyleconnor a4f7ac9
Remove TrainedToolStatus from Tool Info
boyleconnor 26fe354
`Annotator` -> `Tool`
boyleconnor f1b1d62
Update and rename annotatorTrainingStatus.yaml to toolTrainingStatus.…
boyleconnor 628cd7b
Create trainedToolStatus Endpoint
boyleconnor 24d94fe
Remove Erroneous References to "Annotator"
boyleconnor 4161b41
Rename trainAnnotator to trainTool
boyleconnor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,10 @@ properties: | |
description: The URL to the homepage of the tool | ||
type: string | ||
format: uri | ||
trainable: | ||
description: Whether the tool implements trainability | ||
type: boolean | ||
default: false | ||
type: | ||
$ref: ../parameters/ToolType.yaml | ||
apiVersion: | ||
|
@@ -50,6 +54,7 @@ required: | |
- url | ||
- type | ||
- apiVersion | ||
- trainable | ||
example: | ||
name: awesome-nlp-tool | ||
version: 1.0.6 | ||
|
@@ -59,5 +64,6 @@ example: | |
author: Awesome Team | ||
authorEmail: [email protected] | ||
url: https://example.com | ||
trainable: false | ||
type: nlpsandbox:date-annotator | ||
apiVersion: 1.2.0 | ||
apiVersion: 1.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type: object | ||
description: Information about whether the tool is using a trained model, and the dataset on which the tool was trained | ||
properties: | ||
loaded: | ||
description: Whether the tool is using a trained model | ||
type: boolean | ||
notesURI: | ||
description: URI to first page of the notes in the dataset | ||
type: string | ||
format: uri | ||
goldStandardAnnotationsURI: | ||
description: URI to first page of gold standard annotations | ||
type: string | ||
format: uri |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type: string | ||
description: Whether this annotator instance has been used to generate a trained model | ||
enum: | ||
- not-yet-started | ||
- ongoing | ||
- finished |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
post: | ||
tags: | ||
- Training | ||
summary: Load the results of training | ||
description: Load the results of training (e.g. a machine learning model) into memory from mounted volume | ||
operationId: loadTrainedAnnotator | ||
responses: | ||
'201': | ||
description: Trained annotator loaded | ||
links: | ||
GetTrainingStatus: | ||
operationId: getAnnotatorTrainingStatus | ||
'403': | ||
$ref: ../components/responses/Unauthorized.yaml | ||
'404': | ||
$ref: ../components/responses/NotFound.yaml | ||
'500': | ||
$ref: ../components/responses/InternalServerError.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
get: | ||
tags: | ||
- Training | ||
summary: Get status of tool training | ||
description: Get status of the tool's training process (404 if tool is not trainable) | ||
operationId: getToolTrainingStatus | ||
responses: | ||
'200': | ||
description: Success | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../components/schemas/TrainingStatus.yaml | ||
'404': | ||
$ref: ../components/responses/NotFound.yaml | ||
'500': | ||
$ref: ../components/responses/InternalServerError.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
post: | ||
tags: | ||
- Training | ||
summary: Initiate tool training (async) | ||
description: Start training the tool's model | ||
operationId: trainAnnotator | ||
responses: | ||
'201': | ||
description: Training initialized | ||
links: | ||
GetTrainingStatus: | ||
operationId: toolTrainingStatus | ||
'404': | ||
$ref: ../components/responses/NotFound.yaml | ||
'500': | ||
$ref: ../components/responses/InternalServerError.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
get: | ||
tags: | ||
- Training | ||
summary: Get information about whether trained model has been loaded | ||
description: Get information about the tool's trained model (404 if tool is not trainable) | ||
operationId: getTrainedToolStatus | ||
responses: | ||
'200': | ||
description: Success | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../components/schemas/TrainedToolStatus.yaml | ||
'404': | ||
$ref: ../components/responses/NotFound.yaml | ||
'500': | ||
$ref: ../components/responses/InternalServerError.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading a trained model is a step of an initialization process. What about having a path
initializeTraining
andinitializeInference
?