Cannot create 2 Crabnet models in the same code #170
Replies: 1 comment
-
Wrong repo, Already created the discussion in the correct one, here's the link |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I stumbled upon crabnet recently, and I'm using it in a catalysis project. It's been a good addition to the project, but I've found a problem. I'm not sure if this should be considered a bug or an enhancement, so that's why I opened the discussion.
The problem is I wanted to train crabnet in different subsets of my dataset (filtering on reaction conditions) to try to see if that gave better results (I have sometimes the same composition but with different reaction conditions, which gives different results). The problem seems to be that when you instantiate 2 instances of crabnet, some parts seem to be shared.
Here's a Minimal Working example of how to replicate the problem:
The example is just the Basic Usage example in Crabnet's Docs but with each step repeated (and changing the dataset just in case).
This returns this error:
File ".conda\lib\site-packages\torch\optim\optimizer.py", line 271, in wrapper for pre_hook in chain(_global_optimizer_pre_hooks.values(), self._optimizer_step_pre_hooks.values()): AttributeError: 'SWA' object has no attribute '_optimizer_step_pre_hooks'
. The whole error log refers to line 14cbn.fit(train_df_2)
as the trigger of the problem.Beta Was this translation helpful? Give feedback.
All reactions