PreNAS icon indicating copy to clipboard operation
PreNAS copied to clipboard

force argument in print function

Open iksooman opened this issue 2 years ago • 1 comments

Thanks for sharing your code!

I'm trying to test your code, but I got an error like:

Traceback (most recent call last):
  File "C:\Users\admin\PreNAS\supernet_train.py", line 463, in <module>
    main(args)
  File "C:\Users\admin\PreNAS\supernet_train.py", line 404, in main
    train_stats = train_one_epoch(
  File "C:\Users\admin\PreNAS\supernet_engine.py", line 187, in train_one_epoch
    print("DEBUG:train {}".format(config), force=print2file)
TypeError: 'force' is an invalid keyword argument for print()

Could you give me an idea for resolving this error?

iksooman avatar Jan 04 '24 00:01 iksooman

Did you skip the distributed setup? The print function is replaced here: https://github.com/tinyvision/PreNAS/blob/0050c7a22482e8736f148bc41ab0d952968a8748/lib/utils.py#L165-L177

drcege avatar Jul 17 '24 13:07 drcege