Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '30 15 * * *'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ 'ubuntu-latest' }}
permissions:
security-events: write
packages: read

strategy:
matrix:
include:
- language: python
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
- name: Initialize CodeQL
uses: github/codeql-action/init@4b1d7da102ff94aca014c0245062b1a463356d72
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4b1d7da102ff94aca014c0245062b1a463356d72
with:
category: "/language:${{matrix.language}}"
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ def _generate_deployment_config(self, model_id):
instance_type = default_type if default_type else '\<ENTER-INSTANCE-TYPE\>'
types_comment = self._format_instance_types_comment(supported_types)

# Generate timestamp for unique endpoint name
timestamp = str(int(time.time()))
endpoint_name_value = f"{model_id}-{timestamp}"

config_code = f'''# Deployment configuration for {model_id}
from sagemaker.hyperpod.inference.config.hp_jumpstart_endpoint_config import (
Model, Server, SageMakerEndpoint
Expand Down
Loading