-
Notifications
You must be signed in to change notification settings - Fork 62
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
BUG: TypeError: neptune.metadata_containers.run.Run() got multiple values for keyword argument 'with_id' #1753
Comments
This is my current workaround to avoid calling the
|
Hey @Ulipenitz 👋 Could you share a minimal end-to-end example of your script where you are facing this error, along with the details below:
|
I could not extract this from my original code, but I put together the example script from the setfit github start page and my steps for reproduction. I'm sorry, but I don't have time to try to reproduce the original bug right now.
Python version: 3.9.18 Package Version accelerate 0.27.2 |
Not because of the overwritten class methods... I noticed the same behaviour when I initially tried to reproduce the issue using setfit's example code. I was able to solve this by using from uuid import uuid4
os.environ["NEPTUNE_CUSTOM_RUN_ID"] = str(uuid4()) and remove You will see a few Can you try this approach and let me know if it works for you? |
Sorry for not coming back earlier. |
Perfect, thanks for confirming! Closing this thread, but please feel free to comment or create new issue if there's anything I can help you with 🤗 |
Describe the bug
When I pass
with_id
toNeptuneCallback
(which I have to, becauseTrainer
insetfit
library calls on_train_begin twice & would initialize a new run), then I get the error from the title when callingneptune_callback.run
after the training, because theTrainer
(as the Huggingface Trainer) kills the run/callback.I think this happens, because the run property in
NeptuneCallback
calls_initialize_run
with the argumentwith_id
, butwith_id
is already a key in_init_run_kwargs
, because I passed it to theNeptuneCallback
.Reproduction
Init a NeptuneCallback:
neptune_callback = NeptuneCallback(run=run, with_id=neptune_run_id)
Init a Trainer object from setfit (I think this could be the same for the huggingface Trainer class, because setfit inherits from it):
Train and try to access run afterwards:
Expected behavior
Either I want to be able to pass
with_id
to the callback or I want to have the same run, even ifon_train_begin
is called twice (the first call setsself._initial_run
to None, the second call initializes a new run).The text was updated successfully, but these errors were encountered: