Skip to content
Draft
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
2 changes: 1 addition & 1 deletion dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ stages:
cmd: >
clj -X inferenceql.structure-learning.clojurecat/merge
:models data/xcat/complete
:out data/xcat/xcat.merged.edn
> data/xcat/xcat.merged.edn
deps:
- data/xcat/complete
outs:
Expand Down
20 changes: 9 additions & 11 deletions src/clojure/inferenceql/structure_learning/clojurecat.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@

(defn merge
"Merges the GPMs in a directory."
[{path :models out :out}]
(let [path (str path)
out (str out)]
(->> (io/file path)
(file-seq)
(filter #(.isFile %))
(map slurp)
(map gpm/read-string)
(ensemble/ensemble)
(pr-str)
(spit out))))
[{path :models}]
(let [path (str path)]
(->> (io/file path)
(file-seq)
(filter #(.isFile %))
(map slurp)
(map gpm/read-string)
(ensemble/ensemble)
(prn))))