TesfayZ / CCM_MADRL_MEC

The source code for the paper titled Combinatorial Client-Master Multiagent Deep Reinforcement Learning for Task Offloading in Mobile Edge Computing
51 stars 6 forks source link

Experiment time #6

Open ten-xi opened 1 month ago

ten-xi commented 1 month ago

Dear author, I am very interested in your work, may I ask how long you run an experiment?

TesfayZ commented 1 month ago

24 hours for the first, and 60 hours for the next two.

On Thu, 18 Jul 2024, 09:42 ten-xi, @.***> wrote:

Dear author, I am very interested in your work, may I ask how long you run an experiment?

— Reply to this email directly, view it on GitHub https://github.com/TesfayZ/CCM_MADRL_MEC/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZZ2746YDGFGO7GJKVXZX3ZM55YBAVCNFSM6AAAAABLCGDSRCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYTKNZVGEZDKNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ten-xi commented 1 month ago

What if you put it on cuda? Have you tried that?

ten-xi commented 1 month ago

Run CCM_MADRL.py for 24 hours, so run the whole experiment

TesfayZ commented 1 month ago

I didn't. You can see the output onscreen if you don't want wait until the end. Uncomment the last lines of the ccm-madrl.py to print results at each episode.

On Thu, 18 Jul 2024, 10:35 ten-xi, @.***> wrote:

What if you put it on cuda? Have you tried that?

— Reply to this email directly, view it on GitHub https://github.com/TesfayZ/CCM_MADRL_MEC/issues/6#issuecomment-2236061605, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZZ276I3RQQARJSJDB5U63ZM6D53AVCNFSM6AAAAABLCGDSRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZWGA3DCNRQGU . You are receiving this because you commented.Message ID: @.***>

ten-xi commented 1 month ago

Can you provide comments for that part of the model? checkpoint = torch.load('./checkpoint/models_checkpoint'+str(self.InfdexofResult)+'.pth')

Check for parameter differences in actors

    changes = []
    for agent_id in range(self.n_agents):
        ce = self.check_parameter_difference(self.actors[agent_id], checkpoint['actors'][agent_id])
        changes.append(ce)
    # Check for parameter differences in critics
    for agent_id in range(1):
        ce = self.check_parameter_difference(self.critics[agent_id], checkpoint['critics'][agent_id])
        changes.append(ce)
    if sum(changes) >1:
        #print("Model update detected", changes)
        self.save_models('./checkpoint/models_checkpoint'+str(self.InfdexofResult)+'.pth')
    elif sum(changes) == 1:
        print("No actor model update detected", changes)
        self.save_models('./checkpoint/models_checkpoint'+str(self.InfdexofResult)+'.pth')
        #exit()
    else:
        print("No model update detected", changes)
        self.save_models('./checkpoint/models_checkpoint'+str(self.InfdexofResult)+'.pth')
        #exit()
    '''     
     Is that the part?
TesfayZ commented 1 month ago

No, go to the last line and uncomment. The code you posted was used to detect whether the weight of the neural network is updating with the training. You don't need it now.

On Thu, Jul 18, 2024 at 10:46 AM ten-xi @.***> wrote:

Can you provide comments for that part of the model? checkpoint = torch.load('./checkpoint/models_checkpoint'+str(self.InfdexofResult)+'.pth')

Check for parameter differences in actors

changes = [] for agent_id in range(self.n_agents): ce = self.check_parameter_difference(self.actors[agent_id], checkpoint['actors'][agent_id]) changes.append(ce)

Check for parameter differences in critics

for agent_id in range(1): ce = self.check_parameter_difference(self.critics[agent_id], checkpoint['critics'][agent_id]) changes.append(ce) if sum(changes) >1:

print("Model update detected", changes)

self.save_models('./checkpoint/models_checkpoint'+str(self.InfdexofResult)+'.pth') elif sum(changes) == 1: print("No actor model update detected", changes)

self.save_models('./checkpoint/models_checkpoint'+str(self.InfdexofResult)+'.pth')

exit()

else: print("No model update detected", changes)

self.save_models('./checkpoint/models_checkpoint'+str(self.InfdexofResult)+'.pth')

exit()

''' Is that the part?

— Reply to this email directly, view it on GitHub https://github.com/TesfayZ/CCM_MADRL_MEC/issues/6#issuecomment-2236084898, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZZ277Y7DPF6X77B2K2STTZM6FHTAVCNFSM6AAAAABLCGDSRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZWGA4DIOBZHA . You are receiving this because you commented.Message ID: @.***>

ten-xi commented 1 month ago

Hello author, did you not consider putting these operations on the GPU at that time?If you run it on a GPU, is it much faster?