Skip to content
Merged
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
4 changes: 2 additions & 2 deletions lib/src/blackfish/server/templates/text_generation_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docker run -d {{ '--runtime nvidia --gpus all' if job_config.gres else '' }} \
-v {{ container_config.model_dir }}:/data \
--name {{ name }} \
{{ image.docker_ref }} \
--model /data/snapshots/{{ container_config['revision'] }} \
/data/snapshots/{{ container_config['revision'] }} \
--port {{ container_config.port }} \
--revision {{ container_config.revision }} \
--trust-remote-code \
Expand All @@ -17,7 +17,7 @@ apptainer instance run {{ ' --nv' if job_config.gres > 0 else '' }} \
--bind {{ container_config.model_dir }}:/data \
{{ profile.cache_dir }}/images/{{ image.sif }} \
{{ name }} \
--model /data/snapshots/{{ container_config['revision'] }} \
/data/snapshots/{{ container_config['revision'] }} \
--port {{ container_config.port }} \
--revision {{ container_config.revision }} \
--trust-remote-code \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apptainer run {{ '--nv' if job_config.gres else '' }} \
--env PYTHONNOUSERSITE=1 \
--bind {{ container_config.model_dir }}:/data \
{{ profile.cache_dir }}/images/{{ image.sif }} \
--model /data/snapshots/{{ container_config['revision'] }} \
/data/snapshots/{{ container_config['revision'] }} \
--port $port \
--revision {{ container_config.revision }} \
--trust-remote-code \
Expand Down
6 changes: 3 additions & 3 deletions lib/tests/dev/test_text_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_remote_slurm():
"scheduler": "slurm",
"grace_period": 180,
"mount": "/home/cs7101",
"container_options": {"disable_custom_kernels": True, "revision": "latest"},
"container_options": {"revision": "latest"},
"job_options": {
"ntasks_per_node": 8,
"mem": "16",
Expand Down Expand Up @@ -42,7 +42,7 @@ def test_local_slurm():
"provider": "apptainer",
"grace_period": 180,
"mount": "/home/cs7101",
"container_options": {"disable_custom_kernels": True, "revision": "latest"},
"container_options": {"revision": "latest"},
"job_options": {
"ntasks_per_node": 8,
"mem": "16",
Expand All @@ -66,7 +66,7 @@ def test_local():
"cache_dir": "/home/cs7101/.blackfish",
"provider": "docker",
"grace_period": 180,
"container_options": {"disable_custom_kernels": True, "revision": "latest"},
"container_options": {"revision": "latest"},
"job_options": {
"ntasks_per_node": 8,
"mem": "16",
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/SidebarContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ SystemMessageInput.propTypes = {
* @param {string} options.task
* @param {object} options.defaultContainerOptions
* @param {string} options.defaultContainerOptions.input_dir
* @param {boolean} options.defaultContainerOptions.disable_custom_kernels
* @param {JSX.Element} options.ContainerOptionsFormComponent
* @param {JSX.Element} options.ParametersFormComponent
* @param {object} options.parametersFormProps
Expand Down Expand Up @@ -83,7 +82,6 @@ SidebarContainer.propTypes = {
task: PropTypes.string,
defaultContainerOptions: PropTypes.shape({
input_dir: PropTypes.string,
disable_custom_kernels: PropTypes.bool,
}),
ContainerOptionsFormComponent: PropTypes.elementType,
ParametersFormComponent: PropTypes.elementType,
Expand Down
3 changes: 1 addition & 2 deletions web/src/components/SidebarContainer.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ test("SidebarContainer", () => {
<SidebarContainer
task="speech-recognition"
defaultContainerOptions={{
input_dir: "",
disable_custom_kernels: false
input_dir: ""
}}
ContainerOptionsFormComponent={
TextGenerationContainerOptionsForm
Expand Down
4 changes: 0 additions & 4 deletions web/src/lib/requests.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ describe("buildContainerConfig", () => {
it("strips disable_thinking when false and adds no launch_kwargs", () => {
const out = buildContainerConfig({
disable_thinking: false,
disable_custom_kernels: false,
input_dir: "/data",
});
expect(out).toEqual({
disable_custom_kernels: false,
input_dir: "/data",
});
expect(out).not.toHaveProperty("disable_thinking");
Expand All @@ -19,13 +17,11 @@ describe("buildContainerConfig", () => {
it("translates disable_thinking=true into launch_kwargs and strips the flag", () => {
const out = buildContainerConfig({
disable_thinking: true,
disable_custom_kernels: false,
});
expect(out).not.toHaveProperty("disable_thinking");
expect(out.launch_kwargs).toBe(
`--default-chat-template-kwargs '{"enable_thinking": false, "thinking": false}'`
);
expect(out.disable_custom_kernels).toBe(false);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ function TextGenerationContainerOptionsForm({
</button>
{expanded && (
<div className="mt-3 space-y-3">
<ServiceModalCheckbox
checked={containerOptions.disable_custom_kernels}
onChange={() => setContainerOptions(prevContainerOptions => {
return {
...prevContainerOptions,
disable_custom_kernels: !prevContainerOptions.disable_custom_kernels,
};
})}
label="Disable Custom Kernels"
help="Disables custom CUDA kernels that may not work on all devices."
disabled={disabled}
/>
<ServiceModalCheckbox
checked={containerOptions.disable_thinking}
onChange={() => setContainerOptions(prevContainerOptions => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { describe, it, expect, vi } from "vitest";
import TextGenerationContainerOptionsForm from "./TextGenerationContainerOptionsForm";

const defaultOptions = {
disable_custom_kernels: false,
disable_thinking: true,
};

Expand Down Expand Up @@ -37,7 +36,6 @@ describe("TextGenerationContainerOptionsForm", () => {
expect(queryByText("Disable Thinking")).not.toBeInTheDocument();
await user.click(getByText("Deployment Options"));
expect(checkboxFor(container, "Disable Thinking")).toBeInTheDocument();
expect(checkboxFor(container, "Disable Custom Kernels")).toBeInTheDocument();
});

it("renders Disable Thinking checked when disable_thinking is true", async () => {
Expand Down
1 change: 0 additions & 1 deletion web/src/routes/text-generation/text-generation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ export default function TextGenerationPage() {

const defaultContainerOptions = useMemo(() => {
return {
disable_custom_kernels: false,
disable_thinking: true,
};
}, []);
Expand Down
Loading