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

fix: some regressions for tensorrt nightly build #2380

Merged
merged 3 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion extensions/model-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export default class JanModelExtension extends ModelExtension {
.toLowerCase()
.includes(JanModelExtension._tensorRtEngineFormat)
)
})?.length > 0 // TODO: NamH find better way (can use basename to check the file name with source url)
})?.length > 0 // TODO: find better way (can use basename to check the file name with source url)
)
})

Expand Down
2 changes: 1 addition & 1 deletion extensions/tensorrt-llm-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@janhq/tensorrt-llm-extension",
"version": "0.0.3",
"description": "Enables accelerated inference leveraging Nvidia's TensorRT-LLM for optimal GPU hardware optimizations. Compatible with models in TensorRT-LLM format. Requires Nvidia GPU driver and CUDA Toolkit installation.",
"description": "This extension enables Nvidia's TensorRT-LLM for the fastest GPU acceleration. See the [setup guide](https://jan.ai/guides/providers/tensorrt-llm/) for next steps.",
"main": "dist/index.js",
"node": "dist/node/index.cjs.js",
"author": "Jan <[email protected]>",
Expand Down
5 changes: 3 additions & 2 deletions web/screens/Settings/Advanced/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ const Advanced = () => {
setGpuEnabled(true)
setShowNotification(false)
snackbar({
description: 'Successfully turned on GPU Accelertion',
description:
'Successfully turned on GPU Acceleration',
type: 'success',
})
setTimeout(() => {
Expand All @@ -257,7 +258,7 @@ const Advanced = () => {
setGpuEnabled(false)
snackbar({
description:
'Successfully turned off GPU Accelertion',
'Successfully turned off GPU Acceleration',
type: 'success',
})
}
Expand Down
21 changes: 17 additions & 4 deletions web/screens/Settings/CoreExtensions/TensorRtExtensionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
systemInformations,
} from '@janhq/core'
import {
Badge,
Button,
Progress,
Tooltip,
Expand All @@ -20,6 +21,8 @@
import { InfoCircledIcon } from '@radix-ui/react-icons'
import { useAtomValue } from 'jotai'

import { Marked, Renderer } from 'marked'

import { extensionManager } from '@/extension'
import Extension from '@/extension/Extension'
import { installingExtensionAtom } from '@/helpers/atoms/Extension.atom'
Expand Down Expand Up @@ -108,6 +111,8 @@
}
}

const description = marked.parse(item.description ?? '', { async: false })
console.log(description)
return (
<div className="flex w-full items-start justify-between border-b border-border py-4 first:pt-4 last:border-none">
<div className="flex-1 flex-shrink-0 space-y-1.5">
Expand All @@ -118,10 +123,9 @@
<p className="whitespace-pre-wrap text-sm font-semibold leading-relaxed">
v{item.version}
</p>
<Badge>Experimental</Badge>
</div>
<p className="whitespace-pre-wrap leading-relaxed">
{item.description}
</p>
<div dangerouslySetInnerHTML={{ __html: description }} />

Check failure on line 128 in web/screens/Settings/CoreExtensions/TensorRtExtensionItem.tsx

View workflow job for this annotation

GitHub Actions / test-on-macos

Object Literal Property name `__html` must match one of the following formats: camelCase, snake_case, PascalCase, UPPER_CASE

Check failure on line 128 in web/screens/Settings/CoreExtensions/TensorRtExtensionItem.tsx

View workflow job for this annotation

GitHub Actions / test-on-ubuntu

Object Literal Property name `__html` must match one of the following formats: camelCase, snake_case, PascalCase, UPPER_CASE

Check failure on line 128 in web/screens/Settings/CoreExtensions/TensorRtExtensionItem.tsx

View workflow job for this annotation

GitHub Actions / test-on-windows (mcafee)

Object Literal Property name `__html` must match one of the following formats: camelCase, snake_case, PascalCase, UPPER_CASE
</div>

{(!compatibility || compatibility['platform']?.includes(PLATFORM)) &&
Expand Down Expand Up @@ -204,7 +208,6 @@
)
}

// TODO: NamH check for dark mode here
switch (installState) {
case 'Installed':
return (
Expand All @@ -223,4 +226,14 @@
}
}

const marked: Marked = new Marked({
renderer: {
link: (href, title, text) => {
return Renderer.prototype.link
?.apply(this, [href, title, text])
.replace('<a', "<a class='text-blue-500' target='_blank'")
},
},
})

export default TensorRtExtensionItem
Loading