Eliahu commited on
Commit
7e48311
·
1 Parent(s): 27e7d8e

Added code and data for compressed layouts, new layout of large NLP cluster, and additional information

Browse files
.gitattributes CHANGED
@@ -35,3 +35,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  modalities_data.json filter=lfs diff=lfs merge=lfs -text
37
  large_nlp_data.json filter=lfs diff=lfs merge=lfs -text
 
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  modalities_data.json filter=lfs diff=lfs merge=lfs -text
37
  large_nlp_data.json filter=lfs diff=lfs merge=lfs -text
38
+ compressed_large_nlp_data.json.gz filter=lfs diff=lfs merge=lfs -text
39
+ compressed_modalities_data.json.gz filter=lfs diff=lfs merge=lfs -text
compressed_large_nlp_data.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2eda736f8882384558fc4abd089efb4092d122114e455290c0e7aa3df796982b
3
+ size 17696866
compressed_modalities_data.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b75bf9487d0126f7bbd685baffdfbaeef0f3d9155adb67e501693a4c24a502e
3
+ size 2493363
config.json CHANGED
@@ -1,15 +1,15 @@
1
  {
2
  "type": "network",
3
  "version": "1.0",
4
- "data": "modalities_data.json",
5
  "logo": {
6
  "file": "",
7
  "link": "",
8
  "text": "Test"
9
  },
10
  "text": {
11
- "more": "More",
12
- "intro": "A model atlas for a small region of Hugging Face. The model atlas was introduced in the paper \"Charting and Navigating Hugging Face's Model Atlas\". <br><br> For more details see <a href=\"https://horwitz.ai/model-atlas\" target=\"_blank\">horwitz.ai/model-atlas</a>. <br><br><br> Note: This visualizes a very small part of Hugging Face, more maps coming soon... <br><br><br> Note: this is an alpha version, many features are missing including edge arrows and node borders, they will be added in a future version.",
13
  "title": "Model Atlas"
14
  },
15
  "legend": {
 
1
  {
2
  "type": "network",
3
  "version": "1.0",
4
+ "data": "compressed_modalities_data.json.gz",
5
  "logo": {
6
  "file": "",
7
  "link": "",
8
  "text": "Test"
9
  },
10
  "text": {
11
+ "more": "<p><strong>Note:</strong> This visualizes a very small part of Hugging Face, more maps coming soon...</p> <br><br><br> <p><strong>Note:</strong> this is an alpha version, loading can take a bit of time and many features are missing including edge arrows and node borders, they will be added in a future version.</p> <br><br><br> <h2 class=\"title\">BibTeX</h2><p>If you use this model atlas in your research or work, please cite our paper: </p><br><pre><code>@misc{horwitz2025chartingnavigatinghuggingfaces, <br>title={Charting and Navigating Hugging Face's Model Atlas}, <br>author={Eliahu Horwitz and Nitzan Kurer and Jonathan Kahana and Liel Amar and Yedid Hoshen}, <br>year={2025}, <br>eprint={2503.10633}, <br>archivePrefix={arXiv}, <br>primaryClass={cs.LG}, <br>url={https://arxiv.org/abs/2503.10633},<br>}</code></pre>",
12
+ "intro": "A model atlas for a small region of Hugging Face. The model atlas was introduced in the paper \"Charting and Navigating Hugging Face's Model Atlas\". <br><br> For more details see <a href=\"https://horwitz.ai/model-atlas\" target=\"_blank\">horwitz.ai/model-atlas</a>.<br><br><br>",
13
  "title": "Model Atlas"
14
  },
15
  "legend": {
index.html CHANGED
@@ -15,7 +15,7 @@
15
  <script src="js/sigma/sigma.parseJson.js" type="text/javascript" language="javascript"></script>
16
  <script src="js/fancybox/jquery.fancybox.pack.js" type="text/javascript" language="javascript"></script>
17
  <script src="js/main.js" type="text/javascript" language="javascript"></script>
18
-
19
  <link rel="stylesheet" type="text/css" href="js/fancybox/jquery.fancybox.css"/>
20
  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
21
  <link rel="stylesheet" media="screen and (max-height: 770px)" href="css/tablet.css" />
@@ -32,6 +32,10 @@
32
  <div id="title"></div>
33
  <div id="titletext"></div>
34
  <div class="info cf">
 
 
 
 
35
  </div>
36
  <div id="legend">
37
  <div class="box">
 
15
  <script src="js/sigma/sigma.parseJson.js" type="text/javascript" language="javascript"></script>
16
  <script src="js/fancybox/jquery.fancybox.pack.js" type="text/javascript" language="javascript"></script>
17
  <script src="js/main.js" type="text/javascript" language="javascript"></script>
18
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/pako/2.0.4/pako.min.js"></script>
19
  <link rel="stylesheet" type="text/css" href="js/fancybox/jquery.fancybox.css"/>
20
  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
21
  <link rel="stylesheet" media="screen and (max-height: 770px)" href="css/tablet.css" />
 
32
  <div id="title"></div>
33
  <div id="titletext"></div>
34
  <div class="info cf">
35
+ <dl>
36
+ <dt class="moreinformation"></dt>
37
+ <dd class="line"><a href="#information" class="line fb">More about this visualisation</a></dd>
38
+ </dl>
39
  </div>
40
  <div id="legend">
41
  <div class="box">
js/main.js CHANGED
@@ -823,8 +823,8 @@ function AtlasSelector(a) {
823
 
824
  function getAvailableAtlases() {
825
  return [
826
- { name: "Modalities Atlas", file: "modalities_data.json" },
827
- { name: "Large NLP Atlas", file: "large_nlp_data.json" },
828
  ];
829
  }
830
 
 
823
 
824
  function getAvailableAtlases() {
825
  return [
826
+ { name: "Modalities Atlas", file: "compressed_modalities_data.json.gz" },
827
+ { name: "Large NLP Atlas", file: "compressed_large_nlp_data.json.gz" },
828
  ];
829
  }
830
 
js/sigma/sigma.parseJson.js CHANGED
@@ -1,28 +1,58 @@
1
- // Scott Hale (Oxford Internet Institute)
2
- // Requires sigma.js and jquery to be loaded
3
- // based on parseGexf from Mathieu Jacomy @ Sciences Po M�dialab & WebAtlas
4
 
5
- sigma.publicPrototype.parseJson = function(jsonPath,callback) {
6
- var sigmaInstance = this;
7
- jQuery.getJSON(jsonPath, function(data) {
8
- for (i=0; i<data.nodes.length; i++){
9
- var id=data.nodes[i].id;
10
- //window.NODE = data.nodes[i];//In the original, but not sure purpose
11
- sigmaInstance.addNode(id,data.nodes[i]);
12
- }
13
 
14
- for(j=0; j<data.edges.length; j++){
15
- var edgeNode = data.edges[j];
16
-
17
- var source = edgeNode.source;
18
- var target = edgeNode.target;
19
- var label = edgeNode.label;
20
- var eid = edgeNode.id;
21
-
22
- sigmaInstance.addEdge(eid,source,target,edgeNode);
23
- }
24
-
25
- if (callback) callback.call(this);//Trigger the data ready function
26
-
27
- });//end jquery getJSON function
28
- };//end sigma.parseJson function
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // // Scott Hale (Oxford Internet Institute)
2
+ // // Requires sigma.js and jquery to be loaded
3
+ // // based on parseGexf from Mathieu Jacomy @ Sciences Po M�dialab & WebAtlas
4
 
 
 
 
 
 
 
 
 
5
 
6
+ sigma.publicPrototype.parseJson = function(gzippedJsonPath, callback) {
7
+ var sigmaInstance = this;
8
+
9
+ // Use XMLHttpRequest for binary data
10
+ var xhr = new XMLHttpRequest();
11
+ xhr.open('GET', gzippedJsonPath, true);
12
+ xhr.responseType = 'arraybuffer';
13
+
14
+ xhr.onload = function() {
15
+ if (xhr.status === 200) {
16
+ try {
17
+ // Decompress the gzipped data using pako
18
+ var inflatedData = pako.inflate(new Uint8Array(xhr.response));
19
+
20
+ // Convert binary data to string
21
+ var jsonString = new TextDecoder('utf-8').decode(inflatedData);
22
+
23
+ // Parse the JSON
24
+ var jsonData = JSON.parse(jsonString);
25
+
26
+ // Process nodes
27
+ for (var i = 0; i < jsonData.nodes.length; i++) {
28
+ var id = jsonData.nodes[i].id;
29
+ sigmaInstance.addNode(id, jsonData.nodes[i]);
30
+ }
31
+
32
+ // Process edges
33
+ for (var j = 0; j < jsonData.edges.length; j++) {
34
+ var edgeNode = jsonData.edges[j];
35
+ var source = edgeNode.source;
36
+ var target = edgeNode.target;
37
+ var label = edgeNode.label;
38
+ var eid = edgeNode.id;
39
+
40
+ sigmaInstance.addEdge(eid, source, target, edgeNode);
41
+ }
42
+
43
+ // Call the callback function if provided
44
+ if (callback) callback.call(sigmaInstance);
45
+ } catch (error) {
46
+ console.error("Error processing gzipped JSON:", error);
47
+ }
48
+ } else {
49
+ console.error("Error fetching gzipped JSON. Status:", xhr.status);
50
+ }
51
+ };
52
+
53
+ xhr.onerror = function() {
54
+ console.error("Network error while fetching gzipped JSON");
55
+ };
56
+
57
+ xhr.send();
58
+ };