Skip to content

Commit

Permalink
Fixing tests with expanded timespan
Browse files Browse the repository at this point in the history
  • Loading branch information
anirban-chaudhuri committed Apr 17, 2024
1 parent 927318b commit d24d9d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions pyciemss/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,7 @@ def ensemble_sample(
model = EnsembleCompiledDynamics.load(
model_paths_or_jsons, dirichlet_alpha, solution_mappings
)

# logging_times = torch.arange(
# start_time + logging_step_size, end_time, logging_step_size
# )

logging_times = torch.arange(
start_time, end_time + logging_step_size, logging_step_size
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def test_output_format(
)["data"]
assert isinstance(processed_result, pd.DataFrame)
assert processed_result.shape[0] == num_samples * len(
torch.arange(start_time + logging_step_size, end_time, logging_step_size)
torch.arange(start_time, end_time + logging_step_size, logging_step_size)
)
assert processed_result.shape[1] >= 2
assert list(processed_result.columns)[:3] == [
Expand Down
2 changes: 1 addition & 1 deletion tests/visuals/test_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def create_distributions(logging_step_size=20, time_unit="twenty"):
sample,
# using same time point formula as in 'logging_times' from pyciemms interfaces formula 'sample'
timepoints=np.arange(
start_time + logging_step_size, end_time, logging_step_size
start_time, end_time + logging_step_size, logging_step_size
),
time_unit=time_unit,
)[0]
Expand Down

0 comments on commit d24d9d9

Please sign in to comment.