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

Pandas performance warning #375

Open
kyralianaka opened this issue Jun 26, 2024 · 1 comment
Open

Pandas performance warning #375

kyralianaka opened this issue Jun 26, 2024 · 1 comment

Comments

@kyralianaka
Copy link
Contributor

When using GroupView to stimulate, clamp, and insert channels, Pandas raises

PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling frame.insert many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use newframe = frame.copy()

and references lines

  • 252 in base.py (self.nodes.loc[view.index.values, key] = channel.channel_params[key])
  • 1646 in base.py (view["controlled_by_param"] = 0)
  • 81-83 in network.py (view["global_comp_index"] = view["comp_index"], view["global_branch_index"] = view["branch_index"], view["global_cell_index"] = view["cell_index"])

Other operations may raise this warning as well. I am not sure how much this is reducing performance exactly, but it seems like something that could be addressed.

@jnsbck
Copy link
Contributor

jnsbck commented Nov 20, 2024

@kyralianaka @huangziwei is this still happening with the new backend? If not you can potentially close this.

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

Successfully merging a pull request may close this issue.

2 participants