iarai / neurips2021-traffic4cast Goto Github PK
View Code? Open in Web Editor NEWCode accompanying our NeurIPS 2021 traffic4cast challenge
License: Apache License 2.0
Code accompanying our NeurIPS 2021 traffic4cast challenge
License: Apache License 2.0
from official usage, I used
export PYTHONPATH="$PYTHONPATH:$PWD"
DEVICE=cuda
DATA_RAW_PATH="./data/raw"
GROUND_TRUTH=""
python baselines/baselines_cli.py --model_str=unet --limit=2 --epochs=1 --batch_size=1 --num_workers=1 --data_raw_path=$DATA_RAW_PATH --device=$DEVICE $GROUND_TRUTH
, but it causes
AssertionError: Torch not compiled with CUDA enabled
1gpu has set into this environment,
is this right usage?
Thanks,
Hi!
Thank you for the provided data and the competition in general.
I was working on my pipeline and considering adding masked MSE metric into my validation part, however, when performing some sanity checks I encountered the following inconsistency:
I was assuming that when multiplying the ground truth maps of the 6 frames we are predicting with the mask of the provided low-resolution static map, the number of non-zeros in the resulting tensor shouldn't decrease compared to beforehand. Yet the result was the contrary, meaning that in the ground truth labeling, some non-zero elements lie outside the provided low-resolution static map.
Please see the following code snippet for reproducing:
from data.dataset.dataset import T4CDataset
from baselines.unet import UNetTransfomer
from metrics.masking import get_static_mask
from functools import partial
import numpy as np
import torch
BASE_FOLDER = ...
CITY = "CHICAGO"
dataset = T4CDataset(
BASE_FOLDER, f"{CITY}/training/2019*8ch.h5",
transform=partial(
UNetTransfomer.unet_pre_transform,
stack_channels_on_time=True,
zeropad2d=None, batch_dim=False)
)
city_static_map = get_static_mask(CITY, BASE_FOLDER)
city_static_map_torch = torch.from_numpy(city_static_map[:, :, 0])
for index in range(len(dataset)):
inp_frames, out_frames = dataset[index]
nonzero_frames = torch.count_nonzero(out_frames)
nonzero_frames_masked = torch.count_nonzero(out_frames * city_static_map_torch)
print(nonzero_frames)
print(nonzero_frames_masked)
assert torch.allclose(nonzero_frames, nonzero_frames_masked)
Is this the expected behavior? Should we trust or use the low-resolution static map then?
(t4c) $ python baselines/baselines_cli.py
[2021-06-15 20:29:52,217][INFO][38382][baselines_cli.py:main:287] Start build dataset
[2021-06-15 20:29:52,217][INFO][38382][baselines_cli.py:main:294] Check if files need to be untarred...
[2021-06-15 20:29:52,252][INFO][38382][baselines_cli.py:main:305] Dataset has size 519360
[2021-06-15 20:29:52,252][INFO][38382][baselines_cli.py:main:309] Create train_model.
[2021-06-15 20:29:52,407][INFO][38382][baselines_cli.py:main:323] Going to run train_model.
Traceback (most recent call last):
File "baselines/baselines_cli.py", line 361, in <module>
main(sys.argv[1:])
File "baselines/baselines_cli.py", line 324, in main
logging.info(system_status())
File "/Users/che/workspaces/neurips2021-traffic4cast/util/monitoring.py", line 49, in system_status
s += tabulate([[str(mem.__getattribute__(a)) for a in virtual_memory_fields]], headers=virtual_memory_fields) + "\n"
File "/Users/che/workspaces/neurips2021-traffic4cast/util/monitoring.py", line 49, in <listcomp>
s += tabulate([[str(mem.__getattribute__(a)) for a in virtual_memory_fields]], headers=virtual_memory_fields) + "\n"
AttributeError: 'svmem' object has no attribute 'buffers'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.