mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-09 14:22:13 +00:00
docs: align package config and documentation paths
- Update `package.json` to include `TORCH.md` and `scripts/memory/` in distribution. - Update `README.md` to reference `TORCH.md` correctly. - Update `src/ops.mjs` to robustly handle memory policy paths in `torch-config.json` generation. - Update `.gitignore` to exclude `.scheduler-memory/`. - Update `torch-config.example.json` to include memory policy with standard defaults. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
d365d12b76
commit
7c41e040bd
83 files changed
+41
-1148
No files matched your search
+8
-3
@@ -260,19 +260,24 @@ function configureTorch(cwd, paths, installDir, namespace, relays) {
|
||||
configData.scheduler.memoryPolicyByCadence = {};
|
||||
}
|
||||
|
||||
// Populate daily/weekly if missing
|
||||
// Populate or update daily/weekly memory policy
|
||||
// We force update the command paths to match the install directory,
|
||||
// while preserving other settings if they exist.
|
||||
['daily', 'weekly'].forEach(cadence => {
|
||||
if (!configData.scheduler.memoryPolicyByCadence[cadence]) {
|
||||
configData.scheduler.memoryPolicyByCadence[cadence] = {
|
||||
mode: "required",
|
||||
retrieveCommand: `node ${scriptPrefix}scripts/memory/retrieve.mjs`,
|
||||
storeCommand: `node ${scriptPrefix}scripts/memory/store.mjs`,
|
||||
retrieveSuccessMarkers: ["MEMORY_RETRIEVED"],
|
||||
storeSuccessMarkers: ["MEMORY_STORED"],
|
||||
retrieveArtifacts: [`.scheduler-memory/latest/${cadence}/retrieve.ok`],
|
||||
storeArtifacts: [`.scheduler-memory/latest/${cadence}/store.ok`]
|
||||
};
|
||||
}
|
||||
|
||||
// Always ensure commands point to the correct script location
|
||||
const policy = configData.scheduler.memoryPolicyByCadence[cadence];
|
||||
policy.retrieveCommand = `node ${scriptPrefix}scripts/memory/retrieve.mjs`;
|
||||
policy.storeCommand = `node ${scriptPrefix}scripts/memory/store.mjs`;
|
||||
});
|
||||
|
||||
fs.writeFileSync(configPath, JSON.stringify(configData, null, 2), 'utf8');
|
||||
|
||||
Reference in new issue
Block a user