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

Add support for DelayedBase in CreateDummyMixturesJob #562

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Changes from all commits
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
5 changes: 3 additions & 2 deletions mm/mixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from typing import Dict, Optional, Union

from sisyphus import *
from sisyphus.delayed_ops import DelayedBase

Path = setup_path(__package__)

Expand Down Expand Up @@ -514,8 +515,8 @@ def tasks(self):
yield Task("run", mini_task=True)

def run(self):
num_mixtures = int(self.num_mixtures.get() if isinstance(self.num_mixtures, tk.Variable) else self.num_mixtures)
num_features = int(self.num_features.get() if isinstance(self.num_features, tk.Variable) else self.num_features)
num_mixtures = int(self.num_mixtures.get() if isinstance(self.num_mixtures, DelayedBase) else self.num_mixtures)
num_features = int(self.num_features.get() if isinstance(self.num_features, DelayedBase) else self.num_features)

with open(tk.uncached_path(self.out_mixtures), "wb") as f:
f.write(b"MIXSET\0\0")
Expand Down
Loading