Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.3.2 into Main #205

Merged
merged 12 commits into from
Dec 3, 2024
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# v3.3.2
## Bug Fixes
- Resolved issue where invalid schema import was causing create model api calls to fail
- Resolved issue where RAG citations weren't being populated in metadata for non-streaming requests
- Resolved issue where managing in-memory file context wouldn't display success notification and close the modal

## Acknowledgements
* @bedanley
* @estohlmann
* @dustins

**Full Changelog**: https://github.com/awslabs/LISA/compare/v3.3.1...v3.3.2

# v3.3.1
## Bug Fixes
- Resolved issue where AWS partition was hardcoded in RAG Pipeline
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.1
3.3.2
2 changes: 1 addition & 1 deletion ecs_model_deployer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"build": "tsc && cp package.json ./dist && cp ./src/cdk*json ./dist/ && cd ./dist && npm i --omit dev",
"build": "tsc && cp package.json ./dist && cp ./src/cdk*json ./dist/ && cp ../VERSION ./dist && cd ./dist && npm i --omit dev",
"clean": "rm -rf ./dist/",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down
2 changes: 1 addition & 1 deletion ecs_model_deployer/src/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { AddPermissionBoundary } from '@cdklabs/cdk-enterprise-iac';
import { Aspects, App } from 'aws-cdk-lib';
import { LisaModelStack, LisaModelStackProps } from './lisa_model_stack';

import { ConfigFile, ConfigSchema } from './schema';
import { ConfigFile, ConfigSchema } from './ecs-schema';

export const app = new App();

Expand Down
2 changes: 1 addition & 1 deletion ecs_model_deployer/src/lib/ecs-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Construct } from 'constructs';

import { ECSCluster } from './ecsCluster';
import { getModelIdentifier } from './utils';
import { BaseProps, Config, Ec2Metadata, EcsSourceType, ModelConfig } from './schema';
import { BaseProps, Config, Ec2Metadata, EcsSourceType, ModelConfig } from './ecs-schema';
import { StringParameter } from 'aws-cdk-lib/aws-ssm';

// This is the amount of memory to buffer (or subtract off) from the total instance memory, if we don't include this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
import * as cdk from 'aws-cdk-lib';
import { AmiHardwareType } from 'aws-cdk-lib/aws-ecs';
import { z } from 'zod';
import { SecurityGroupConfigSchema } from '../../../lib/schema';
import path from 'path';
import fs from 'fs';

const VERSION: string = '2.0.1';
const HERE: string = path.resolve(__dirname);
const VERSION_PATH: string = path.resolve(HERE, '..', 'VERSION');
export const VERSION: string = fs.readFileSync(VERSION_PATH, 'utf8').trim();

const REMOVAL_POLICIES: Record<string, cdk.RemovalPolicy> = {
destroy: cdk.RemovalPolicy.DESTROY,
Expand Down Expand Up @@ -538,6 +541,27 @@ const PypiConfigSchema = z.object({
trustedHost: z.string().optional().default(''),
});

/**
* Configuration schema for Security Group imports.
* These values are none/small/all, meaning a user can import any number of these or none of these.
*
* @property {string} modelSecurityGroupId - Security Group ID.
* @property {string} restAlbSecurityGroupId - Security Group ID
* @property {string} lambdaSecurityGroupId - Security Group ID
* @property {string} liteLlmDbSecurityGroupId - Security Group ID.
* @property {string} openSearchSecurityGroupId - Security Group ID.
* @property {string} pgVectorSecurityGroupId - Security Group ID.
*/
export const SecurityGroupConfigSchema = z.object({
modelSecurityGroupId: z.string().startsWith('sg-'),
restAlbSecurityGroupId: z.string().startsWith('sg-'),
lambdaSecurityGroupId: z.string().startsWith('sg-'),
liteLlmDbSecurityGroupId: z.string().startsWith('sg-'),
openSearchSecurityGroupId: z.string().startsWith('sg-').optional(),
pgVectorSecurityGroupId: z.string().startsWith('sg-').optional(),
})
.describe('Security Group Overrides used across stacks.');

/**
* Raw application configuration schema.
*
Expand Down
3 changes: 1 addition & 2 deletions ecs_model_deployer/src/lib/ecsCluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ import { StringParameter } from 'aws-cdk-lib/aws-ssm';
import { Construct } from 'constructs';

import { createCdkId } from './utils';
import { BaseProps, Ec2Metadata, EcsSourceType } from './schema';
import { ECSConfig } from './schema';
import { BaseProps, ECSConfig, Ec2Metadata, EcsSourceType } from './ecs-schema';

/**
* Properties for the ECSCluster Construct.
Expand Down
2 changes: 1 addition & 1 deletion ecs_model_deployer/src/lib/lisa_model_stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Vpc, SecurityGroup, Subnet, SubnetSelection } from 'aws-cdk-lib/aws-ec2
import { Construct } from 'constructs';
import { EcsModel } from './ecs-model';

import { Config, ModelConfig } from './schema';
import { Config, ModelConfig } from './ecs-schema';

export type LisaModelStackProps = {
vpcId: string;
Expand Down
2 changes: 1 addition & 1 deletion ecs_model_deployer/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

import { ModelConfig } from './schema';
import { ModelConfig } from './ecs-schema';

/**
* Creates a unique CDK ID using configuration data. The CDK ID is used to uniquely identify resources in the AWS
Expand Down
2 changes: 1 addition & 1 deletion lib/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { z } from 'zod';

const HERE: string = path.resolve(__dirname);
const VERSION_PATH: string = path.resolve(HERE, '..', 'VERSION');
const VERSION: string = fs.readFileSync(VERSION_PATH, 'utf8').trim();
export const VERSION: string = fs.readFileSync(VERSION_PATH, 'utf8').trim();

const REMOVAL_POLICIES: Record<string, cdk.RemovalPolicy> = {
destroy: cdk.RemovalPolicy.DESTROY,
Expand Down
13 changes: 7 additions & 6 deletions lib/user-interface/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/user-interface/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lisa-web",
"private": true,
"version": "3.3.1",
"version": "3.3.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion lib/user-interface/react/src/components/chatbot/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export default function Chat ({ sessionId }) {
new LisaChatMessage({
type: 'ai',
content: result,
metadata: metadata,
metadata: useRag ? { ...metadata, ...prev.history[prev.history.length - 1].metadata } : metadata,
}),
),
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ export function ContextUploadModal ({
<SpaceBetween direction='horizontal' size='xs'>
<Button
onClick={async () => {
await handleUpload(selectedFiles, handleError, processFile, [FileTypes.TEXT], 10240);
const successfulUploads = await handleUpload(selectedFiles, handleError, processFile, [FileTypes.TEXT], 10240);
if (successfulUploads.length > 0) {
notificationService.generateNotification(`Successfully added file(s) to context ${successfulUploads.join(', ')}`, StatusTypes.SUCCESS);
setShowContextUploadModal(false);
}
}}
disabled={selectedFiles.length === 0}
>
Expand Down
2 changes: 1 addition & 1 deletion lisa-sdk/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "lisapy"
version = "3.3.1"
version = "3.3.2"
description = "A simple SDK to help you interact with LISA. LISA is an LLM hosting solution for AWS dedicated clouds or ADCs."
authors = ["Steve Goley <[email protected]>"]
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lisa",
"version": "3.3.1",
"version": "3.3.2",
"bin": {
"lisa": "bin/lisa.js"
},
Expand Down
Loading