diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e27dd5e0..73b2503f 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -75,6 +75,16 @@ jobs: steps: - uses: actions/checkout@v5 + - name: Write GCS model reader key (temporary access to private model bucket) + id: gcp_auth + env: + GCS_MODEL_READER_SA_KEY_B64: ${{ secrets.GCS_MODEL_READER_SA_KEY_B64 }} + run: | + KEY_PATH="${RUNNER_TEMP}/gcs-model-reader-key.json" + printf '%s' "$GCS_MODEL_READER_SA_KEY_B64" | base64 -d > "$KEY_PATH" + chmod 600 "$KEY_PATH" + echo "key_path=$KEY_PATH" >> "$GITHUB_OUTPUT" + - name: Resolve benchmark profile env: PR_LABELS_JSON: ${{ toJson(github.event.pull_request.labels.*.name) }} @@ -171,6 +181,8 @@ jobs: fi docker run -d --name sciencebeam-parser -p 8080:8070 \ -e SCIENCEBEAM_PARSER__PRELOAD_ON_STARTUP=true \ + -v "${{ steps.gcp_auth.outputs.key_path }}:/creds/gcp-key.json:ro" \ + -e GOOGLE_APPLICATION_CREDENTIALS=/creds/gcp-key.json \ "${PROFILE_ENV[@]}" ${{ steps.image_tag.outputs.value }} - name: Wait for parser diff --git a/sciencebeam_parser/resources/default_config/config.yml b/sciencebeam_parser/resources/default_config/config.yml index b558532b..0b5d0ab8 100644 --- a/sciencebeam_parser/resources/default_config/config.yml +++ b/sciencebeam_parser/resources/default_config/config.yml @@ -181,6 +181,18 @@ sequence_model_profiles: engine: 'wapiti' grobid_custom_hybrid: extends: grobid_crf_0_9_0 + citation: + # path: 'gs://sciencebeam-v2-models/wapiti/citation/models/2026-08-04_wapiti_grobid_090_grobid_only/citation/' + path: 'gs://sciencebeam-v2-models/wapiti/citation/models/2026-08-05_wapiti_grobid_090_scielo_preprints_ore/citation/' + engine: 'wapiti' + reference_segmenter: + # TODO: switch back once the release is public + # path: 'https://github.com/eLifePathways/sciencebeam-models/releases/download/dev/2026-07-01-delft-grobid-reference-segmenter-CustomBidLSTM_CRF-grobid_090-scielo_preprints-v1.tar.gz' + # path: 'gs://sciencebeam-v2-models/delft/reference-segmenter/models/2026-07-01_CustomBidLSTM_CRF_grobid_090_scielo_preprints_ore/reference-segmenter/' + # path: 'gs://sciencebeam-v2-models/wapiti/reference-segmenter/models/2026-07-01_wapiti_grobid_090_scielo_preprints_ore/reference-segmenter' + path: 'gs://sciencebeam-v2-models/wapiti/reference-segmenter/models/2026-08-04_wapiti_grobid_090_grobid_only/reference-segmenter/' + # path: 'gs://sciencebeam-v2-models/wapiti/reference-segmenter/models/2026-08-05_wapiti_grobid_090_scielo_preprints_ore/reference-segmenter/' + engine: 'wapiti' profiles: biorxiv_elife: diff --git a/tests/config/config_test.py b/tests/config/config_test.py index 0ffa6c12..6f1f41f3 100644 --- a/tests/config/config_test.py +++ b/tests/config/config_test.py @@ -10,7 +10,6 @@ _deep_merge, _resolve_sequence_model_profile ) -from sciencebeam_parser.resources.default_config import DEFAULT_CONFIG_FILE MINIMAL_PROFILE_CONFIG = { @@ -293,12 +292,3 @@ def test_should_override_bool_value_with_env_var( config = AppConfig.load_yaml(str(config_path)) config = config.apply_environment_variables() assert config.props['key1'] is False - - -class TestDefaultConfigProfiles: - def _resolve_models(self, profile_name: str) -> dict: - config = AppConfig.load_yaml(DEFAULT_CONFIG_FILE) - return config.resolve_profile(profile_name)['models'] - - def test_grobid_custom_hybrid_inherits_every_grobid_crf_model(self): - assert self._resolve_models('grobid_custom_hybrid') == self._resolve_models('grobid_crf')