feat(news): store matched OpenAlex topics in 'aktuell_openalex_topics' index
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -72,7 +72,6 @@ and bakes its script as the `ENTRYPOINT`. Most jobs then run with no `command`
|
||||
override — the job definition just points `image` at the matching tag. Where
|
||||
several jobs share one script (the demos), they point at the same image and
|
||||
differ only by their `command`.
|
||||
here every script
|
||||
|
||||
## Images
|
||||
|
||||
@@ -81,7 +80,7 @@ here every script
|
||||
| News-Crawler | `jobs/news-crawl` | `run_pipeline.py` | scrapy<2.13, Twisted<24.7; uploads to `NEWS_UPLOAD_INDEX` |
|
||||
| Bund-Crawler | `jobs/bund-crawl` | `gpc.data.py --max-rows 200` | headless Chrome; uploads to `BUND_UPLOAD_INDEX`; capped, full export is ~300k rows |
|
||||
| Project-Topic-Mapping | `jobs/project-topics` | `map_project_topics --output-index docker-job_test` | reads projects_bund_v1; needs host backend |
|
||||
| News-Topic-Mapping | `jobs/news-topics` | `map_news_topics --output-index docker-job_test` | bundles both topic_mapper pkgs; needs host backend |
|
||||
| News-Topic-Mapping | `jobs/news-topics` | `map_news_topics --output-index aktuell_openalex_topics` | bundles both topic_mapper pkgs; needs host backend |
|
||||
| News-Keyword-Extraction | `jobs/news-keywords` | `sync.py --update-keywords --target-index docker-job_test` | ES + LLM creds; writes to test index |
|
||||
| Demo-Job A / B / C | `jobs/demo` | `demo.py` (seconds via command: `20` / `25` / `30`) | no dependencies; one image, three job rows |
|
||||
|
||||
@@ -105,7 +104,7 @@ docker build -f service/scripts/jobs-image/news-crawl/Dockerfile \
|
||||
docker push docker.nes.uni-due.de/inse/jobs/news-crawl:latest
|
||||
```
|
||||
|
||||
Each job's Dockerfile header lists its own build command.
|
||||
Each image's Dockerfile header lists its own build command.
|
||||
|
||||
## Running locally without pushing
|
||||
|
||||
@@ -129,9 +128,10 @@ Because every tag lives under the `docker.nes.uni-due.de` registry host, the
|
||||
backend treats these as registry images and injects the INSE Elasticsearch / LLM
|
||||
credentials automatically (plus any per-job `env`).
|
||||
|
||||
No image writes to a production index by default: the crawlers upload into the
|
||||
Most images write to the test index by default: the crawlers upload into the
|
||||
index named by `NEWS_UPLOAD_INDEX` / `BUND_UPLOAD_INDEX` (both baked to
|
||||
`docker-job_test` in their Dockerfile), and the mappers and the keyword
|
||||
`docker-job_test` in their Dockerfile), and the project mapper and the keyword
|
||||
extraction write to `docker-job_test` via `--output-index` / `--target-index`.
|
||||
The exception is News-Topic-Mapping, which writes to `aktuell_openalex_topics`.
|
||||
To not contact Elasticsearch at all, pass `--skip-upload` (crawlers) or
|
||||
`--dry-run` (mappers) through the job's command field.
|
||||
|
||||
@@ -15,10 +15,10 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY service/scripts/news/topic_mapper/ ./service/scripts/news/topic_mapper/
|
||||
COPY service/scripts/projects/topic_mapper/ ./service/scripts/projects/topic_mapper/
|
||||
|
||||
# Writes topic mappings into docker-job_test. Only maps (article, keyword) pairs
|
||||
# not already present in the output index; pass --overwrite to re-map all.
|
||||
# Writes topic mappings into aktuell_openalex_topics. Only maps (article, keyword)
|
||||
# pairs not already present in the output index; pass --overwrite to re-map all.
|
||||
# Uncapped: limit a run by passing --max-docs N through the job's command field.
|
||||
# host.docker.internal reaches the host backend for vector search.
|
||||
ENTRYPOINT ["python", "-m", "service.scripts.news.topic_mapper.map_news_topics", \
|
||||
"--output-index", "docker-job_test", \
|
||||
"--output-index", "aktuell_openalex_topics", \
|
||||
"--api-base-url", "http://host.docker.internal:8000"]
|
||||
|
||||
@@ -74,6 +74,7 @@ run retries them.
|
||||
|
||||
## As a background job
|
||||
|
||||
Registered in `background-jobs/entrypoint.sh` as `news-topics`, writing into
|
||||
the test index `docker-job_test` and capped at a few articles. Both are
|
||||
overridable via `NEWS_TOPICS_OUTPUT_INDEX` and `NEWS_TOPICS_MAX_DOCS`.
|
||||
Packaged as the `news-topics` registry image (see
|
||||
`service/scripts/jobs-image/news-topics/Dockerfile`), writing into
|
||||
`aktuell_openalex_topics`. The run is uncapped; limit a run by passing
|
||||
`--max-docs N` through the job's command field.
|
||||
|
||||
Reference in New Issue
Block a user