Reputation
Badges 1
13 × Eureka!I see, I will try this code snippet 🙂
Hi, sorry for late reply! Yes that could work in a way, though I think only saving to the model snapshot feature would have been great!
Oh sorry, I forgot to specify one thing. I only really want to save once (because the model is large), so I hoped the model would only be saved to the Trains URI. This was why I was wondering if there was an explicit way to call trains to save, so I don't also save at the location given in torch.save(...). Is this possible?
AgitatedDove14 Sorry for my late response I didn't have this slack added on my laptop!
I can't use actual code from my project as it is work related, but this should reproduce the problem:` import argparse
from trains import Task
def main(disable_trains):
disable_trains = disable_trains.lower()
assert disable_trains in ("n", "y", "no", "yes", "true", "false"),
"Invalid input to --disable_trains"
if disable_trains in ("n", "no", "false"):
task = Task.init(
p...
Hi! So if I understand the documentation correctly, then TRAINS support saving snapshots to some uri. Just to test it for now, I just want it to save the snapshots locally into trains_storage with the file structure given in the documentation is referenced previously.
I think the first thing I should ask is just how do I save a pytorch snapshot with trains? Can it be done explicitly with a method, or is it done implicitly by TRAINS somehow picking up that I called torch.save(...)?
What I h...
AgitatedDove14 Yes, I actually upload the config as an artifact because it is easier to read when it is not flattened 🙂
Thank you, I would appreciate a fix!
AgitatedDove14 I see! This seems to work! Thanks!
In my config I can specify whether use TRAINS or not and this config is loaded with argparse. And as this error message says:raise UsageError("ArgumentParser.parse_args() was automatically connected to this task, " trains.errors.UsageError: ArgumentParser.parse_args() was automatically connected to this task, although auto_connect_arg_parser is turned off! When turning off auto_connect_arg_parser, call Task.init(...) before calling ArgumentParser.parse_args()
I have a circular problem her...
Thanks for the tip, but I don't think that will work in my case because the config file may not match the config used by the program, because hyperparameters can also be changed by argparse. Those changes will not be written to the config file. But using the config_dict will work because that is where the changes are applied :)
Fantastic! I will give that a try and let you know 🙂
WackyRabbit7 Thank you for the in depth answer, but as DefeatedCrab47 have noted it seems it is not fully possible yet, which is a pretty big blocker for us to integrate trains to our workflow.
SuccessfulKoala55 Great, looking forward to it!