UniVL icon indicating copy to clipboard operation
UniVL copied to clipboard

Run Without Distributed

Open Maddy12 opened this issue 2 years ago • 3 comments

Hello, I am trying to run your code but I keep running into issues with the distributed learning. Is it possible to run without this?

Maddy12 avatar Mar 25 '22 19:03 Maddy12

Hi @Maddy12, what is your error when you run with distributed launch? It can be run on only one GPU. Otherwise, I think you should modify the code to the none distributed version.

ArrowLuo avatar Mar 27 '22 04:03 ArrowLuo

I apologize for wasting your time. There was an error but it was not in the distributed element. There is an error in the metrics.py in the function compute_metrics.

My hack is:

if isinstance(x, list): 
        x = np.concatenate(x)
sx = np.sort(-x, axis=1)

I do not know if this expected behavior or if I am actually now implementing something incorrect.

Maddy12 avatar Apr 11 '22 18:04 Maddy12

Hi @Maddy12, what is the error? Can you print it here? Or you can test x= np.concatenate(tuple(x), axis=0) as follows,

if isinstance(x, list): 
    x= np.concatenate(tuple(x), axis=0)
sx = np.sort(-x, axis=1)

ArrowLuo avatar Apr 12 '22 05:04 ArrowLuo