halib 0.1.99__py3-none-any.whl → 0.2.21__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. halib/__init__.py +12 -6
  2. halib/common/__init__.py +0 -0
  3. halib/common/common.py +207 -0
  4. halib/common/rich_color.py +285 -0
  5. halib/exp/__init__.py +0 -0
  6. halib/exp/core/__init__.py +0 -0
  7. halib/exp/core/base_config.py +167 -0
  8. halib/exp/core/base_exp.py +147 -0
  9. halib/exp/core/param_gen.py +189 -0
  10. halib/exp/core/wandb_op.py +117 -0
  11. halib/exp/data/__init__.py +0 -0
  12. halib/exp/data/dataclass_util.py +41 -0
  13. halib/exp/data/dataset.py +208 -0
  14. halib/exp/data/torchloader.py +165 -0
  15. halib/exp/perf/__init__.py +0 -0
  16. halib/exp/perf/flop_calc.py +190 -0
  17. halib/exp/perf/gpu_mon.py +58 -0
  18. halib/exp/perf/perfcalc.py +440 -0
  19. halib/exp/perf/perfmetrics.py +137 -0
  20. halib/exp/perf/perftb.py +778 -0
  21. halib/exp/perf/profiler.py +507 -0
  22. halib/exp/viz/__init__.py +0 -0
  23. halib/exp/viz/plot.py +754 -0
  24. halib/filetype/csvfile.py +3 -9
  25. halib/filetype/ipynb.py +3 -5
  26. halib/filetype/jsonfile.py +0 -3
  27. halib/filetype/textfile.py +0 -1
  28. halib/filetype/videofile.py +119 -3
  29. halib/filetype/yamlfile.py +8 -16
  30. halib/online/projectmake.py +7 -6
  31. halib/online/tele_noti.py +165 -0
  32. halib/research/base_exp.py +75 -18
  33. halib/research/core/__init__.py +0 -0
  34. halib/research/core/base_config.py +144 -0
  35. halib/research/core/base_exp.py +157 -0
  36. halib/research/core/param_gen.py +108 -0
  37. halib/research/core/wandb_op.py +117 -0
  38. halib/research/data/__init__.py +0 -0
  39. halib/research/data/dataclass_util.py +41 -0
  40. halib/research/data/dataset.py +208 -0
  41. halib/research/data/torchloader.py +165 -0
  42. halib/research/dataset.py +1 -1
  43. halib/research/metrics.py +4 -0
  44. halib/research/mics.py +8 -2
  45. halib/research/perf/__init__.py +0 -0
  46. halib/research/perf/flop_calc.py +190 -0
  47. halib/research/perf/gpu_mon.py +58 -0
  48. halib/research/perf/perfcalc.py +363 -0
  49. halib/research/perf/perfmetrics.py +137 -0
  50. halib/research/perf/perftb.py +778 -0
  51. halib/research/perf/profiler.py +301 -0
  52. halib/research/perfcalc.py +57 -32
  53. halib/research/viz/__init__.py +0 -0
  54. halib/research/viz/plot.py +754 -0
  55. halib/system/_list_pc.csv +6 -0
  56. halib/system/filesys.py +60 -20
  57. halib/system/path.py +106 -0
  58. halib/utils/dict.py +9 -0
  59. halib/utils/list.py +12 -0
  60. halib-0.2.21.dist-info/METADATA +192 -0
  61. halib-0.2.21.dist-info/RECORD +109 -0
  62. halib-0.1.99.dist-info/METADATA +0 -209
  63. halib-0.1.99.dist-info/RECORD +0 -64
  64. {halib-0.1.99.dist-info → halib-0.2.21.dist-info}/WHEEL +0 -0
  65. {halib-0.1.99.dist-info → halib-0.2.21.dist-info}/licenses/LICENSE.txt +0 -0
  66. {halib-0.1.99.dist-info → halib-0.2.21.dist-info}/top_level.txt +0 -0
@@ -1,209 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: halib
3
- Version: 0.1.99
4
- Summary: Small library for common tasks
5
- Author: Hoang Van Ha
6
- Author-email: hoangvanhauit@gmail.com
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.9
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE.txt
13
- Requires-Dist: arrow
14
- Requires-Dist: click
15
- Requires-Dist: dataclass-wizard
16
- Requires-Dist: enlighten
17
- Requires-Dist: itables
18
- Requires-Dist: kaleido
19
- Requires-Dist: loguru
20
- Requires-Dist: matplotlib
21
- Requires-Dist: more-itertools
22
- Requires-Dist: moviepy
23
- Requires-Dist: networkx
24
- Requires-Dist: numpy
25
- Requires-Dist: omegaconf
26
- Requires-Dist: opencv-python
27
- Requires-Dist: pandas
28
- Requires-Dist: Pillow
29
- Requires-Dist: plotly
30
- Requires-Dist: Pyarrow
31
- Requires-Dist: pycurl
32
- Requires-Dist: pygwalker
33
- Requires-Dist: python-telegram-bot
34
- Requires-Dist: requests
35
- Requires-Dist: rich
36
- Requires-Dist: scikit-learn
37
- Requires-Dist: seaborn
38
- Requires-Dist: tabulate
39
- Requires-Dist: timebudget
40
- Requires-Dist: tqdm
41
- Requires-Dist: tube_dl
42
- Requires-Dist: wandb
43
- Requires-Dist: ipynbname
44
- Dynamic: author
45
- Dynamic: author-email
46
- Dynamic: classifier
47
- Dynamic: description
48
- Dynamic: description-content-type
49
- Dynamic: license-file
50
- Dynamic: requires-dist
51
- Dynamic: requires-python
52
- Dynamic: summary
53
-
54
- # Helper package for coding and automation
55
-
56
- **Version 0.1.99**
57
- + `filetype/ipynb`: add `gen_ipynb_name` generator to create file name based on current notebook name as prefix (with optional timestamp)
58
-
59
- **Version 0.1.96**
60
- + `research/plot`: add `PlotHelper` class to plot train history + plot grid of images (e.g., image samples from dataset or model outputs)
61
-
62
-
63
- **Version 0.1.91**
64
- + `research/param_gen`: add `ParamGen` class to generate parameter list from yaml file for hyperparameter search (grid search, random search, etc.)
65
-
66
- **Version 0.1.90**
67
-
68
- + `research/profiler`: add `zProfiler` class to measure execution time of contexts and steps, with support for dynamic color scales in plots.
69
-
70
- **Version 0.1.77**
71
-
72
- + `research/base_exp`: add base experiment class to handle common experiment tasks, including performance calculation and saving results.
73
-
74
- **Version 0.1.67**
75
-
76
- + now use `uv` for venv management
77
- + `research/perfcalc`: support both torchmetrics and custom metrics for performance calculation
78
-
79
- **Version 0.1.61**
80
-
81
- + add `util/video`: add `VideoUtils` class to handle common video-related tasks
82
- + add `util/gpu_mon`: add `GPUMonitor` class to monitor GPU usage and performance
83
-
84
- **Version 0.1.59**
85
-
86
- + add `util/perfcalc`: abstract class for performance calculation. This class need to be inherited and implemented with specific performance calculation logic.
87
-
88
- **Version 0.1.55**
89
-
90
- + add `util/dataclass_util` to help dynamically create `dataclass` classes from dictionary or YAML file, including support for nested dataclasses. From there, we can use `dataclass_wizard` to create a list of `dataclass` classes with the help from ChatGPT.
91
-
92
- **Version 0.1.52**
93
-
94
- + add `research/perftb` module to allow creating and managing performance tables for experiments, including filtering by datasets, metrics, and experiments.
95
-
96
- **Version 0.1.50**
97
-
98
- + add `pprint_local_path` to print local path (file/directory) in clickable link (as file URI)
99
-
100
- + add `research` package to help with research tasks, including `benchquery` for benchmarking queries from dataframe
101
- + add `wandb` module to allow easy sync offline data to Weights & Biases (wandb) and batch clear wandb runs.
102
-
103
- **Version 0.1.47**
104
- + add `pprint_box` to print object/string in a box frame (like in `inspect`)
105
-
106
- **Version 0.1.46**
107
- + filter the warning message of `UserWarning: Unable to import Axes3D.`
108
- + auto_wrap_text for `fn_display_df` to avoid long text in the table
109
-
110
- **Version 0.1.42**
111
- + add <rich_color.py>: add basic color list (for easy usage)
112
-
113
- **Version 0.1.41**
114
- + add <rich_color.py> to display rich color information in <rich> python package (rcolor_str, rcolor_pallet_all, etc.)
115
-
116
- **Version 0.1.40**
117
-
118
- + update <csvfile.py> to use `itables` and `pygwalker` to display dataframe in jupyter notebook.
119
-
120
- **Version 0.1.38**
121
-
122
- + add <torchloader.py> to search for best cfg for torch dataloader (num_workers, batch_size, pin_memory, et.)
123
-
124
- **Version 0.1.37**
125
-
126
- + add <dataset.py> to help split classification dataset into train/val(test)
127
- ---
128
- **Version 0.1.33**
129
-
130
- + add `plot.py` module to plot DL model training history (with columlns: epoch, train_accuracy, val_accuracy, train_loss, val_loss) using `seaborn` and `matplotlib`
131
- ---
132
- **Version 0.1.29**
133
-
134
- + for `tele_noti` module, `kaleido==0.1.*` is required for plotly since `kaleido 0.2.*` is not working (taking for ever to generate image)
135
- ---
136
- **Version 0.1.24**
137
-
138
- + rename `sys` to `system` to avoid conflict with built-in `sys` module
139
- + add `tele_noti` module to send notification to telegram after a specific interval for training progress monitoring
140
- ---
141
- **Version 0.1.22**
142
-
143
- + add `cuda.py` module to check CUDA availability (for both pytorch and tensorflow)
144
- ---
145
- **Version 0.1.21**
146
-
147
- + using `networkx` and `omegaconf` to allow yaml file inheritance and override
148
- ---
149
- **Version 0.1.15**
150
-
151
- + `__init__.py`: add common logging library; also `console_log` decorator to log function (start and end)
152
-
153
- ---
154
-
155
- **Version 0.1.10**
156
-
157
- + filesys: fix typo on "is_exit" to "is_exist"
158
- + gdrive: now support uploading file to folder and return direct link (shareable link)
159
-
160
- **Version 0.1.9**
161
-
162
- + add dependencies requirement.txt
163
-
164
- **Version 0.1.8**
165
-
166
- Fix bugs:
167
-
168
- + [performance] instead of inserting directly new rows into table dataframe, first insert it into in-memory `row_pool_dict`, that fill data in that dict into the actual dataframe when needed.
169
-
170
- ---
171
-
172
- **Version 0.1.7**
173
-
174
- Fix bugs:
175
-
176
- + fix insert into table so slow by allowing insert multiple rows at once
177
-
178
- ---
179
-
180
- **Version 0.1.6**
181
-
182
- New features:
183
-
184
- + add DFCreator for manipulating table (DataFrame) - create, insert row, display, write to file
185
-
186
- ---
187
-
188
- **Version 0.1.5**
189
-
190
- New Features
191
-
192
- + add cmd module
193
- + new package structure
194
-
195
- ---
196
-
197
- **Version 0.1.4**
198
-
199
- New Features
200
-
201
- + add support to create Bitbucket Project from template
202
-
203
- ---
204
-
205
- **Version 0.1.2**
206
-
207
- New Features
208
-
209
- + add support to upload local to google drive.
@@ -1,64 +0,0 @@
1
- halib/__init__.py,sha256=dHuxmYnZjeFT2VXuZU5yKX7c81XqcXX5tsKFtcaxkqI,1657
2
- halib/common.py,sha256=9hn-IXOlGZODoBHy8U2A0aLgmPEnTeQjbzAVGwXAjwo,4242
3
- halib/csvfile.py,sha256=Eoeni0NIbNG3mB5ESWAvNwhJxOjmCaPd1qqYRHImbvk,1567
4
- halib/cuda.py,sha256=1bvtBY8QvTWdLaxalzK9wqXPl0Ft3AfhcrebupxGzEA,1010
5
- halib/dataset.py,sha256=QU0Hr5QFb8_XlvnOMgC9QJGIpwXAZ9lDd0RdQi_QRec,6743
6
- halib/filesys.py,sha256=r1SftGKM7nyw6QbY5UmcueZLkXEIleSzhui7dQsosPw,2907
7
- halib/gdrive.py,sha256=p302rTv1H4gFsAlmmiUL0iKrbg09_3_dEhtm-N4WGvg,6277
8
- halib/gdrive_mkdir.py,sha256=0Gq65i2YaWaGMdJqXX7zthhb0qZnNwrhdoHK6IBIVv8,1456
9
- halib/gdrive_test.py,sha256=e8yOYB5MZhdHbeLzjvTcOXbJNKk_DKNWURIRkKxHBMs,1378
10
- halib/jsonfile.py,sha256=9XfdFS1wcTdBRmpAGzVu2dVCcJp8RCpsSY16f6KUNts,480
11
- halib/listop.py,sha256=Vpa8_2fI0wySpB2-8sfTBkyi_A4FhoFVVvFiuvW8N64,339
12
- halib/plot.py,sha256=4pUJ5GeKQ1LzgiQXbAZlUqSydXSk5tt2_qsw78nSzA4,9445
13
- halib/projectmake.py,sha256=8dNTxB2jgQlwvovaOnJcCKgHe5vM0nBwzm46Yc8INEI,4048
14
- halib/rich_color.py,sha256=tyK5fl3Dtv1tKsfFzt_5Rco4Fj72QliA-w5aGXaVuqQ,6392
15
- halib/tele_noti.py,sha256=xL8f889VFR65uVJTj1NNT3qSi3lJ7s_iDjcObwZ0-V0,5926
16
- halib/textfile.py,sha256=EhVFrit-nRBJx18e6rtIqcE1cSbgsLnMXe_kdhi1EPI,399
17
- halib/torchloader.py,sha256=-q9YE-AoHZE1xQX2dgNxdqtucEXYs4sQ22WXdl6EGfI,6500
18
- halib/videofile.py,sha256=NTLTZ-j6YD47duw2LN2p-lDQDglYFP1LpEU_0gzHLdI,4737
19
- halib/filetype/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- halib/filetype/csvfile.py,sha256=4Klf8YNzY1MaCD3o5Wp5GG3KMfQIBOEVzHV_7DO5XBo,6604
21
- halib/filetype/ipynb.py,sha256=hd1IxQmSdNyCT1WwteSmy6e_xFVpdEPC1jM0drr6ag4,1663
22
- halib/filetype/jsonfile.py,sha256=9LBdM7LV9QgJA1bzJRkq69qpWOP22HDXPGirqXTgSCw,480
23
- halib/filetype/textfile.py,sha256=QtuI5PdLxu4hAqSeafr3S8vCXwtvgipWV4Nkl7AzDYM,399
24
- halib/filetype/videofile.py,sha256=4nfVAYYtoT76y8P4WYyxNna4Iv1o2iV6xaMcUzNPC4s,4736
25
- halib/filetype/yamlfile.py,sha256=59P9cdqTx655XXeQtkmAJoR_UhhVN4L8Tro-kd8Ri5g,2741
26
- halib/online/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- halib/online/gdrive.py,sha256=RmF4y6UPxektkKIctmfT-pKWZsBM9FVUeld6zZmJkp0,7787
28
- halib/online/gdrive_mkdir.py,sha256=wSJkQMJCDuS1gxQ2lHQHq_IrJ4xR_SEoPSo9n_2WNFU,1474
29
- halib/online/gdrive_test.py,sha256=hMWzz4RqZwETHp4GG4WwVNFfYvFQhp2Boz5t-DqwMo0,1342
30
- halib/online/projectmake.py,sha256=Zrs96WgXvO4nIrwxnCOletL4aTBge-EoF0r7hpKO1w8,4034
31
- halib/research/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- halib/research/base_config.py,sha256=AqZHZ0NNQ3WmUOfRzs36lf3o0FrehSdVLbdmgNpbV7A,2833
33
- halib/research/base_exp.py,sha256=hiO2flt_I0iJJ4bWcQwyh2ISezoC8t2k3PtxHeVr0eI,3278
34
- halib/research/benchquery.py,sha256=FuKnbWQtCEoRRtJAfN-zaN-jPiO_EzsakmTOMiqi7GQ,4626
35
- halib/research/dataset.py,sha256=avMRM9Jk3tq0P7iX1Jq-kq5d_3en3lcUlAy1dAtGSEU,6734
36
- halib/research/flop_csv.py,sha256=JeIUWgPFmhkPqvmhe-MLwwvAu9yR5F2k3qaViJCJJD4,1148
37
- halib/research/flops.py,sha256=Us0VudX8QMOm7YenICGf-Tq57C_l9x9hj-MUGA8_hCg,5773
38
- halib/research/metrics.py,sha256=PXPCy8r1_0lpMKfjc5SjIpRHnX80gHmeZ1C4eVj9U_s,5200
39
- halib/research/mics.py,sha256=nZyric8d0yKP5HrwwLsN4AjszrdxAhpJCRo1oy-EKJI,2612
40
- halib/research/params_gen.py,sha256=GcTMlniL0iE3HalJY-gVRiYa8Qy8u6nX4LkKZeMkct8,4262
41
- halib/research/perfcalc.py,sha256=G8WpGB95AY5KQCt0__bPK1yUa2M1onNhXLM7twkElxg,15904
42
- halib/research/perftb.py,sha256=YlBXMeWn8S0LhsgxONEQZrKomRTju2T8QGGspUOy_6Y,31100
43
- halib/research/plot.py,sha256=GBCXP1QnzRlNqjAl9UvGvW3I9II61DBStJNQThrLy38,28578
44
- halib/research/profiler.py,sha256=GRAewTo0jGkOputjmRwtYVfJYBze_ivsOnrW9exWkPQ,11772
45
- halib/research/torchloader.py,sha256=yqUjcSiME6H5W210363HyRUrOi3ISpUFAFkTr1w4DCw,6503
46
- halib/research/wandb_op.py,sha256=YzLEqME5kIRxi3VvjFkW83wnFrsn92oYeqYuNwtYRkY,4188
47
- halib/sys/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- halib/sys/cmd.py,sha256=b2x7JPcNnFjLGheIESVYvqAb-w2UwBM1PAwYxMZ5YjA,228
49
- halib/sys/filesys.py,sha256=ERpnELLDKJoTIIKf-AajgkY62nID4qmqmX5TkE95APU,2931
50
- halib/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
- halib/system/cmd.py,sha256=b2x7JPcNnFjLGheIESVYvqAb-w2UwBM1PAwYxMZ5YjA,228
52
- halib/system/filesys.py,sha256=ERpnELLDKJoTIIKf-AajgkY62nID4qmqmX5TkE95APU,2931
53
- halib/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
- halib/utils/dataclass_util.py,sha256=rj2IMLlUzbm2OlF5_B2dRTk9njZOaF7tTjYkOsq8uLY,1416
55
- halib/utils/dict_op.py,sha256=wYE6Iw-_CnCWdMg9tpJ2Y2-e2ESkW9FxmdBkZkbUh80,299
56
- halib/utils/gpu_mon.py,sha256=vD41_ZnmPLKguuq9X44SB_vwd9JrblO4BDzHLXZhhFY,2233
57
- halib/utils/listop.py,sha256=Vpa8_2fI0wySpB2-8sfTBkyi_A4FhoFVVvFiuvW8N64,339
58
- halib/utils/tele_noti.py,sha256=-4WXZelCA4W9BroapkRyIdUu9cUVrcJJhegnMs_WpGU,5928
59
- halib/utils/video.py,sha256=zLoj5EHk4SmP9OnoHjO8mLbzPdtq6gQPzTQisOEDdO8,3261
60
- halib-0.1.99.dist-info/licenses/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
61
- halib-0.1.99.dist-info/METADATA,sha256=1v3WnxBK6Aj36jA7tIycuFGQwJs19uLMi_EhSMpvmaU,6387
62
- halib-0.1.99.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
63
- halib-0.1.99.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
64
- halib-0.1.99.dist-info/RECORD,,
File without changes