ofsoundof / GRL-Image-Restoration

MIT License
379 stars 24 forks source link

AttributeError: module 'os' has no attribute 'set_blocking' #17

Open AIisCool opened 1 year ago

AIisCool commented 1 year ago

I'm running this on Windows 10 and encountering this error:

$  torchx run -- -j 1x2 -- \
     -m training=False gpus=2 experiment=dm/grl model=grl/grl_small \
     load_state_dict=True pretrained_checkpoint="${MODEL_ZOO}/GRL/dm_grl_small.ckpt"
torchx 2023-04-19 23:46:31 INFO     loaded configs from C:\GRL-Image-Restoration\.torchxconfig
torchx 2023-04-19 23:46:31 INFO     Tracker configurations: {}
torchx 2023-04-19 23:46:31 INFO     Log directory not set in scheduler cfg. Creating a temporary log dir that will be deleted on exit. To preserve log directory set the `log_dir` cfg option
torchx 2023-04-19 23:46:31 INFO     Log directory is: C:\Users\User\AppData\Local\Temp\torchx_9_046f4b
Traceback (most recent call last):
  File "C:\Users\User\.conda\envs\LightningIR\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\User\.conda\envs\LightningIR\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\User\.conda\envs\LightningIR\Scripts\torchx.exe\__main__.py", line 7, in <module>
  File "C:\Users\User\.conda\envs\LightningIR\lib\site-packages\torchx\cli\main.py", line 116, in main
    run_main(get_sub_cmds(), argv)
  File "C:\Users\User\.conda\envs\LightningIR\lib\site-packages\torchx\cli\main.py", line 112, in run_main
    args.func(args)
  File "C:\Users\User\.conda\envs\LightningIR\lib\site-packages\torchx\cli\cmd_run.py", line 248, in run
    self._run(runner, args)
  File "C:\Users\User\.conda\envs\LightningIR\lib\site-packages\torchx\cli\cmd_run.py", line 208, in _run
    app_handle = runner.run_component(
  File "C:\Users\User\.conda\envs\LightningIR\lib\site-packages\torchx\runner\api.py", line 186, in run_component
    return self.schedule(dryrun_info)
  File "C:\Users\User\.conda\envs\LightningIR\lib\site-packages\torchx\runner\api.py", line 278, in schedule
    app_id = sched.schedule(dryrun_info)
  File "C:\Users\User\.conda\envs\LightningIR\lib\site-packages\torchx\schedulers\local_scheduler.py", line 749, in schedule
    replica = self._popen(
  File "C:\Users\User\.conda\envs\LightningIR\lib\site-packages\torchx\schedulers\local_scheduler.py", line 665, in _popen
    combined_ = Tee(
  File "C:\Users\User\.conda\envs\LightningIR\lib\site-packages\torchx\schedulers\streams.py", line 33, in __init__
    os.set_blocking(r.fileno(), False)
AttributeError: module 'os' has no attribute 'set_blocking'

How can I fix this? Thank you.

fxcdl commented 1 year ago

Hi, I have the same problem, how did you solve it?

AIisCool commented 1 year ago

@fxcdl I didn't, but gave up on getting a response.

fxcdl commented 1 year ago

@fxcdl I didn't, but gave up on getting a response.

It looks like didn't work on windows

zelenooki87 commented 1 year ago

this happens to me, too there must be solution for Windows users!