Skip to content

Commit

Permalink
Use charred instead of cheshire for Tribuo JSON (#446)
Browse files Browse the repository at this point in the history
* Use charred instead of cheshire for JSON

* Add Intellij project files to gitignore
  • Loading branch information
enragedginger authored Jan 28, 2025
1 parent c0e40ef commit 05b027f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ java_test/test.arrow
java_test/simulation*
.idea
.calva
*.iml
4 changes: 2 additions & 2 deletions src/tech/v3/libs/tribuo.clj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ _unnamed [5 1]:
[tech.v3.datatype :as dtype]
[tech.v3.datatype.casting :as casting]
[clojure.set :as set]
[cheshire.core :as json])
[charred.api :as charred])
(:import [tech.v3.datatype Buffer ArrayHelpers]
[java.util HashMap Map List]
[java.nio.file Files]
Expand Down Expand Up @@ -321,6 +321,6 @@ _unnamed [5 1]:
[config-components trainer-name]
(let [config {:config {:components config-components}}
tmp (.toString (Files/createTempFile "config" ".json" (make-array FileAttribute 0)))
_ (->> config json/generate-string (spit tmp))
_ (charred/write-json tmp config)
config-manager (ConfigurationManager. tmp)]
(.lookup config-manager trainer-name)))

0 comments on commit 05b027f

Please sign in to comment.