Squish42 commited on
Commit
5a66577
1 Parent(s): 4432730

Add 'pruned' configuration.

Browse files
README.md CHANGED
@@ -24,4 +24,5 @@ dataset.
24
 
25
  This dataset has been cleaned and formatted for use with fastchat.
26
 
27
- ![Plot](assets/full-train.png)
 
 
24
 
25
  This dataset has been cleaned and formatted for use with fastchat.
26
 
27
+ ![Plot](assets/full-train.png)
28
+ ![Plot](assets/pruned-train.png)
assets/pruned-test.png ADDED

Git LFS Details

  • SHA256: cf046a075dedcf3fbccff801f3b323c6b314227d3583932707e2952777db7b62
  • Pointer size: 130 Bytes
  • Size of remote file: 15.8 kB
assets/pruned-train.png ADDED

Git LFS Details

  • SHA256: 2463b68b45f700c978106b7852f0abc13225c14b8aa9f321b6959c5b342d736e
  • Pointer size: 130 Bytes
  • Size of remote file: 17.7 kB
data/pruned/bluemoon.test.raw ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9625715300aa954262f8721458ecdb890a2468a4fb7269d85169297afe28d89d
3
+ size 824676
data/pruned/bluemoon.train.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d839732408bca8f0210d718b6ccd33b3750cc8cc6da64116615acfa28e3208b
3
+ size 59947031
scripts/generate_plot.py CHANGED
@@ -4,7 +4,8 @@ import matplotlib.pyplot as plt
4
 
5
  import dsbuild
6
 
7
- stats_path: list[str] = ['../stats/full/test/', '../stats/full/train']
 
8
 
9
 
10
  def __plot_mean_word_counts(path: list[str], show: bool = False, save: bool = False):
@@ -24,7 +25,7 @@ def __plot_mean_word_counts(path: list[str], show: bool = False, save: bool = Fa
24
 
25
 
26
  def main():
27
- __plot_mean_word_counts(stats_path, show=True, save=True)
28
 
29
 
30
  if __name__ == '__main__':
 
4
 
5
  import dsbuild
6
 
7
+ stats_path: list[str] = ['../stats/full/train/', '../stats/full/test',
8
+ '../stats/pruned/train', '../stats/pruned/test']
9
 
10
 
11
  def __plot_mean_word_counts(path: list[str], show: bool = False, save: bool = False):
 
25
 
26
 
27
  def main():
28
+ __plot_mean_word_counts(stats_path, show=False, save=True)
29
 
30
 
31
  if __name__ == '__main__':
split.yaml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Bluemoon-Split
2
+ description: "Splits"
3
+ build:
4
+ conversationBatch: 100
5
+ cleanDirectory: [ 'out/data/pruned', 'out/stats/pruned' ]
6
+ verifyRequirements: false
7
+ verifyArtifacts: false
8
+ sendPackedFiles: true
9
+ gzipRemotePackedFiles: true
10
+ gzipLocalPackedFiles: false
11
+
12
+ _input_steps:
13
+ - step: &bluemoon_cleaned
14
+ type: FastChatInput
15
+ sync: main
16
+ config:
17
+ path: "out/data/full/bluemoon.train.json"
18
+ preserveIds: true
19
+
20
+ _passes:
21
+ - pass: &cfg--pruned
22
+ required:
23
+ - path: "out/data/full/bluemoon.train.json"
24
+ steps:
25
+ # Pre-cleaned source
26
+ - *bluemoon_cleaned
27
+ # Filter
28
+ - type: StatsConversationPrune
29
+ description: "Prune conversations for deviation or maximum message length"
30
+ pack: [ 'out/stats/full/train/stats.json', 'out/stats/full/train/conversations.json.gz' ]
31
+ config:
32
+ packedStatsPath: 'out/stats/full/train'
33
+ wordsStdDevRatioMin: 0.5
34
+ #wordsStdDevRatioMax: 10.0
35
+ #wordsClampMin: 120
36
+ wordsClampMax: 2048
37
+ messagesCountMin: 4
38
+ # Train split
39
+ - type: FastChatOutput
40
+ sync: main
41
+ config:
42
+ path: "out/data/pruned/bluemoon.train.json"
43
+ indent: 2
44
+ - type: StatsOutput
45
+ description: "Output statistics"
46
+ sync: main
47
+ config:
48
+ path: 'out/stats/pruned/train/stats.json'
49
+ vocabPath: 'out/stats/pruned/train/vocabulary.json.gz'
50
+ gZipVocabulary: true
51
+ conversationsPath: 'out/stats/pruned/train/conversations.json.gz'
52
+ gZipConversations: true
53
+ # Test split
54
+ - type: RawSampleOutput
55
+ sync: main
56
+ config:
57
+ ratio: 0.01
58
+ forwardFilter: true
59
+ path: "out/data/pruned/bluemoon.test.raw"
60
+ - type: StatsOutput
61
+ description: "Output statistics"
62
+ sync: main
63
+ config:
64
+ path: 'out/stats/pruned/test/stats.json'
65
+ vocabPath: 'out/stats/pruned/test/vocabulary.json.gz'
66
+ gZipVocabulary: true
67
+ conversationsPath: 'out/stats/pruned/test/conversations.json.gz'
68
+ gZipConversations: true
69
+ artifacts:
70
+ - file: "out/data/pruned/bluemoon.train.json"
71
+ - file: "out/data/pruned/bluemoon.test.raw"
72
+ # Use the above pass as a template to output for new configurations and splits.
73
+
74
+ passes: [ *cfg--pruned ]
stats/pruned/test/conversations.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a402f828e9550aa8cd3627d96905dcc00f21f1ae1c063dd12f46fe5af86c65a1
3
+ size 4490
stats/pruned/test/stats.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "conversationsTotal": 10,
3
+ "messagesTotal": 229,
4
+ "tokensTotal": 168636,
5
+ "tokensMean": 736.4017467248908,
6
+ "tokensStdDev": 269.5242698707312,
7
+ "wordsTotal": 148109,
8
+ "wordsMean": 646.764192139738,
9
+ "wordsStdDev": 229.4064989806647,
10
+ "messagesLenMean": 3600.2052401746723,
11
+ "messagesLenStdDev": 1289.6597353510115,
12
+ "messagesCountMean": 22.9,
13
+ "wordsMin": 189,
14
+ "wordsMax": 1589,
15
+ "tokensMin": 204,
16
+ "tokensMax": 1858,
17
+ "messagesLenTotal": 824447,
18
+ "messagesLenMin": 1045,
19
+ "messagesLenMax": 8852
20
+ }
stats/pruned/test/vocabulary.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2f062298bc946046cd8b72f1f49c740076d0e9492d42d7bafc09be60a1b3606
3
+ size 72150
stats/pruned/train/conversations.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0045429f76d68affa5caa3cb0c864051ebb253e0ebdd90a595ad1e34f7fefe8f
3
+ size 407582
stats/pruned/train/stats.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "conversationsTotal": 1041,
3
+ "messagesTotal": 22770,
4
+ "tokensTotal": 11966704,
5
+ "tokensMean": 525.5469477382521,
6
+ "tokensStdDev": 267.0269096949294,
7
+ "wordsTotal": 10633309,
8
+ "wordsMean": 466.9876592007027,
9
+ "wordsStdDev": 236.8723244513958,
10
+ "messagesLenMean": 2565.7306543697846,
11
+ "messagesLenStdDev": 1319.9514485339039,
12
+ "messagesCountMean": 21.87319884726225,
13
+ "wordsMin": 142,
14
+ "wordsMax": 2009,
15
+ "tokensMin": 149,
16
+ "tokensMax": 2345,
17
+ "messagesLenTotal": 58421687,
18
+ "messagesLenMin": 695,
19
+ "messagesLenMax": 11164
20
+ }
stats/pruned/train/vocabulary.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1b7d2f7bcaee45af4a848f8ec295905aece772e577691207c7b5f620a9b93dc
3
+ size 659540