Upgraded my server to PyTorch 1.6 - begin receiving this error when using plot_logs:
'/home/ubuntu/detr/util/plot_utils.py:55: FutureWarning: The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead
pd.np.stack(df.test_coco_eval_bbox.dropna().values)[:, 1]'
and if I run plot_logs before a logs.txt has been written (b/c I'm very eager to check on progress :) then get a crash instead of an error informing me no log.txt is available yet.
git diff) or what code you wroteTo future proof:
import numpy as np
remove pd from line 55 to become:
if field == 'mAP':
coco_eval = pd.DataFrame(
**np.**stack(df.test_coco_eval_bbox.dropna().values)[:, 1]
2 - to handle no log file exists:
# check if first log file exists...it will not be present until after first log write
fn = Path(logs[0]/log_name)
if not fn.exists():
print(f"-> missing {log_name} in first directory. This is likely b/c you have not gotten to Epoch 1 in training.")
print(f"--> file path: {fn}")
return
<put logs here>
If there are no obvious error in "what you observed" provided above,
please tell us the expected behavior.
Provide your environment information using the following command:
python -m torch.utils.collect_env
Can you send a PR with the proposed fixes?
Yes happy to, thanks for the feedback.
Merged in #194 thanks @lessw2020 !