Skip to content

Commit

Permalink
fixes to test
Browse files Browse the repository at this point in the history
  • Loading branch information
zouter committed May 23, 2024
1 parent fddb7f1 commit a08f801
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dependencies = [
"tensorstore",
"requests",
"zarr",
"pathlibfs",
]
dynamic = ["version", "readme"]
license = {text = "MIT"}
Expand Down
4 changes: 1 addition & 3 deletions src/chromatinhd/models/diff/model/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ def train_model(
Trains the model
"""

# print(regions_oi, n_epochs)

if fragments is None:
fragments = self.fragments
if clustering is None:
Expand Down Expand Up @@ -515,7 +513,7 @@ def train_models(
path=model_folder,
**self.model_params,
)
model.train_model(device=device, pbar=True, regions_oi=regions_oi, **self.train_params)
model.train_model(device=device, pbar=True, regions_oi=regions_oi, **{**self.train_params, **kwargs})
model.save_state()

model = model.to("cpu")
Expand Down
2 changes: 1 addition & 1 deletion tests/data/motifscan/test_motifscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_scan():
scores, positions, strands = chd.data.motifscan.motifscan.scan(onehot, pwm, cutoff=1.5)

assert np.allclose(scores, test["expected_scores"]), (test["sequence"], scores)
assert np.allclose(positions, test["expected_positions"].astype(np.int))
assert np.allclose(positions, test["expected_positions"].astype(positions.dtype))
assert np.allclose(strands, test["expected_strands"].astype(np.int8))


Expand Down

0 comments on commit a08f801

Please sign in to comment.