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

Seaborn update #9

Open
Bachstelze opened this issue May 4, 2024 · 1 comment
Open

Seaborn update #9

Bachstelze opened this issue May 4, 2024 · 1 comment

Comments

@Bachstelze
Copy link

The first plot in bert_example.ipynb had this FutureWarning:

Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation.

The future is now and this error is thrown:

TypeError: barplot() takes from 0 to 1 positional arguments but 2 positional arguments (and 1 keyword-only argument) were given

Adding the x and y keys fixed the error:

ax = sns.barplot(x=['his', 'her'], y=[float(predicted_target[his_id].detach()), float(predicted_target[her_id].detach())], linewidth=0, palette='Set1')
@Bachstelze
Copy link
Author

Also networkx changed from nx.from_numpy_matrix to nx.from_numpy_array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant