Skip to content

Commit 6117b0d

Browse files
feat: Main branch validation (#621)
1 parent b9ba6e3 commit 6117b0d

File tree

7 files changed

+71
-41
lines changed

7 files changed

+71
-41
lines changed

.github/workflows/e2e-validation.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: End to end validation
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
validation:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
id-token: write
11+
contents: read
12+
steps:
13+
- name: Configure AWS Credentials
14+
uses: aws-actions/configure-aws-credentials@v2
15+
with:
16+
aws-region: ${{ secrets.PIPELINE_AWS_REGION }}
17+
role-to-assume: arn:aws:iam::${{ secrets.PIPELINE_AWS_ACCOUNT_ID }}:role/${{ secrets.PIPELINE_ROLE }}
18+
role-session-name: github-action
19+
- name: Validate
20+
run: |
21+
executionId=$(aws codepipeline start-pipeline-execution --name ${{ secrets.PIPELINE_NAME }} --region ${{ secrets.PIPELINE_AWS_REGION }} --query "pipelineExecutionId" --output text)
22+
sleep 60
23+
while true; do
24+
status=$(aws codepipeline get-pipeline-execution --pipeline-name ${{ secrets.PIPELINE_NAME }} --region ${{ secrets.PIPELINE_AWS_REGION }} --pipeline-execution-id $executionId --query "pipelineExecution.status" --output text)
25+
echo "Pipeline status: $status"
26+
if [[ "$status" == "Failed" ]]; then
27+
echo "Pipeline failed."
28+
exit 1
29+
fi
30+
if [[ "$status" != "InProgress" ]]; then
31+
break
32+
fi
33+
sleep 30
34+
done

integtests/chatbot-api/aurora_workspace_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def test_add_rss(client: AppSyncClient):
8484

8585
ready = False
8686
retries = 0
87-
while not ready and retries < 10:
87+
while not ready and retries < 20:
8888
time.sleep(5)
8989
retries += 1
9090
document = client.get_document(

lib/model-interfaces/idefics/functions/request-handler/adapters/base.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ class MultiModalModelBase:
2828
@abstractmethod
2929
def handle_run(
3030
self, input: dict, model_kwargs: dict, files: Optional[list] = None
31-
) -> str:
32-
...
31+
) -> str: ...
3332

3433
@abstractmethod
35-
def on_llm_new_token(self, user_id: str, session_id: str, chunk: str) -> None:
36-
...
34+
def on_llm_new_token(self, user_id: str, session_id: str, chunk: str) -> None: ...
3735

3836
def upload_file_message(self, content: bytes, file_type: str):
3937
key = str(uuid.uuid4())
@@ -133,12 +131,10 @@ def clean_prompt(self, input: dict) -> str:
133131
return json.dumps(input)
134132

135133
@abstractmethod
136-
def generate_image(self, input: dict, model_kwargs: dict):
137-
...
134+
def generate_image(self, input: dict, model_kwargs: dict): ...
138135

139136
@abstractmethod
140-
def generate_video(self, input: dict, model_kwargs: dict):
141-
...
137+
def generate_video(self, input: dict, model_kwargs: dict): ...
142138

143139
def converse(self, input: dict, model_kwargs: dict):
144140
logger.info("Incoming request for nova", model_kwargs=model_kwargs)

lib/model-interfaces/idefics/functions/request-handler/adapters/nova.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def generate_image(
169169
"width": 1280,
170170
"height": 768,
171171
"cfgScale": 7.0,
172-
"seed": model_kwargs.get("seed", randint(0, 2147483646)), # nosec B311
172+
"seed": model_kwargs.get("seed", randint(0, 2147483646)), # fmt: skip # noqa # nosec B311 # NOSONAR
173173
},
174174
}
175175
logger.info(
@@ -236,7 +236,7 @@ def generate_video(
236236
"durationSeconds": 6,
237237
"fps": 24,
238238
"dimension": "1280x720",
239-
"seed": model_kwargs.get("seed", randint(0, 2147483646)), # nosec B311
239+
"seed": model_kwargs.get("seed", randint(0, 2147483646)), # fmt: skip # noqa # nosec B311 # NOSONAR
240240
},
241241
}
242242
logger.info("Model input", model_input=model_input)

lib/user-interface/react-app/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/user-interface/react-app/src/components/chatbot/chat-message.tsx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -215,30 +215,30 @@ export default function ChatMessage(props: ChatMessageProps) {
215215
)
216216
}
217217
>
218-
{props.message.content.length > 0 && (
219-
<div className={styles.btn_chabot_message_copy}>
220-
<Popover
221-
data-locator="copy-clipboard"
222-
size="medium"
223-
position="top"
224-
triggerType="custom"
225-
dismissButton={false}
226-
content={
227-
<StatusIndicator type="success">
228-
Copied to clipboard
229-
</StatusIndicator>
230-
}
231-
>
232-
<Button
233-
variant="inline-icon"
234-
iconName="copy"
235-
onClick={() => {
236-
navigator.clipboard.writeText(props.message.content);
237-
}}
238-
/>
239-
</Popover>
240-
</div>
241-
)}
218+
{props.message.content.length > 0 && (
219+
<div className={styles.btn_chabot_message_copy}>
220+
<Popover
221+
data-locator="copy-clipboard"
222+
size="medium"
223+
position="top"
224+
triggerType="custom"
225+
dismissButton={false}
226+
content={
227+
<StatusIndicator type="success">
228+
Copied to clipboard
229+
</StatusIndicator>
230+
}
231+
>
232+
<Button
233+
variant="inline-icon"
234+
iconName="copy"
235+
onClick={() => {
236+
navigator.clipboard.writeText(props.message.content);
237+
}}
238+
/>
239+
</Popover>
240+
</div>
241+
)}
242242
{loading ||
243243
(content.length === 0 && !processingAsyncFiles && !files.length) ? (
244244
<Box>

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)