aimhubio / aim

Aim 💫 — An easy-to-use & supercharged open-source experiment tracker.
https://aimstack.io
Apache License 2.0
4.93k stars 297 forks source link

AIM Client Process Termination Leaves Run in Active State #3175

Open zhiyxu opened 4 days ago

zhiyxu commented 4 days ago

🐛 Bug

When the AIM client process is killed, the corresponding run remains in the "In Progress" state indefinitely. I expect the run to transition to the "Finished" state upon client termination.

To reproduce

  1. Create a Python script test-aim.py with the following content:
    
    import time
    from aim import Run

run = Run(repo='aim://10.66.142.35:8082', experiment='default') run['hparams'] = { 'learning_rate': 0.001, 'batch_size': 32, }

for i in range(1000): time.sleep(1) print(f'{i}') run.track(i+2, step=i, epoch=i%2, name='metrics-1')

2. Run the script in the background:

$ nohup python test-aim.py &

3. Kill the process:

$ kill 365103 [1]+ Terminated nohup python test-aim.py



![image](https://github.com/aimhubio/aim/assets/11384038/6f49f937-f400-4bda-99cc-5ab0da796c5f)

### Expected behavior

The run should transition to the "Finished" state after the client process is terminated.

### Environment

- Aim Version: 3.22.0
- Python version: 3.10.9
- pip version: 24.0
- OS (e.g., Linux): Ubuntu 20.04.4 LTS

### Additional context

Or is there any workaround for this issue?
zhiyxu commented 4 days ago

@mihran113 Could you please give some comments, thx in advance!