Skip to content

Commit 70c181f

Browse files
committed
feat: support for nested output directory
I find I am manually doing this - makes sense to have it programatically done. Signed-off-by: vsoch <vsoch@users.noreply.github.com>
1 parent 2a974c0 commit 70c181f

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

examples/servers/flux-gemini.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@ tools:
33
- path: flux_mcp.validate.flux_validate_batch_jobspec
44
name: validate_flux_jobspec
55

6-
prompts:
7-
- path: hpc_mcp.job.validate.validate_jobspec_expert
8-
- path: hpc_mcp.job.transform.transform_jobspec_expert

fractale/db/memory.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,23 @@ def save(self, data=None, uid=None):
8686
"""
8787
Save results to json in PWD.
8888
"""
89-
os.makedirs(".fractale", exist_ok=True)
90-
# Save according to unique identifier or timestamp
9189
timestamp = datetime.now().strftime("%Y%m%d-%H%M%S")
90+
outdir = os.path.join(".fractale", timestamp)
91+
os.makedirs(outdir, exist_ok=True)
92+
# Save according to unique identifier or timestamp
9293
uid = uid or timestamp
93-
path = os.path.join(".fractale", f"{uid}-events.json")
94+
path = os.path.join(outdir, f"{uid}-events.json")
9495
print(f"💾 Saving results to {path}")
96+
# Events saved for orchestration
9597
results = {"events": self.events}
9698
if data:
9799
results["metadata"] = data
98100
utils.write_json(results, path)
101+
# And metrics
99102
if not self.metrics:
100103
return
101104
results = {"metrics": self.metrics}
102105
if data:
103106
results["metadata"] = data
104-
path = os.path.join(".fractale", f"{uid}-metrics.json")
107+
path = os.path.join(outdir, f"{uid}-metrics.json")
105108
utils.write_json(self.metrics, path)

fractale/version.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
DESCRIPTION = "Agentic framework for HPC orchestration"
88
LICENSE = "LICENSE"
99

10-
1110
################################################################################
1211
# TODO vsoch: refactor this to use newer pyproject stuff.
1312

0 commit comments

Comments
 (0)