diff --git a/.github/workflows/python-CI.yaml b/.github/workflows/python-CI.yaml index e0face5436..166aa94d53 100644 --- a/.github/workflows/python-CI.yaml +++ b/.github/workflows/python-CI.yaml @@ -9,14 +9,18 @@ on: defaults: run: - working-directory: ./python + working-directory: python jobs: - ci: - name: CI Python - runs-on: oss-4-core-runner + changes: + name: Filter Changes + runs-on: ubuntu-latest + outputs: + diff_files: ${{ steps.filter.outputs.diff_files }} steps: - uses: actions/checkout@v4 + with: + sparse-checkout: python - uses: dorny/paths-filter@v3 id: filter with: @@ -26,8 +30,17 @@ jobs: diff: - "python/**/*.py" - "python/**/*.toml" + + find-tox-testenv: + name: Find Tox Testenv + needs: changes + if: ${{ needs.changes.outputs.diff_files != '' }} + runs-on: ubuntu-latest + outputs: + list: ${{ steps.testenv.outputs.list }} + steps: - run: >- - echo "packages=$(echo '${{ steps.filter.outputs.diff_files }}' + echo "list=$(echo '${{ needs.changes.outputs.diff_files }}' | jq -r '.[]' | sed -n -e 's/^python\/instrumentation\/openinference-instrumentation-\([^/]*\)\/.*/\1/p' @@ -37,20 +50,39 @@ jobs: | sed -e 's/semantic-conventions/semconv/' -e 's/-/_/' -e 's/^/\\b/' | paste -sd "|" -)" >> "$GITHUB_OUTPUT" - if: ${{ steps.filter.outputs.diff == 'true' }} - id: changes + id: packages + - uses: actions/checkout@v4 + with: + sparse-checkout: python - uses: actions/setup-python@v5 - if: ${{ (steps.filter.outputs.diff == 'true') && (steps.changes.outputs.packages != '') }} - with: - python-version: | - 3.8 - 3.9 - 3.10 - 3.11 - 3.12 - - run: pip install tox-uv==1.11.2 - if: ${{ (steps.filter.outputs.diff == 'true') && (steps.changes.outputs.packages != '') }} + with: + python-version: 3.8 + - uses: astral-sh/setup-uv@v5 + with: + version: 0.5.27 - run: >- - tox run-parallel --parallel-no-spinner - -e $(tox -l | egrep -e '${{ steps.changes.outputs.packages }}' | paste -sd, -) - if: ${{ (steps.filter.outputs.diff == 'true') && (steps.changes.outputs.packages != '') }} + echo "list=$(uvx --with tox-uv tox -l + | egrep -e '${{ steps.packages.outputs.list }}' + | jq -R -s 'split("\n")[:-1]')" + >> $GITHUB_OUTPUT + id: testenv + + run-tox-testenv: + name: Run Tox Testenv + needs: find-tox-testenv + if: ${{ needs.find-tox-testenv.outputs.list != '' }} + runs-on: ubuntu-latest + strategy: + matrix: + testenv: ${{ fromJSON(needs.find-tox-testenv.outputs.list) }} + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: python + - uses: actions/setup-python@v5 + with: + python-version: 3.8 + - uses: astral-sh/setup-uv@v5 + with: + version: 0.5.27 + - run: uvx --with tox-uv tox run -e ${{ matrix.testenv }} -- -ra -x diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 806eaf2c15..65d131ea68 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -12,7 +12,7 @@ "python/instrumentation/openinference-instrumentation-crewai": "0.1.4", "python/instrumentation/openinference-instrumentation-haystack": "0.1.14", "python/instrumentation/openinference-instrumentation-litellm": "0.1.7", - "python/instrumentation/openinference-instrumentation-groq": "0.1.5", + "python/instrumentation/openinference-instrumentation-groq": "0.1.6", "python/instrumentation/openinference-instrumentation-instructor": "0.1.2", "python/instrumentation/openinference-instrumentation-anthropic": "0.1.9", "python/instrumentation/openinference-instrumentation-smolagents": "0.1.2", diff --git a/python/instrumentation/openinference-instrumentation-groq/CHANGELOG.md b/python/instrumentation/openinference-instrumentation-groq/CHANGELOG.md index 441baf4599..ccca506f7b 100644 --- a/python/instrumentation/openinference-instrumentation-groq/CHANGELOG.md +++ b/python/instrumentation/openinference-instrumentation-groq/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [0.1.6](https://github.com/RogerHYang/openinference/compare/python-openinference-instrumentation-groq-v0.1.5...python-openinference-instrumentation-groq-v0.1.6) (2025-02-04) + + +### Features + +* fix groq readme ([#1066](https://github.com/RogerHYang/openinference/issues/1066)) ([5fedc0b](https://github.com/RogerHYang/openinference/commit/5fedc0b451b0da955899a0fcd69ac958cfe38273)) +* **groq:** instrumentation ([#694](https://github.com/RogerHYang/openinference/issues/694)) ([d25746f](https://github.com/RogerHYang/openinference/commit/d25746ff493bce1cd90ed70f1a2989ef4d8dfe24)) +* **groq:** refactor groq, add groq tool call support ([#1133](https://github.com/RogerHYang/openinference/issues/1133)) ([6057418](https://github.com/RogerHYang/openinference/commit/6057418f26ad2cbbb05c122550fcce462c684058)) +* TraceConfig and context attribute support ([#777](https://github.com/RogerHYang/openinference/issues/777)) ([41fa487](https://github.com/RogerHYang/openinference/commit/41fa487c54a05961d41c4da5af053077280bfdf4)) + + +### Bug Fixes + +* bump minimum version for openinference-instrumentation ([#810](https://github.com/RogerHYang/openinference/issues/810)) ([12e11ea](https://github.com/RogerHYang/openinference/commit/12e11ea405252ca35dc8d3f3a08ec5b83a08cea7)) +* groq input messages ([#1053](https://github.com/RogerHYang/openinference/issues/1053)) ([ec7cb4d](https://github.com/RogerHYang/openinference/commit/ec7cb4d01853970a3f604b45b827f37220d70d2e)) +* increase version lower bound for openinference-instrumentation ([#1012](https://github.com/RogerHYang/openinference/issues/1012)) ([3236d27](https://github.com/RogerHYang/openinference/commit/3236d2733a46b84d693ddb7092209800cde8cc34)) + + +### Documentation + +* TraceConfig and context attributes ([#793](https://github.com/RogerHYang/openinference/issues/793)) ([d3808c4](https://github.com/RogerHYang/openinference/commit/d3808c4bea3f6a4c72d3a7ea09b54e78072be6fd)) + ## [0.1.5](https://github.com/Arize-ai/openinference/compare/python-openinference-instrumentation-groq-v0.1.4...python-openinference-instrumentation-groq-v0.1.5) (2024-12-20) diff --git a/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/_with_span.py b/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/_with_span.py index 993df0d7d4..88a341026e 100644 --- a/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/_with_span.py +++ b/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/_with_span.py @@ -19,6 +19,7 @@ class _WithSpan: def __init__( self, span: trace_api.Span, + context_attributes: Attributes = None, extra_attributes: Attributes = None, ) -> None: diff --git a/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/version.py b/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/version.py index 1276d0254f..0a8da88258 100644 --- a/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/version.py +++ b/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/version.py @@ -1 +1 @@ -__version__ = "0.1.5" +__version__ = "0.1.6" diff --git a/python/instrumentation/openinference-instrumentation-mistralai/src/openinference/instrumentation/mistralai/_stream.py b/python/instrumentation/openinference-instrumentation-mistralai/src/openinference/instrumentation/mistralai/_stream.py index e3965b3de8..8a6c604724 100644 --- a/python/instrumentation/openinference-instrumentation-mistralai/src/openinference/instrumentation/mistralai/_stream.py +++ b/python/instrumentation/openinference-instrumentation-mistralai/src/openinference/instrumentation/mistralai/_stream.py @@ -23,6 +23,7 @@ ) logger = logging.getLogger(__name__) + logger.addHandler(logging.NullHandler()) diff --git a/python/openinference-instrumentation/src/openinference/instrumentation/config.py b/python/openinference-instrumentation/src/openinference/instrumentation/config.py index 7c51520371..3e1ce61e5f 100644 --- a/python/openinference-instrumentation/src/openinference/instrumentation/config.py +++ b/python/openinference-instrumentation/src/openinference/instrumentation/config.py @@ -192,6 +192,7 @@ class TraceConfig: "default_value": DEFAULT_HIDE_LLM_INVOCATION_PARAMETERS, }, ) + hide_inputs: Optional[bool] = field( default=None, metadata={ diff --git a/python/openinference-semantic-conventions/src/openinference/semconv/trace/__init__.py b/python/openinference-semantic-conventions/src/openinference/semconv/trace/__init__.py index 3c18129226..79faa3b2ac 100644 --- a/python/openinference-semantic-conventions/src/openinference/semconv/trace/__init__.py +++ b/python/openinference-semantic-conventions/src/openinference/semconv/trace/__init__.py @@ -16,6 +16,7 @@ class SpanAttributes: """ EMBEDDING_EMBEDDINGS = "embedding.embeddings" + """ A list of objects containing embedding data, including the vector and represented piece of text. """