fixed yaml file advanced setting not populating issue at model traini…#120
fixed yaml file advanced setting not populating issue at model traini…#120sam4coding wants to merge 3 commits intoPytorchConnectomics:mainfrom
Conversation
|
The original issue (#110) is about a specific case where the Auto-populating the advanced config page already works for other yaml config files (like those in Also, not sure if the And you can see instructions in |
871cc27 to
98a7a52
Compare
| * Returns the schema family name for the given parsed YAML object, | ||
| * or "unknown" if it cannot be identified. | ||
| * @param {object} yamlData | ||
| * @returns {"pytc"|"lucchi+"|"unknown"} |
There was a problem hiding this comment.
i think generally speaking, it's probably not a good idea to hard code lucchi into the codebase, as it is just one of many potential pytc configs for inference and training. in fact, such a config could be applied to any similar mito dataset......double check the implementation throughout the PR to make sure it's in line with the general implementation of the inference/training YAMLs in the parent PytorchConnectomics repo
| if (pytcKeys.some((k) => k in yamlData)) return "pytc"; | ||
|
|
||
| const lucchiKeys = ["data", "optimization", "experiment_name"]; | ||
| if (lucchiKeys.some((k) => k in yamlData)) return "lucchi+"; |
There was a problem hiding this comment.
basically lucchi should never be referred to throughout the codebase and the implementation of parsing should be generalist for the PytorchConnectomics models
akgohain
left a comment
There was a problem hiding this comment.
stuff in the comments. see https://github.com/PytorchConnectomics/pytorch_connectomics for implementation reference
|
Thank you for the guidance, @akgohain. I have completely refactored the yamlSchemaAdapter.js to remove all dataset-specific hardcoding (e.g., 'lucchi') and align with the general implementation of the pytorch_connectomics library. Key improvements in this update: Generalist Detection: The parser now identifies schemas based on structural blocks (MODEL, DATASET, SOLVER, etc.) rather than specific dataset names. Dual-Case Support: Based on a scan of the parent repository, I found that both YACS-style (Uppercase) and Hydra-style (Lowercase) configs coexist. The adapter now supports both patterns seamlessly. Automatic Adaptation: Standard uppercase configs are passed through directly, while lowercase patterns are adapted to the internal YACS-style requirements of the client. Schema Labeling: All identified configurations are now categorized simply as standard to ensure the codebase remains dataset-agnostic. Please let me know if this revised approach meets the project's standards! |


Fix: Advanced Configuration tab not auto-populating when YAML preset is selected
Root Cause: The useEffect hook in
YamlFileEditor.js
had context.uploadedYamlFile in its dependency array, which prevented the YAML content from loading properly when a preset was selected (since uploadedYamlFile doesn't change for presets).
Solution: Removed context.uploadedYamlFile from the dependency array. The effect now correctly triggers whenever trainingConfig or inferenceConfig changes, regardless of whether the config came from an uploaded file or a preset.
Files Modified:
client/src/components/YamlFileEditor.js
(line 331-335)