Comments (4)
DomainBed/domainbed/scripts/sweep.py
Line 77 in cecd769
I modified these lines in "sweep.py", from line 80 to line 99.
I am not sure if this would be appropriate. At least, they work well on my system.
If so, would I be able to create a PR?
all_gpu_counts = torch.cuda.device_count()
commands_per_gpu = {}
for i in range(all_gpu_counts):
commands_per_gpu[i] = []
idx = 0
while idx < len(commands):
for i in range(all_gpu_counts):
if idx < len(commands):
commands_per_gpu[i].append("CUDA_VISIBLE_DEVICES={} {}".format(i, commands[idx]))
idx += 1
multi_gpus_processes = []
for i in range(all_gpu_counts):
p = Process(target=launcher_fn, args=(commands_per_gpu[i],))
p.start()
multi_gpus_processes.append(p)
for p in multi_gpus_processes:
p.join()
from domainbed.
Hi, thanks for the interest in contributing! I think this is a good idea. A cleaner way to implement this would be as a command launcher in command_launchers.py. Just write a function that runs each command in a list, and add the function to the registry at the bottom of the file. You can use your command launcher by running sweep.py with the --command_launcher flag.
from domainbed.
I've gone ahead and taken a first shot at an implementation at 56196cc . Hope this helps!
from domainbed.
Thank you @igul222. Please re-open if necessary, @Luodian.
from domainbed.
Related Issues (20)
- MyLauncher for SLURM HOT 2
- PrototypicalDomainGeneralization code implementation HOT 1
- DomainBed for tabular data HOT 1
- DomainBed leave-one-out results table is not showing up HOT 1
- Possibility of choosing the model selection for sweep HOT 1
- Where are unlabelled data used in DANN? HOT 2
- DANN seems to not converge at all HOT 2
- Question about the train & val splits HOT 1
- Add Adaptiope Dataset HOT 1
- Is there a way to adapt domainbed for single domain generalization? HOT 2
- cannot download the terra incognita dataset HOT 5
- please provide a standard format to train custom dataset on domainbed HOT 1
- Jobs for leaveone-out model selection HOT 1
- An issue about the way to calculate the mean / error on one test env. HOT 2
- A question about in/out accuracy HOT 2
- Implementation of WILDS-FMoW dataset in DomainBed HOT 3
- DANN Gradient Reversal Layer Missing HOT 2
- Mistake in collect_results.py with --single_test_envs sweep option HOT 1
- about cmnist results HOT 2
- StopIteration error when training on OfficeHome HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from domainbed.