Skip to content

Commit

Permalink
update parallel_map version
Browse files Browse the repository at this point in the history
  • Loading branch information
nohzafk committed Aug 20, 2024
1 parent 3d9942c commit 23a557f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
3 changes: 1 addition & 2 deletions gleam.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ gleam_community_maths = ">= 1.1.1 and < 2.0.0"
mat = ">= 1.0.0 and < 2.0.0"
qcheck_gleeunit_utils = ">= 0.1.0 and < 1.0.0"
birl = ">= 1.7.1 and < 2.0.0"
parallel_map = ">= 2.0.0 and < 3.0.0"
# parallel_map = { path = "../parallel_map" }
parallel_map = ">= 2.1.0 and < 3.0.0"
gleam_erlang = ">= 0.25.0 and < 1.0.0"

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ packages = [
{ name = "birl", version = "1.7.1", build_tools = ["gleam"], requirements = ["gleam_stdlib", "ranger"], otp_app = "birl", source = "hex", outer_checksum = "5C66647D62BCB11FE327E7A6024907C4A17954EF22865FE0940B54A852446D01" },
{ name = "gleam_community_maths", version = "1.1.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_community_maths", source = "hex", outer_checksum = "6C4ED7BC7E7DF6977719B5F2CFE717EE8280D1CF6EA81D55FD9953758C7FD14E" },
{ name = "gleam_erlang", version = "0.25.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "054D571A7092D2A9727B3E5D183B7507DAB0DA41556EC9133606F09C15497373" },
{ name = "gleam_otp", version = "0.10.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "0B04FE915ACECE539B317F9652CAADBBC0F000184D586AAAF2D94C100945D72B" },
{ name = "gleam_otp", version = "0.11.1", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "54C04621B3B5C8E5AE5DC7EF250EEA3C9109FB4F729723A865E41211E77EBEE0" },
{ name = "gleam_stdlib", version = "0.39.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "2D7DE885A6EA7F1D5015D1698920C9BAF7241102836CE0C3837A4F160128A9C4" },
{ name = "gleeunit", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "F7A7228925D3EE7D0813C922E062BFD6D7E9310F0BEE585D3A42F3307E3CFD13" },
{ name = "mat", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "mat", source = "hex", outer_checksum = "CCC6642918C2FB70CE69967EE649E8AF95180059423DE1ED2ED362A0ABDAF739" },
{ name = "parallel_map", version = "2.0.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_otp", "gleam_stdlib"], otp_app = "parallel_map", source = "hex", outer_checksum = "653714A9FD63EACD1A9D0A6582A972B0EC109AE275CDDD2E99CFC3DFAFAB9225" },
{ name = "parallel_map", version = "2.1.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_otp", "gleam_stdlib"], otp_app = "parallel_map", source = "hex", outer_checksum = "DE2BA9878728EF9EE34BE83FEDC7A18A1ABE4B2AC1E79C710E3E5D95F5E73404" },
{ name = "qcheck_gleeunit_utils", version = "0.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleeunit"], otp_app = "qcheck_gleeunit_utils", source = "hex", outer_checksum = "0C262D4636DEFC0BE8FA525DC193C2CC1E9D12A3BC26F9CA1F6B7FBB0E20C7B5" },
{ name = "ranger", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "ranger", source = "hex", outer_checksum = "1566C272B1D141B3BBA38B25CB761EF56E312E79EC0E2DFD4D3C19FB0CC1F98C" },
]
Expand All @@ -21,5 +21,5 @@ gleam_erlang = { version = ">= 0.25.0 and < 1.0.0" }
gleam_stdlib = { version = ">= 0.34.0 and < 2.0.0" }
gleeunit = { version = ">= 1.0.0 and < 2.0.0" }
mat = { version = ">= 1.0.0 and < 2.0.0" }
parallel_map = { version = ">= 2.0.0 and < 3.0.0" }
parallel_map = { version = ">= 2.1.0 and < 3.0.0" }
qcheck_gleeunit_utils = { version = ">= 0.1.0 and < 1.0.0" }
3 changes: 1 addition & 2 deletions src/nested_tensor.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -1313,8 +1313,7 @@ pub fn grid_search(
batch_size |> list.map(dynamic.from),
]
|> cartesian_product
// use parallel_map.list_find_pmap
|> parallel_map.list_pmap(
|> parallel_map.list_find_pmap(
fn(hypers) {
let assert [revs, alpha, batch_size] = hypers
let assert Ok(ok_revs) = revs |> dynamic.int
Expand Down
13 changes: 7 additions & 6 deletions test/iris_test.gleam
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import gleam/io
import iris
import nested_tensor
import qcheck_gleeunit_utils/test_spec
// only takes 10 seconds to run all the grid_search on M3 Max
// import gleam/io
// import iris
// import nested_tensor
// import qcheck_gleeunit_utils/test_spec

// // only takes 10 seconds to run all the grid_search on M3 Max
// pub fn grid_search_test_() {
// use <- test_spec.make
// iris.print_note()
// "naked_gradient_descent" |> io.println_error

// iris.grid_search_iris_theta(malt0.naked_gradient_descent)
// iris.grid_search_iris_theta(nested_tensor.naked_gradient_descent)
// }

0 comments on commit 23a557f

Please sign in to comment.