jacklangerman commited on
Commit
64fb003
·
verified ·
1 Parent(s): 5483b95

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +12 -2
  2. script.py +43 -23
README.md CHANGED
@@ -1,4 +1,14 @@
1
- # My Cool Submission 2025
2
 
3
- This repo contains a submission to the [S23DR Challenge](https://huggingface.co/spaces/usm3d/S23DR) (part of the [USM3D](https://usm3d.github.io/) workshop at CVPR2025). It was prepared by [jacklangerman](https://huggingface.co/jacklangerman).
 
 
 
 
 
 
 
 
 
 
4
 
 
1
+ # Empty solution example for the S23DR competition
2
 
3
+ This repo provides a minimalistic example of a valid, but empty submission to S23DR competition.
4
+ We recommend you take a look at [this example](https://huggingface.co/usm3d/handcrafted_baseline_submission),
5
+ which implements some primitive algorithms and provides useful I/O and visualization functions.
6
+
7
+ This example seeks to simply provide minimal code which succeeds at reading the dataset and producing a solution (in this case two vertices at the origin and edge of zero length connecting them).
8
+
9
+ `script.py` - is the main file which is run by the competition space. It should produce `submission.parquet` as the result of the run. Please see the additional comments in the `script.py` file.
10
+
11
+ ---
12
+ license: apache-2.0
13
+ ---
14
 
script.py CHANGED
@@ -44,46 +44,66 @@ if __name__ == "__main__":
44
  os.system('pwd')
45
  print(os.system('ls -lahtr'))
46
  print('/tmp/data/')
47
- print(os.system('ls -lahtrR /tmp/data/'))
 
 
48
 
49
 
50
  data_path_test_server = Path('/tmp/data')
51
  data_path_local = Path().home() / '.cache/huggingface/datasets/usm3d___hoho25k_test_x/'
52
 
53
  if data_path_test_server.exists():
54
- data_path = data_path_test_server
55
  TEST_ENV = True
56
  else:
57
- data_path = data_path_local
58
  TEST_ENV = False
59
-
 
 
 
 
 
 
 
 
60
 
61
  print(data_path)
62
 
63
  # dataset = load_dataset(params['dataset'], trust_remote_code=True, use_auth_token=params['token'])
 
 
 
 
64
  data_files = {
65
- "validation": [str(p) for p in [*data_path.rglob('*validation*.arrow')]+[*data_path.rglob('*public*/**/*.tar')]],
66
- "test": [str(p) for p in [*data_path.rglob('*test*.arrow')]+[*data_path.rglob('*private*/**/*.tar')]],
67
  }
68
  print(data_files)
 
 
 
 
 
 
69
 
70
-
71
- if TEST_ENV:
72
- dataset = load_dataset(
73
- "webdataset",
74
- data_files=data_files,
75
- trust_remote_code=True,
76
- # streaming=True
77
- )
78
- print('load with webdataset')
79
- else:
80
- dataset = load_dataset(
81
- "arrow",
82
- data_files=data_files,
83
- trust_remote_code=True,
84
- # streaming=True
85
- )
86
- print('load with arrow')
87
 
88
 
89
  print(dataset, flush=True)
 
44
  os.system('pwd')
45
  print(os.system('ls -lahtr'))
46
  print('/tmp/data/')
47
+ print(os.system('ls -lahtr /tmp/data/'))
48
+ print('/tmp/data/data')
49
+ print(os.system('ls -lahtrR /tmp/data/data'))
50
 
51
 
52
  data_path_test_server = Path('/tmp/data')
53
  data_path_local = Path().home() / '.cache/huggingface/datasets/usm3d___hoho25k_test_x/'
54
 
55
  if data_path_test_server.exists():
56
+ # data_path = data_path_test_server
57
  TEST_ENV = True
58
  else:
59
+ # data_path = data_path_local
60
  TEST_ENV = False
61
+ from huggingface_hub import snapshot_download
62
+ _ = snapshot_download(
63
+ repo_id=params['dataset'],
64
+ local_dir="/tmp/data",
65
+ # token=params.token,
66
+ repo_type="dataset",
67
+ )
68
+ data_path = data_path_test_server
69
+
70
 
71
  print(data_path)
72
 
73
  # dataset = load_dataset(params['dataset'], trust_remote_code=True, use_auth_token=params['token'])
74
+ # data_files = {
75
+ # "validation": [str(p) for p in [*data_path.rglob('*validation*.arrow')]+[*data_path.rglob('*public*/**/*.tar')]],
76
+ # "test": [str(p) for p in [*data_path.rglob('*test*.arrow')]+[*data_path.rglob('*private*/**/*.tar')]],
77
+ # }
78
  data_files = {
79
+ "validation": [str(p) for p in data_path.rglob('*public*/**/*.tar')],
80
+ "test": [str(p) for p in data_path.rglob('*private*/**/*.tar')],
81
  }
82
  print(data_files)
83
+ dataset = load_dataset(
84
+ params['dataset'],
85
+ data_files=data_files,
86
+ trust_remote_code=True,
87
+ # streaming=True
88
+ )
89
 
90
+ # if TEST_ENV:
91
+ # dataset = load_dataset(
92
+ # "webdataset",
93
+ # data_files=data_files,
94
+ # trust_remote_code=True,
95
+ # # streaming=True
96
+ # )
97
+ print('load with webdataset')
98
+ # else:
99
+
100
+ # dataset = load_dataset(
101
+ # "arrow",
102
+ # data_files=data_files,
103
+ # trust_remote_code=True,
104
+ # # streaming=True
105
+ # )
106
+ # print('load with arrow')
107
 
108
 
109
  print(dataset, flush=True)