Skip to content
Open
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
5 changes: 5 additions & 0 deletions .agents/rules/pytc-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
trigger: always_on
glob:
description:
---
17 changes: 17 additions & 0 deletions .logs/start/api-server.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
INFO: Started server process [1802573]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:4242 (Press CTRL+C to quit)
================================================================================
EHTOOL ROUTER MODULE LOADED - VERSION: DEBUG v2
================================================================================
INFO: 127.0.0.1:52216 - "GET /health HTTP/1.1" 200 OK
INFO: 127.0.0.1:39000 - "GET /api/pm/data HTTP/1.1" 200 OK
INFO: 127.0.0.1:38992 - "GET /files?parent=root HTTP/1.1" 200 OK
INFO: 127.0.0.1:39000 - "GET /api/pm/data HTTP/1.1" 200 OK
INFO: 127.0.0.1:55914 - "OPTIONS /api/pm/login HTTP/1.1" 200 OK
INFO: 127.0.0.1:55930 - "POST /api/pm/login HTTP/1.1" 200 OK
INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [1802573]
1 change: 1 addition & 0 deletions .logs/start/data-server.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
127.0.0.1 - - [26/Mar/2026 14:48:47] "GET / HTTP/1.1" 200 -
21 changes: 21 additions & 0 deletions .logs/start/pytc-server.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
INFO: Started server process [1802650]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:4243 (Press CTRL+C to quit)

================================================================================
SERVER_PYTC STARTING UP
Python executable: /home/sam/Workshop/pytc-client/.venv/bin/python3
Working directory: /home/sam/Workshop/pytc-client
================================================================================


================================================================================
SERVER_PYTC: Starting Uvicorn server on port 4243...
================================================================================

INFO: 127.0.0.1:50152 - "GET /hello HTTP/1.1" 200 OK
INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [1802650]
82 changes: 82 additions & 0 deletions .logs/start/react-build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

> PyTC Client@0.1.0 build
> cross-env CI=false react-scripts build

[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`
Creating an optimized production build...
[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`
Compiled with warnings.

[eslint]
src/components/FilePickerModal.js
Line 102:35: Function declared in a loop contains unsafe references to variable(s) 'curr' no-loop-func
Line 124:35: Function declared in a loop contains unsafe references to variable(s) 'currParentId' no-loop-func
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

src/components/YamlFileUploader.js
Line 347:6: React Hook useEffect has missing dependencies: 'getCurrentConfig' and 'syncYamlContext'. Either include them or remove the dependency array react-hooks/exhaustive-deps
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
Line 374:6: React Hook useMemo has a missing dependency: 'getCurrentConfig'. Either include it or remove the dependency array react-hooks/exhaustive-deps

src/views/FilesManager.js
Line 81:31: Function declared in a loop contains unsafe references to variable(s) 'current' no-loop-func
Line 420:27: Function declared in a loop contains unsafe references to variable(s) 'curr' no-loop-func
Line 772:32: Function declared in a loop contains unsafe references to variable(s) 'descendantSizeKb', 'descendantSizeKb', 'descendantSizeKb', 'descendantSizeKb' no-loop-func
Line 1069: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

src/views/Views.js
Line 11:3: 'BarChartOutlined' is defined but never used no-unused-vars

src/views/mask-proofreading/MaskProofreading.js
Line 5:10: 'ehToolSession' is assigned a value but never used no-unused-vars
Line 5:25: 'setEhToolSession' is assigned a value but never used no-unused-vars
Line 6:10: 'refreshTrigger' is assigned a value but never used no-unused-vars
Line 6:26: 'setRefreshTrigger' is assigned a value but never used no-unused-vars

src/views/project-manager/AnnotationDashboard.js
Line 340:5: 'isAdmin' is assigned a value but never used no-unused-vars

src/views/project-manager/ModelQualityDashboard.js
Line 40:7: 'CONFUSION_MATRIX' is assigned a value but never used no-unused-vars

src/views/project-manager/ProjectManager.js
Line 19:3: 'UserOutlined' is defined but never used no-unused-vars
Line 20:3: 'CrownOutlined' is defined but never used no-unused-vars
Line 38:61: 'loading' is assigned a value but never used no-unused-vars

src/views/project-manager/ProjectManagerLogin.js
Line 14:11: 'success' is assigned a value but never used no-unused-vars

src/views/project-manager/ProofreaderProgress.js
Line 163:6: React Hook useMemo has a missing dependency: 'getStats'. Either include it or remove the dependency array react-hooks/exhaustive-deps

src/views/project-manager/QuotaManagement.js
Line 29:3: 'SaveOutlined' is defined but never used no-unused-vars
Line 98:5: 'activeWorker' is assigned a value but never used no-unused-vars

src/views/project-manager/VolumeTracker.js
Line 16:3: 'Popconfirm' is defined but never used no-unused-vars
Line 127:6: React Hook useMemo has an unnecessary dependency: 'isAdmin'. Either exclude it or remove the dependency array react-hooks/exhaustive-deps
Line 184:15: 'cfg' is assigned a value but never used no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

553.16 kB build/static/js/main.be80df26.js
465 B build/static/css/main.40821645.css

The bundle size is significantly larger than recommended.
Consider reducing it with code splitting: https://goo.gl/9VhYWB
You can also analyze the project dependencies: https://goo.gl/LeUzfb

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

https://cra.link/deployment

21 changes: 21 additions & 0 deletions .logs/start/react-dev.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

> PyTC Client@0.1.0 start
> react-scripts start

[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`
(node:1802959) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:1802959) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
Starting the development server...

Compiled successfully!

You can now view PyTC Client in the browser.

Local: http://localhost:3000
On Your Network: http://10.101.188.107:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

webpack compiled successfully
29 changes: 29 additions & 0 deletions client/src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,3 +462,32 @@ export async function getConfigPresetContent(path) {
export async function getModelArchitectures() {
return makeApiRequest("pytc/architectures", "get");
}

// ── Project Manager persistence ───────────────────────────────────────────────

export async function getPMData() {
try {
const res = await apiClient.get("/api/pm/data");
return res.data;
} catch (error) {
handleError(error);
}
}

export async function savePMData(state) {
try {
const res = await apiClient.post("/api/pm/data", state);
return res.data;
} catch (error) {
handleError(error);
}
}

export async function resetPMData() {
try {
const res = await apiClient.post("/api/pm/data/reset");
return res.data;
} catch (error) {
handleError(error);
}
}
4 changes: 2 additions & 2 deletions client/src/components/RuntimeLogPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function RuntimeLogPanel({ title, runtime, onRefresh }) {
background: "#fff",
border: "1px solid #f0f0f0",
fontFamily:
'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace',
"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace",
fontSize: 12,
color: "#262626",
wordBreak: "break-word",
Expand All @@ -142,7 +142,7 @@ function RuntimeLogPanel({ title, runtime, onRefresh }) {
whiteSpace: "pre-wrap",
wordBreak: "break-word",
fontFamily:
'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace',
"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace",
}}
>
{text || "No runtime logs captured yet."}
Expand Down
12 changes: 10 additions & 2 deletions client/src/components/YamlFileUploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,11 @@ const YamlFileUploader = (props) => {
{yamlContent ? (
<Row>
{sliderData.map((param, index) => {
const sliderValue = getSliderValue(currentYamlData, type, param.key);
const sliderValue = getSliderValue(
currentYamlData,
type,
param.key,
);
const sliderSupported = isSliderSupported(
currentYamlData,
type,
Expand All @@ -507,7 +511,11 @@ const YamlFileUploader = (props) => {
min={param.min}
max={param.max}
marks={param.marks}
value={typeof sliderValue === "number" ? sliderValue : param.value}
value={
typeof sliderValue === "number"
? sliderValue
: param.value
}
disabled={!sliderSupported}
onChange={(newValue) =>
handleSliderChange(param.key, newValue)
Expand Down
60 changes: 36 additions & 24 deletions client/src/configSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,26 @@ export function setTrainingOutputPath(configObj, outputPath) {
}
const checkpointsPath = joinPath(outputPath, "checkpoints");
if (hasPath(configObj, ["train", "monitor", "checkpoint", "dirpath"])) {
setPathValue(configObj, ["train", "monitor", "checkpoint", "dirpath"], checkpointsPath);
setPathValue(
configObj,
["train", "monitor", "checkpoint", "dirpath"],
checkpointsPath,
);
return;
}
if (hasPath(configObj, ["monitor", "checkpoint", "dirpath"])) {
setPathValue(configObj, ["monitor", "checkpoint", "dirpath"], checkpointsPath);
setPathValue(
configObj,
["monitor", "checkpoint", "dirpath"],
checkpointsPath,
);
return;
}
setPathValue(configObj, ["monitor", "checkpoint", "dirpath"], checkpointsPath);
setPathValue(
configObj,
["monitor", "checkpoint", "dirpath"],
checkpointsPath,
);
}

export function setInferenceOutputPath(configObj, outputPath) {
Expand All @@ -152,7 +164,11 @@ export function setInferenceOutputPath(configObj, outputPath) {
setPathValue(configObj, ["INFERENCE", "OUTPUT_PATH"], outputPath);
return;
}
setPathValue(configObj, ["inference", "save_prediction", "output_path"], outputPath);
setPathValue(
configObj,
["inference", "save_prediction", "output_path"],
outputPath,
);
}

export function setInferenceExecutionDefaults(configObj) {
Expand Down Expand Up @@ -212,16 +228,14 @@ export function applyInputPaths(
}

if (mode === "training") {
const imagePath =
pickFirstExistingPath(configObj, [
["train", "data", "train", "image"],
["data", "train", "image"],
]) || ["train", "data", "train", "image"];
const labelPath =
pickFirstExistingPath(configObj, [
["train", "data", "train", "label"],
["data", "train", "label"],
]) || ["train", "data", "train", "label"];
const imagePath = pickFirstExistingPath(configObj, [
["train", "data", "train", "image"],
["data", "train", "image"],
]) || ["train", "data", "train", "image"];
const labelPath = pickFirstExistingPath(configObj, [
["train", "data", "train", "label"],
["data", "train", "label"],
]) || ["train", "data", "train", "label"];
setPathValue(configObj, imagePath, inputImagePath);
setPathValue(configObj, labelPath, inputLabelPath);
if (outputPath) {
Expand All @@ -230,16 +244,14 @@ export function applyInputPaths(
return;
}

const imagePath =
pickFirstExistingPath(configObj, [
["test", "data", "test", "image"],
["data", "test", "image"],
]) || ["test", "data", "test", "image"];
const labelPath =
pickFirstExistingPath(configObj, [
["test", "data", "test", "label"],
["data", "test", "label"],
]) || ["test", "data", "test", "label"];
const imagePath = pickFirstExistingPath(configObj, [
["test", "data", "test", "image"],
["data", "test", "image"],
]) || ["test", "data", "test", "image"];
const labelPath = pickFirstExistingPath(configObj, [
["test", "data", "test", "label"],
["data", "test", "label"],
]) || ["test", "data", "test", "label"];
setPathValue(configObj, imagePath, inputImagePath);
if (hasLabelPath) {
setPathValue(configObj, labelPath, inputLabelPath);
Expand Down
Loading
Loading