I am trying to set SSO plugin for my prodigy server by following this tutorial: Single Sign-On with OpenID Connect · Prodigy · An annotation tool for AI, Machine Learning & NLP
Before setting my company's SSO on-prem , I am trying to reproduce the tutorial with Auth0 on Github Codespace, however I can not do that.
First, I set my application on auth0, I test it, it works when I set a toy server with fastapi.
Second, I set prodigy:
> python3.11 -m pip show prodigy
---
Name: prodigy
Version: 1.12.7
Summary: Radically efficient machine teaching.
Home-page: https://prodi.gy
Author: Explosion
Author-email: contact@explosion.ai
License: All rights reserved
Location: /home/codespace/.local/lib/python3.11/site-packages
Requires: aiofiles, cachetools, catalogue, fastapi, jinja2, peewee, plac, pydantic, pyjwt, python-dotenv, requests, spacy, srsly, toolz, tqdm, typeguard, typing-extensions, uvicorn, wasabi
Required-by:
and plugins:
> python3.11 -m pip show prodigy_company_plugins
---
Name: prodigy-company-plugins
Version: 0.2.1
Summary: Company License plugins for the Prodigy Data Annotation Tool.
Home-page: https://prodi.gy
Author: Explosion
Author-email: contact@explosion.ai
License: All rights reserved
Location: /home/codespace/.local/lib/python3.11/site-packages
Requires: cryptography, httpx
Required-by:
I set the environment variables:
PRODIGY_OIDC_AUTH_ENABLED=1
PRODIGY_OIDC_DISCOVERY_URL="https://dev-***.us.auth0.com/.well-known/openid-configuration"
PRODIGY_OIDC_CLIENT_ID=***
PRODIGY_OIDC_CLIENT_SECRET=***
PRODIGY_OIDC_REQUIRED_SCOPES="openid email"
PRODIGY_LOGGING="verbose"
PRODIGY_LOG_LOCALS=1
PRODIGY_DEPLOYED_URL="https://scaling-fortnight-x5g7x4qxg44cpgj5-8080.app.github.dev"
PRODIGY_HOST="0.0.0.0"
PRODIGY_PORT=8080
Finally, I run prodigy server:
> dotenv run -- python3.11 -m prodigy ner.manual ner_news_headlines blank:en ./news_headlines.jsonl --label PERSON,ORG,PRODUCT,LOCATION
---
13:21:11: INIT: Setting all logging levels to 10
13:21:12: RECIPE: Calling recipe 'ner.manual'
Using 4 label(s): PERSON, ORG, PRODUCT, LOCATION
13:21:12: RECIPE: Starting recipe ner.manual
13:21:12: {'dataset': 'ner_news_headlines', 'spacy_model': 'blank:en', 'source': './news_headlines.jsonl', 'loader': None, 'label': ['PERSON', 'ORG', 'PRODUCT', 'LOCATION'], 'patterns': None, 'exclude': None, 'highlight_chars': False}
13:21:12: RECIPE: Annotating with 4 labels
13:21:12: ['PERSON', 'ORG', 'PRODUCT', 'LOCATION']
13:21:12: get_stream: Loading .jsonl file
13:21:12: get_stream: Rehashing stream
13:21:12: get_stream: Removing duplicates
13:21:12: CONFIG: Using config from global prodigy.json
13:21:12: /home/codespace/.prodigy/prodigy.json
13:21:12: VALIDATE: Validating components returned by recipe
13:21:12: CONTROLLER: Initialising from recipe
13:21:12: {'before_db': None, 'config': {'lang': 'en', 'labels': ['PERSON', 'ORG', 'PRODUCT', 'LOCATION'], 'exclude_by': 'input', 'ner_manual_highlight_chars': False, 'dataset': 'ner_news_headlines', 'recipe_name': 'ner.manual'}, 'dataset': 'ner_news_headlines', 'db': True, 'exclude': None, 'get_session_id': None, 'metrics': None, 'on_exit': None, 'on_load': None, 'progress': <prodigy.components.progress.SourceProgressEstimator object at 0x74d9f1fd70d0>, 'self': <prodigy.core.Controller object at 0x74d9f0c8cb90>, 'session_factory': None, 'stream': <prodigy.components.stream.Stream object at 0x74d9f0f5d490>, 'task_router': None, 'update': <cyfunction _noop_update at 0x74d9f1fa6c20>, 'validate_answer': None, 'view_id': 'ner_manual'}
13:21:12: VALIDATE: Creating validator for view ID 'ner_manual'
13:21:12: VALIDATE: Validating Prodigy and recipe config
13:21:12: PREPROCESS: Tokenizing examples (running tokenizer only)
13:21:12: FILTER: Filtering duplicates from stream
13:21:12: {'by_input': True, 'by_task': True, 'stream': <_cython_3_0_0b3.generator object at 0x74d9f1087ac0>, 'warn_fn': <bound method Printer.warn of <wasabi.printer.Printer object at 0x74d9fd035f90>>, 'warn_threshold': 0.4}
13:21:12: FILTER: Filtering out empty examples for key 'text'
13:21:12: CONFIG: Using config from global prodigy.json
13:21:12: /home/codespace/.prodigy/prodigy.json
13:21:12: DB: Initializing database SQLite
13:21:12: DB: Connecting to database SQLite
13:21:12: DB: Creating unstructured dataset '2024-11-29_13-21-12'
13:21:12: {'created': datetime.datetime(2024, 11, 29, 10, 15, 21)}
13:21:12: CORS: initialized with wildcard "*" CORS origins
✨ Starting the web server at http://0.0.0.0:8080 ...
Open the app in your browser and start annotating!
INFO: Started server process [11305]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
INFO: 10.240.0.69:0 - "GET / HTTP/1.1" 200 OK
INFO: 10.240.0.69:0 - "GET /bundle.js HTTP/1.1" 200 OK
So, I have no indication whether or not SSO is set (it would be handy to have warnings that SSO config is not set correctly). I can access the prodigy page without redirect.
Where I fail to follow the tutorial?