We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please indicate the following details about the environment in which you found the bug:
I am just reproducing this code at https://sdv.dev/SDV/user_guides/single_table/tabular_preset.html#conditional-sampling.
Just run everything on the page till https://sdv.dev/SDV/user_guides/single_table/tabular_preset.html#conditional-sampling
If there was a crash, please include the traceback here.
TypeError Traceback (most recent call last) in ----> 1 model.sample_conditions(conditions = all_conditions)
~/.local/lib/python3.8/site-packages/sdv/lite/tabular.py in sample_conditions(self, conditions, max_tries, batch_size_per_try, randomize_samples, output_file_path) 196 Sampled data. 197 """ --> 198 sampled = self._model.sample_conditions( 199 conditions, max_tries, batch_size_per_try, randomize_samples, output_file_path) 200
TypeError: sample_conditions() takes from 2 to 5 positional arguments but 6 were given
The text was updated successfully, but these errors were encountered:
Hi @bhaveshneekhra -- thanks for filing. We'll look into this.
Did you also follow the step to save and reload the model? I observed that it works fine if you do this, but it crashes if you skip this part.
I'd suggest saving and re-loading as a temporary workaround.
model.save('fast_ml_model.pkl') model = TabularPreset.load('fast_ml_model.pkl') conditioned_data = model.sample_conditions(conditions=all_conditions)
Sorry, something went wrong.
katxiao
Successfully merging a pull request may close this issue.
Environment Details
Please indicate the following details about the environment in which you found the bug:
Error Description
I am just reproducing this code at https://sdv.dev/SDV/user_guides/single_table/tabular_preset.html#conditional-sampling.
Steps to reproduce
Just run everything on the page till https://sdv.dev/SDV/user_guides/single_table/tabular_preset.html#conditional-sampling
TypeError Traceback (most recent call last)
in
----> 1 model.sample_conditions(conditions = all_conditions)
~/.local/lib/python3.8/site-packages/sdv/lite/tabular.py in sample_conditions(self, conditions, max_tries, batch_size_per_try, randomize_samples, output_file_path)
196 Sampled data.
197 """
--> 198 sampled = self._model.sample_conditions(
199 conditions, max_tries, batch_size_per_try, randomize_samples, output_file_path)
200
TypeError: sample_conditions() takes from 2 to 5 positional arguments but 6 were given
The text was updated successfully, but these errors were encountered: