ucbdrive / few-shot-object-detection

Implementations of few-shot object detection benchmarks
Apache License 2.0
1.08k stars 225 forks source link

AttributeError: module 'os' has no attribute 'geteuid' #189

Closed Kegard closed 1 year ago

Kegard commented 1 year ago

when I run the code on Win 11,it raise the error "AttributeError: module 'os' has no attribute 'geteuid'",so I want to know whether I need train my model on Linux ? or whether have other methods to get uid?

# PyTorch still may leave orphan processes in multi-gpu training.
# Therefore we use a deterministic way to obtain port,
# so that users are aware of orphan processes by seeing the port occupied.

port = 2 ** 15 + 2 ** 14 + hash(os.getuid()) % 2 ** 14
parser.add_argument(
    "--dist-url", default="tcp://127.0.0.1:{}".format(port)
  )

the code is above.