SoccerNet / sn-gamestate

[CVPRW'24] SoccerNet Game State Reconstruction: End-to-End Athlete Tracking and Identification on a Minimap (CVPR24 - CVSports workshop)
240 stars 51 forks source link

Cannot find primary config 'soccernet'. #1

Closed Wang-Yu-Qing closed 9 months ago

Wang-Yu-Qing commented 9 months ago

I'm trying to run the baseline. My OS is Mac, I installed all the dependencies using conda (following the README instructions). After run python -m tracklab.main -cn soccernet at sn-gamestate folder, I got this error:

Traceback (most recent call last):
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/tracklab/main.py", line 117, in <module>
    main()
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/main.py", line 94, in decorated_main
    _run_hydra(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
    _run_app(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
    raise ex
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
    return func()
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 105, in run
    cfg = self.compose_config(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 594, in compose_config
    cfg = self.config_loader.load_configuration(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/config_loader_impl.py", line 142, in load_configuration
    return self._load_configuration_impl(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/config_loader_impl.py", line 253, in _load_configuration_impl
    defaults_list = create_defaults_list(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 745, in create_defaults_list
    defaults, tree = _create_defaults_list(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 715, in _create_defaults_list
    defaults_tree = _create_defaults_tree(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 356, in _create_defaults_tree
    ret = _create_defaults_tree_impl(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 457, in _create_defaults_tree_impl
    return _expand_virtual_root(repo, root, overrides, skip_missing)
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 280, in _expand_virtual_root
    subtree = _create_defaults_tree_impl(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 464, in _create_defaults_tree_impl
    config_not_found_error(repo=repo, tree=root)
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 799, in config_not_found_error
    raise MissingConfigException(
hydra.errors.MissingConfigException: Cannot find primary config 'soccernet'. Check that it's in your config search path.

Config search path:
    provider=hydra, path=pkg://hydra.conf
    provider=main, path=pkg://tracklab.configs
    provider=schema, path=structured://
victorjoos commented 9 months ago

Hi !

This error is often related to installation issues, are you sure you installed tracklab with "pip install -e ../tracklab" ? (and that there were no errors during installation ?). You can also try reinstalling this repo with "pip install -e ."

Also try running "python -m tracklab.main --info", one of the sections contains the "config search path", which should contain tracklab as "provider", as seen here : image

If nothing works, you can also add the "search path" manually using this command :

python -m tracklab.main -cn soccernet --config-dir "pkg://sn_gamestate.configs"

Hope this helps !

Wang-Yu-Qing commented 9 months ago

I rerun the install commands after git pull and the above error goes away. But met another error, which is:

[2024-02-18 19:34:30,348][__main__][INFO] - Using device: 'cpu'.
Loading SoccerNetGS 'train' set videos ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:04
Error executing job with overrides: []
Traceback (most recent call last):
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/wangyuqing06/code/soccernet/tracklab/tracklab/main.py", line 117, in <module>
    main()
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/main.py", line 94, in decorated_main
    _run_hydra(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
    _run_app(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
    raise ex
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
    return func()
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 132, in run
    _ = ret.return_value
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/core/utils.py", line 260, in return_value
    raise self._return_value
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/core/utils.py", line 186, in run_job
    ret.return_value = task_function(task_cfg)
  File "/Users/wangyuqing06/code/soccernet/tracklab/tracklab/main.py", line 28, in main
    tracking_dataset = instantiate(cfg.dataset)
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 226, in instantiate
    return instantiate_node(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 347, in instantiate_node
    return _call_target(_target_, partial, args, kwargs, full_key)
  File "/Users/wangyuqing06/code/soccernet/tracklab/tracklab/utils/monkeypatch_hydra.py", line 52, in new_call_target
    return _target_(*args, **kwargs)
  File "/Users/wangyuqing06/code/soccernet/tracklab/tracklab/wrappers/datasets/soccernet/soccernet_game_state.py", line 34, in __init__
    sets[split] = load_set(self.dataset_path / split, nvid, vids_dict.get(split, []))
  File "/Users/wangyuqing06/code/soccernet/tracklab/tracklab/wrappers/datasets/soccernet/soccernet_game_state.py", line 245, in load_set
    image_metadata = pd.concat(image_metadata_list, ignore_index=True)
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/pandas/core/reshape/concat.py", line 380, in concat
    op = _Concatenator(
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/pandas/core/reshape/concat.py", line 443, in __init__
    objs, keys = self._clean_keys_and_objs(objs, keys)
  File "/Users/wangyuqing06/miniconda3/envs/sn/lib/python3.9/site-packages/pandas/core/reshape/concat.py", line 505, in _clean_keys_and_objs
    raise ValueError("No objects to concatenate")
ValueError: No objects to concatenate

All the changes I made to the code is in soccernet.yaml, as below:

image

victorjoos commented 9 months ago

Could you show what the directory structure for the dataset looks like? This looks like a problem when loading the dataset.

In addition, I'm not sure we support running the baseline on CPU (this can maybe work, but we've never tested it, so there maybe some bugs)

Wang-Yu-Qing commented 9 months ago

@victorjoos You are right, my valid data is broken. After redownloading it, everything is fine.