-
-
Notifications
You must be signed in to change notification settings - Fork 675
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
ValueError: Variable model/wpe already exists, disallowed #80
Comments
Try to restart the Python session. #77 From the README:
From the notebook:
|
Thanks, that is what I did to workaround this, but it seems like it would be desirable to allow users to re-finetune without restating. Is there some fundamental limitation that prevents this? Also, I had read the README but it wasn't clear to me that re-finetuning on the same model was covered by this - perhaps the wording can be tweaked to make this clearer? |
I agree. The README makes it sound like one does not have to restart the VM if the dataset is identical. It could be changed to:
|
Agree that a README change would be more clear (my use case for retraining on the same dataset is through the CLI which refreshes the session; hadn't considered the Colab notebook use case). I'll push a change today.
It's more-or-less due to how TensorFlow works and I'm not skilled enough with low-level TF to find a workaround. However, I think I can add a |
Try adding
|
In my case I put it here tf.reset_default_graph()
if not sess:
sess = gpt2.start_tf_sess()
else:
sess = gpt2.reset_session(sess)
gpt2.load_gpt2(sess, run_name=run_name) and it perfectly worked! Thanks! |
Provide `reuse` option when creating a Tensorflow session. Should address minimaxir#80 and https://stackoverflow.com/questions/50210785 in a backwards compatible way.
For users encountering the error
(Source) |
Seeing the same error as outlined in #12, however I am on 0.5.3.
Generate the first time:
It works fine. In a new cell, copy paste the above to fine tune further but get an error about model/wpe already existing. I tried explicitly setting
restore_from='latest'
even though that seems to be the default, and it didn't help.The text was updated successfully, but these errors were encountered: