Skip to content

Commit c17e396

Browse files
author
Tian-hao Zhang
committed
Update chatbot docs for UI changes and fix Ollama port
- Created MaskProofreading.md (replaces ErrorHandlingTool + WormErrorHandling) - Updated GettingStarted.md with chat history, saved chats, inline help - Updated ModelInference.md (removed Input Label field) - Updated ModelTraining.md (added inline help section) - Updated all Ollama endpoints to use port 4443 (bypasses firewall) - Fixed pytorch-connectomics package name mismatch in setup.py - Strengthened supervisor prompt to prevent CLI hallucinations - Added explicit routing rules for UI vs command-generation questions - Created comprehensive 88-question RAG eval script - Rebuilt FAISS index: 34 vectors, 7 docs
1 parent cf38f32 commit c17e396

35 files changed

Lines changed: 1765 additions & 714 deletions

.logs/start/api-server.log

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
INFO: Started server process [69167]
2+
INFO: Waiting for application startup.
3+
INFO: Application startup complete.
4+
INFO: Uvicorn running on http://0.0.0.0:4242 (Press CTRL+C to quit)
5+
================================================================================
6+
EHTOOL ROUTER MODULE LOADED - VERSION: DEBUG v2
7+
================================================================================
8+
INFO: 127.0.0.1:60334 - "GET /health HTTP/1.1" 200 OK
9+
INFO: 127.0.0.1:60379 - "GET /files?parent=root HTTP/1.1" 200 OK
10+
INFO: 127.0.0.1:60383 - "GET /chat/conversations HTTP/1.1" 200 OK
11+
INFO: 127.0.0.1:60383 - "GET /chat/conversations HTTP/1.1" 200 OK
12+
INFO: 127.0.0.1:60383 - "OPTIONS /chat/conversations/1 HTTP/1.1" 200 OK
13+
INFO: 127.0.0.1:60383 - "DELETE /chat/conversations/1 HTTP/1.1" 200 OK
14+
INFO: 127.0.0.1:60389 - "OPTIONS /chat/query HTTP/1.1" 200 OK
15+
[SEARCH] Loaded 7 docs for keyword search: ['MaskProofreading.md', 'FileManager.md', 'ModelInference.md', 'GettingStarted.md', 'ModelTraining.md', 'Visualization.md', 'Monitoring.md']
16+
[TOOL] search_documentation(query='upload training data server PyTC Client upload training data to server') [call 1]
17+
[TOOL] RAG → 2 chunks: ['GettingStarted.md', 'ModelTraining.md']
18+
[TOOL] search_documentation(query='File Manager upload training data PyTC Client') [call 2]
19+
[TOOL] RAG → 2 chunks: ['FileManager.md', 'ModelTraining.md']
20+
INFO: 127.0.0.1:60389 - "POST /chat/query HTTP/1.1" 200 OK
21+
INFO: 127.0.0.1:60389 - "GET /chat/conversations HTTP/1.1" 200 OK
22+
[TOOL] search_documentation(query='training workflow what do I need to provide PyTC Client training new model') [call 1]
23+
[TOOL] RAG → 2 chunks: ['GettingStarted.md', 'ModelInference.md']
24+
[TOOL] search_documentation(query='Model Training page what inputs are required PyTC Client') [call 2]
25+
[TOOL] RAG → 2 chunks: ['GettingStarted.md', 'ModelTraining.md']
26+
INFO: 127.0.0.1:60389 - "POST /chat/query HTTP/1.1" 200 OK
27+
INFO: 127.0.0.1:60389 - "GET /chat/conversations HTTP/1.1" 200 OK
28+
[TOOL] search_documentation(query='monitor training progress real-time PyTC Client UI') [call 1]
29+
[TOOL] RAG → 2 chunks: ['ModelTraining.md', 'GettingStarted.md']
30+
INFO: 127.0.0.1:60502 - "POST /chat/query HTTP/1.1" 200 OK
31+
INFO: 127.0.0.1:60502 - "GET /chat/conversations HTTP/1.1" 200 OK
32+
INFO: Shutting down
33+
INFO: Waiting for application shutdown.
34+
INFO: Application shutdown complete.
35+
INFO: Finished server process [69167]

.logs/start/data-server.log

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
127.0.0.1 - - [03/Apr/2026 15:13:18] "GET / HTTP/1.1" 200 -

.logs/start/pytc-server.log

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
INFO: Started server process [69189]
2+
INFO: Waiting for application startup.
3+
INFO: Application startup complete.
4+
INFO: Uvicorn running on http://0.0.0.0:4243 (Press CTRL+C to quit)
5+
6+
================================================================================
7+
SERVER_PYTC STARTING UP
8+
Python executable: /Users/tizhang/Desktop/pytc-client/.venv/bin/python3
9+
Working directory: /Users/tizhang/Desktop/pytc-client
10+
================================================================================
11+
12+
13+
================================================================================
14+
SERVER_PYTC: Starting Uvicorn server on port 4243...
15+
================================================================================
16+
17+
INFO: 127.0.0.1:60339 - "GET /hello HTTP/1.1" 200 OK
18+
INFO: Shutting down
19+
INFO: Waiting for application shutdown.
20+
INFO: Application shutdown complete.
21+
INFO: Finished server process [69189]

.logs/start/react-build.log

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
npm warn Unknown user config "always-auth". This will stop working in the next major version of npm.
2+
npm warn Unknown user config "always-auth" (//firelayers.jfrog.io/artifactory/api/npm/itc-npm-virtual/:always-auth). This will stop working in the next major version of npm.
3+
4+
> PyTC Client@0.1.0 build
5+
> cross-env CI=false react-scripts build
6+
7+
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
8+
Creating an optimized production build...
9+
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
10+
Compiled with warnings.
11+
12+
[eslint]
13+
src/components/FilePickerModal.js
14+
Line 102:35: Function declared in a loop contains unsafe references to variable(s) 'curr' no-loop-func
15+
Line 124:35: Function declared in a loop contains unsafe references to variable(s) 'currParentId' no-loop-func
16+
Line 243:15: The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md jsx-a11y/anchor-is-valid
17+
18+
src/components/YamlFileUploader.js
19+
Line 347:6: React Hook useEffect has missing dependencies: 'getCurrentConfig' and 'syncYamlContext'. Either include them or remove the dependency array react-hooks/exhaustive-deps
20+
Line 361:6: React Hook useEffect has missing dependencies: 'getCurrentConfig', 'setCurrentConfig', and 'updateInputSelectorInformation'. Either include them or remove the dependency array react-hooks/exhaustive-deps
21+
Line 374:6: React Hook useMemo has a missing dependency: 'getCurrentConfig'. Either include it or remove the dependency array react-hooks/exhaustive-deps
22+
23+
src/views/EHTool.js
24+
Line 25:6: React Hook useEffect has a missing dependency: 'sessionId'. Either include it or remove the dependency array react-hooks/exhaustive-deps
25+
26+
src/views/FilesManager.js
27+
Line 81:31: Function declared in a loop contains unsafe references to variable(s) 'current' no-loop-func
28+
Line 424:27: Function declared in a loop contains unsafe references to variable(s) 'curr' no-loop-func
29+
Line 776:32: Function declared in a loop contains unsafe references to variable(s) 'descendantSizeKb', 'descendantSizeKb', 'descendantSizeKb', 'descendantSizeKb' no-loop-func
30+
Line 1073:6: React Hook useEffect has missing dependencies: 'finishCreateFolder', 'finishRename', 'handleCopy', 'handleCut', 'handleDelete', and 'handlePaste'. Either include them or remove the dependency array react-hooks/exhaustive-deps
31+
32+
src/views/ehtool/DetectionWorkflow.js
33+
Line 225:6: React Hook useEffect has a missing dependency: 'loadInstances'. Either include it or remove the dependency array react-hooks/exhaustive-deps
34+
Line 274:20: The ref value 'schedulerRef.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'schedulerRef.current' to a variable inside the effect, and use that variable in the cleanup function react-hooks/exhaustive-deps
35+
Line 314:6: React Hook useEffect has a missing dependency: 'loadInstanceView'. Either include it or remove the dependency array react-hooks/exhaustive-deps
36+
Line 355:6: React Hook useEffect has a missing dependency: 'loadInstanceView'. Either include it or remove the dependency array react-hooks/exhaustive-deps
37+
Line 416:6: React Hook useEffect has missing dependencies: 'goToNextInstance', 'goToPreviousInstance', 'handleAxisChange', and 'handleInstanceClassify'. Either include them or remove the dependency array react-hooks/exhaustive-deps
38+
Line 524:6: React Hook useEffect has a missing dependency: 'clearFrameCaches'. Either include it or remove the dependency array react-hooks/exhaustive-deps
39+
40+
src/views/ehtool/ProofreadingEditor.js
41+
Line 140:8: React Hook useEffect has a missing dependency: 'loadImages'. Either include it or remove the dependency array react-hooks/exhaustive-deps
42+
Line 148:8: React Hook useEffect has missing dependencies: 'drawCanvas' and 'drawMinimap'. Either include them or remove the dependency array react-hooks/exhaustive-deps
43+
Line 163:8: React Hook useEffect has missing dependencies: 'drawCanvas' and 'drawMinimap'. Either include them or remove the dependency array react-hooks/exhaustive-deps
44+
Line 403:8: React Hook useEffect has a missing dependency: 'loadOverlayImage'. Either include it or remove the dependency array react-hooks/exhaustive-deps
45+
Line 407:8: React Hook useEffect has a missing dependency: 'loadOverlayImage'. Either include it or remove the dependency array react-hooks/exhaustive-deps
46+
Line 653:7: React Hook useMemo has a missing dependency: 'glasbeyColor'. Either include it or remove the dependency array react-hooks/exhaustive-deps
47+
Line 662:8: React Hook useEffect has missing dependencies: 'drawCanvas' and 'drawMinimap'. Either include them or remove the dependency array react-hooks/exhaustive-deps
48+
Line 899:9: Expected a default case default-case
49+
Line 940:8: React Hook useEffect has missing dependencies: 'handleRedo', 'handleSave', and 'handleUndo'. Either include them or remove the dependency array react-hooks/exhaustive-deps
50+
51+
Search for the keywords to learn more about each warning.
52+
To ignore, add // eslint-disable-next-line to the line before.
53+
54+
File sizes after gzip:
55+
56+
481.63 kB build/static/js/main.ea9ff1f9.js
57+
465 B build/static/css/main.40821645.css
58+
59+
The project was built assuming it is hosted at ./.
60+
You can control this with the homepage field in your package.json.
61+
62+
The build folder is ready to be deployed.
63+
64+
Find out more about deployment here:
65+
66+
https://cra.link/deployment
67+

.logs/start/react-dev.log

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
npm warn Unknown user config "always-auth". This will stop working in the next major version of npm.
2+
npm warn Unknown user config "always-auth" (//firelayers.jfrog.io/artifactory/api/npm/itc-npm-virtual/:always-auth). This will stop working in the next major version of npm.
3+
4+
> PyTC Client@0.1.0 start
5+
> react-scripts start
6+
7+
[baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
8+
(node:69273) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
9+
(Use `node --trace-deprecation ...` to show where the warning was created)
10+
(node:69273) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
11+
Starting the development server...
12+
13+
Compiled successfully!
14+
15+
You can now view PyTC Client in the browser.
16+
17+
Local: http://localhost:3000
18+
On Your Network: http://192.168.99.154:3000
19+
20+
Note that the development build is not optimized.
21+
To create a production build, use npm run build.
22+
23+
webpack compiled successfully

client/preload.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const { contextBridge, ipcRenderer } = require("electron");
22

33
contextBridge.exposeInMainWorld("electronAPI", {
44
isElectron: true,
5-
openLocalFile: (options = {}) => ipcRenderer.invoke("open-local-file", options),
5+
openLocalFile: (options = {}) =>
6+
ipcRenderer.invoke("open-local-file", options),
67
revealInFinder: (targetPath) =>
78
ipcRenderer.invoke("reveal-in-finder", targetPath),
89
});

client/src/components/RuntimeLogPanel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function RuntimeLogPanel({ title, runtime, onRefresh }) {
117117
background: "#fff",
118118
border: "1px solid #f0f0f0",
119119
fontFamily:
120-
'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace',
120+
"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace",
121121
fontSize: 12,
122122
color: "#262626",
123123
wordBreak: "break-word",
@@ -142,7 +142,7 @@ function RuntimeLogPanel({ title, runtime, onRefresh }) {
142142
whiteSpace: "pre-wrap",
143143
wordBreak: "break-word",
144144
fontFamily:
145-
'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace',
145+
"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace",
146146
}}
147147
>
148148
{text || "No runtime logs captured yet."}

client/src/components/YamlFileUploader.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,11 @@ const YamlFileUploader = (props) => {
490490
{yamlContent ? (
491491
<Row>
492492
{sliderData.map((param, index) => {
493-
const sliderValue = getSliderValue(currentYamlData, type, param.key);
493+
const sliderValue = getSliderValue(
494+
currentYamlData,
495+
type,
496+
param.key,
497+
);
494498
const sliderSupported = isSliderSupported(
495499
currentYamlData,
496500
type,
@@ -507,7 +511,11 @@ const YamlFileUploader = (props) => {
507511
min={param.min}
508512
max={param.max}
509513
marks={param.marks}
510-
value={typeof sliderValue === "number" ? sliderValue : param.value}
514+
value={
515+
typeof sliderValue === "number"
516+
? sliderValue
517+
: param.value
518+
}
511519
disabled={!sliderSupported}
512520
onChange={(newValue) =>
513521
handleSliderChange(param.key, newValue)

client/src/configSchema.js

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,26 @@ export function setTrainingOutputPath(configObj, outputPath) {
135135
}
136136
const checkpointsPath = joinPath(outputPath, "checkpoints");
137137
if (hasPath(configObj, ["train", "monitor", "checkpoint", "dirpath"])) {
138-
setPathValue(configObj, ["train", "monitor", "checkpoint", "dirpath"], checkpointsPath);
138+
setPathValue(
139+
configObj,
140+
["train", "monitor", "checkpoint", "dirpath"],
141+
checkpointsPath,
142+
);
139143
return;
140144
}
141145
if (hasPath(configObj, ["monitor", "checkpoint", "dirpath"])) {
142-
setPathValue(configObj, ["monitor", "checkpoint", "dirpath"], checkpointsPath);
146+
setPathValue(
147+
configObj,
148+
["monitor", "checkpoint", "dirpath"],
149+
checkpointsPath,
150+
);
143151
return;
144152
}
145-
setPathValue(configObj, ["monitor", "checkpoint", "dirpath"], checkpointsPath);
153+
setPathValue(
154+
configObj,
155+
["monitor", "checkpoint", "dirpath"],
156+
checkpointsPath,
157+
);
146158
}
147159

148160
export function setInferenceOutputPath(configObj, outputPath) {
@@ -152,7 +164,11 @@ export function setInferenceOutputPath(configObj, outputPath) {
152164
setPathValue(configObj, ["INFERENCE", "OUTPUT_PATH"], outputPath);
153165
return;
154166
}
155-
setPathValue(configObj, ["inference", "save_prediction", "output_path"], outputPath);
167+
setPathValue(
168+
configObj,
169+
["inference", "save_prediction", "output_path"],
170+
outputPath,
171+
);
156172
}
157173

158174
export function setInferenceExecutionDefaults(configObj) {
@@ -212,16 +228,14 @@ export function applyInputPaths(
212228
}
213229

214230
if (mode === "training") {
215-
const imagePath =
216-
pickFirstExistingPath(configObj, [
217-
["train", "data", "train", "image"],
218-
["data", "train", "image"],
219-
]) || ["train", "data", "train", "image"];
220-
const labelPath =
221-
pickFirstExistingPath(configObj, [
222-
["train", "data", "train", "label"],
223-
["data", "train", "label"],
224-
]) || ["train", "data", "train", "label"];
231+
const imagePath = pickFirstExistingPath(configObj, [
232+
["train", "data", "train", "image"],
233+
["data", "train", "image"],
234+
]) || ["train", "data", "train", "image"];
235+
const labelPath = pickFirstExistingPath(configObj, [
236+
["train", "data", "train", "label"],
237+
["data", "train", "label"],
238+
]) || ["train", "data", "train", "label"];
225239
setPathValue(configObj, imagePath, inputImagePath);
226240
setPathValue(configObj, labelPath, inputLabelPath);
227241
if (outputPath) {
@@ -230,16 +244,14 @@ export function applyInputPaths(
230244
return;
231245
}
232246

233-
const imagePath =
234-
pickFirstExistingPath(configObj, [
235-
["test", "data", "test", "image"],
236-
["data", "test", "image"],
237-
]) || ["test", "data", "test", "image"];
238-
const labelPath =
239-
pickFirstExistingPath(configObj, [
240-
["test", "data", "test", "label"],
241-
["data", "test", "label"],
242-
]) || ["test", "data", "test", "label"];
247+
const imagePath = pickFirstExistingPath(configObj, [
248+
["test", "data", "test", "image"],
249+
["data", "test", "image"],
250+
]) || ["test", "data", "test", "image"];
251+
const labelPath = pickFirstExistingPath(configObj, [
252+
["test", "data", "test", "label"],
253+
["data", "test", "label"],
254+
]) || ["test", "data", "test", "label"];
243255
setPathValue(configObj, imagePath, inputImagePath);
244256
if (hasLabelPath) {
245257
setPathValue(configObj, labelPath, inputLabelPath);

client/src/configSchema.test.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
applyInputPaths,
3-
setInferenceExecutionDefaults,
4-
} from "./configSchema";
1+
import { applyInputPaths, setInferenceExecutionDefaults } from "./configSchema";
52

63
describe("setInferenceExecutionDefaults", () => {
74
it("preserves existing legacy GPU values", () => {

0 commit comments

Comments
 (0)