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
This is will throw an error (since none of the standard state fields are used).
@on_state() def random_sample_on_state(all_conditions, num_samples, random_state=None): return Delta(conditions=random_sample(all_conditions, num_samples, random_state))
and currently requires this workaround:
@on_state() def random_sample_on_state(conditions, all_conditions, num_samples, random_state=None): return Delta(conditions=random_sample(all_conditions, num_samples, random_state))
The text was updated successfully, but these errors were encountered:
Could not reproduce the error. Maybe you forgot the keyword argument or to pass in the state. This works:
import pandas as pd from autora.experimentalist.random import random_sample from autora.state import StandardState, on_state, Delta @on_state def random_sample_on_state(all_conditions): return Delta(conditions=random_sample(all_conditions, 1, 42)) all_conditions = pd.DataFrame({'x': [0, 1, 2]}) s = StandardState() s = random_sample_on_state(s, all_conditions=all_conditions) print(s.conditions)
Sorry, something went wrong.
No branches or pull requests
This is will throw an error (since none of the standard state fields are used).
and currently requires this workaround:
The text was updated successfully, but these errors were encountered: