Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix enumeration of all combinations before filtering to top 100 #145

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Changes from 1 commit
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
Next Next commit
fix enumeration of all combinations before filtering to top 100
AroneyS committed Oct 1, 2024
commit a668ce79415fe3841afc80ebf23d92f092477745
2 changes: 1 addition & 1 deletion binchicken/workflow/scripts/target_elusive.py
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ def get_clusters(
# Choose top N clusters for each cluster size where N is PRECLUSTER_SIZE
.with_columns(
sample_combinations = pl.col("cluster_size").map_elements(
lambda x: [[0] + list(i) for i in itertools.combinations(range(1, PRECLUSTER_SIZE), x)][:PRECLUSTER_SIZE],
lambda x: [[0] + list(i) for i in itertools.islice(itertools.combinations(range(1, PRECLUSTER_SIZE), x), PRECLUSTER_SIZE)],
return_dtype=pl.List(pl.List(pl.Int64)),
)
)