Skip to content

Commit fe46f35

Browse files
committed
add documentation todo in inference pipeline
1 parent df42889 commit fe46f35

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

inference/inference_pipeline_queue.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# COSMOS Inference Pipeline
22

33
## Overview
4-
COSMOS uses an ML inference pipeline to analyze and classify website content. This pipeline processes full-text content from URLs within collections to enhance metadata with classifications such as TDAMM categories (36 types) or science divisions (5 types).
4+
The server runs both the COSMOS curation app and an ML Inference Pipeline, which can analyze and classify website content. COSMOS is process whole collections and send the full_texts of the individual urls to the Inference Pipeline for classification. Right now it supports Division Classifications and TDAMM Classifications.
5+
6+
The Inference Pipeline can support multiple model versions for a single classification type. When a collection needs to be classified for certain classification and model, say "Division" and "v1", the COSMOS app will create an InferenceJob object. The InferenceJob will then create ExternalJob objects for each batch of urls in the collection. The ExternalJob objects will send the full_texts to the Inference Pipeline API, which will return a job_id. The ExternalJob will then ping the API with the job_id to get the results. Once all ExternalJobs are complete, the InferenceJob will be marked as complete.
57

68
## Infrastructure
79
We are running both local and prod in docker compose. On local, we are using celery and redis. On prod, we point to AWS SQS instead.
@@ -11,8 +13,8 @@ We can log into flower locally at http://localhost:5555. The user and password c
1113
## Core Components
1214

1315
### Collections and URLs
14-
- **Collections**: Store website-level metadata
15-
- **DeltaUrl/CuratedUrl**: Store individual URL metadata including full text content and paired field descriptors which will hold classification results
16+
- **Collection**: Stores website-level metadata
17+
- **DeltaUrl/CuratedUrl**: Stores individual URL metadata including full text content and paired field descriptors which will hold classification results
1618

1719
### Job Structure
1820
The inference pipeline uses a two-level job system:
@@ -110,3 +112,6 @@ def unload_model():
110112
- database saving and job sending should be handled at a batch level, so that we can retry batches which failed, without needing to re-run the entire collection
111113
- database should not allow the creation of a a second InferenceJob if an existing Job exists where InferenceJob(collection=collection,classification_type=classification_type,completed=False)
112114
- Long-term:Enable tracking of which model version produced which classifications. this should be stored at the level of the paired field
115+
116+
## Documentation Todo
117+
- write about ModelVersion, and how we have active versions. Explain the api_identifier, etc

0 commit comments

Comments
 (0)