Spaces:
Runtime error
Runtime error
Push
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .dockerignore +10 -0
- .env +3 -0
- src/__pycache__/__init__.cpython-39.pyc +0 -0
- src/__pycache__/config.cpython-39.pyc +0 -0
- src/__pycache__/conftest.cpython-39-pytest-7.3.1.pyc +0 -0
- src/__pycache__/conftest.cpython-39-pytest-7.4.0.pyc +0 -0
- src/__pycache__/constants.cpython-39.pyc +0 -0
- src/__pycache__/data_loader.cpython-39.pyc +0 -0
- src/__pycache__/data_loader_test.cpython-39-pytest-7.3.1.pyc +0 -0
- src/__pycache__/data_loader_test.cpython-39-pytest-7.4.0.pyc +0 -0
- src/__pycache__/db_deprecated.cpython-39.pyc +0 -0
- src/__pycache__/db_manager.cpython-39.pyc +0 -0
- src/__pycache__/json_encoder.cpython-39.pyc +0 -0
- src/__pycache__/make_api.cpython-39.pyc +0 -0
- src/__pycache__/make_openapi.cpython-39.pyc +0 -0
- src/__pycache__/parquet_writer.cpython-39.pyc +0 -0
- src/__pycache__/router_concept.cpython-39.pyc +0 -0
- src/__pycache__/router_data_loader.cpython-39.pyc +0 -0
- src/__pycache__/router_dataset.cpython-39.pyc +0 -0
- src/__pycache__/router_dataset_manager.cpython-39.pyc +0 -0
- src/__pycache__/router_embed_fn.cpython-39.pyc +0 -0
- src/__pycache__/router_embedding.cpython-39.pyc +0 -0
- src/__pycache__/router_signal.cpython-39.pyc +0 -0
- src/__pycache__/router_tasks.cpython-39.pyc +0 -0
- src/__pycache__/router_utils.cpython-39.pyc +0 -0
- src/__pycache__/schema.cpython-39-pytest-7.2.2.pyc +0 -0
- src/__pycache__/schema.cpython-39.pyc +0 -0
- src/__pycache__/schema_test.cpython-39-pytest-7.2.2.pyc +0 -0
- src/__pycache__/schema_test.cpython-39-pytest-7.3.1.pyc +0 -0
- src/__pycache__/schema_test.cpython-39-pytest-7.4.0.pyc +0 -0
- src/__pycache__/server.cpython-39.pyc +0 -0
- src/__pycache__/server_api.cpython-39.pyc +0 -0
- src/__pycache__/server_concept_test.cpython-39-pytest-7.3.1.pyc +0 -0
- src/__pycache__/server_concept_test.cpython-39-pytest-7.4.0.pyc +0 -0
- src/__pycache__/server_concepts_test.cpython-39-pytest-7.3.1.pyc +0 -0
- src/__pycache__/server_test.cpython-39-pytest-7.2.2.pyc +0 -0
- src/__pycache__/server_test.cpython-39-pytest-7.3.1.pyc +0 -0
- src/__pycache__/server_test.cpython-39-pytest-7.4.0.pyc +0 -0
- src/__pycache__/tasks.cpython-39.pyc +0 -0
- src/__pycache__/tasks_test.cpython-39-pytest-7.2.2.pyc +0 -0
- src/__pycache__/tasks_test.cpython-39-pytest-7.3.1.pyc +0 -0
- src/__pycache__/test_utils.cpython-39-pytest-7.2.2.pyc +0 -0
- src/__pycache__/test_utils.cpython-39-pytest-7.3.1.pyc +0 -0
- src/__pycache__/test_utils.cpython-39-pytest-7.4.0.pyc +0 -0
- src/__pycache__/utils.cpython-39.pyc +0 -0
- src/server.py +27 -27
- web/blueprint/build/_app/immutable/chunks/{ConceptView.4cac775f.js → ConceptView.aac099b5.js} +0 -0
- web/blueprint/build/_app/immutable/chunks/navigation.4a0e612e.js +0 -1
- web/blueprint/build/_app/immutable/chunks/navigation.6aaae227.js +1 -0
- web/blueprint/build/_app/immutable/chunks/{singletons.8070b87f.js → singletons.f0ce81ce.js} +1 -1
.dockerignore
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Python
|
2 |
+
**/__pycache__
|
3 |
+
**/*.pyc
|
4 |
+
**/*.pyo
|
5 |
+
**/*.pyd
|
6 |
+
# Ignore unit tests.
|
7 |
+
**/*_test.py
|
8 |
+
|
9 |
+
# Mac OS.
|
10 |
+
.DS_Store
|
.env
CHANGED
@@ -26,3 +26,6 @@ DUCKDB_USE_VIEWS=0
|
|
26 |
|
27 |
# The repo to use for the huggingface demo.
|
28 |
# HF_STAGING_DEMO_REPO='HF_ORG/HF_REPO_NAME'
|
|
|
|
|
|
|
|
26 |
|
27 |
# The repo to use for the huggingface demo.
|
28 |
# HF_STAGING_DEMO_REPO='HF_ORG/HF_REPO_NAME'
|
29 |
+
|
30 |
+
# To sync data from huggingface before the server boots.
|
31 |
+
# LILAC_DL_DATA_FROM_HF_SPACE='HF_ORG/HF_REPO_NAME'
|
src/__pycache__/__init__.cpython-39.pyc
ADDED
Binary file (129 Bytes). View file
|
|
src/__pycache__/config.cpython-39.pyc
ADDED
Binary file (611 Bytes). View file
|
|
src/__pycache__/conftest.cpython-39-pytest-7.3.1.pyc
ADDED
Binary file (1.41 kB). View file
|
|
src/__pycache__/conftest.cpython-39-pytest-7.4.0.pyc
ADDED
Binary file (1.41 kB). View file
|
|
src/__pycache__/constants.cpython-39.pyc
ADDED
Binary file (395 Bytes). View file
|
|
src/__pycache__/data_loader.cpython-39.pyc
ADDED
Binary file (4.39 kB). View file
|
|
src/__pycache__/data_loader_test.cpython-39-pytest-7.3.1.pyc
ADDED
Binary file (4.35 kB). View file
|
|
src/__pycache__/data_loader_test.cpython-39-pytest-7.4.0.pyc
ADDED
Binary file (4.35 kB). View file
|
|
src/__pycache__/db_deprecated.cpython-39.pyc
ADDED
Binary file (9.11 kB). View file
|
|
src/__pycache__/db_manager.cpython-39.pyc
ADDED
Binary file (1.36 kB). View file
|
|
src/__pycache__/json_encoder.cpython-39.pyc
ADDED
Binary file (1.94 kB). View file
|
|
src/__pycache__/make_api.cpython-39.pyc
ADDED
Binary file (1.06 kB). View file
|
|
src/__pycache__/make_openapi.cpython-39.pyc
ADDED
Binary file (1.02 kB). View file
|
|
src/__pycache__/parquet_writer.cpython-39.pyc
ADDED
Binary file (3.06 kB). View file
|
|
src/__pycache__/router_concept.cpython-39.pyc
ADDED
Binary file (7.57 kB). View file
|
|
src/__pycache__/router_data_loader.cpython-39.pyc
ADDED
Binary file (2.97 kB). View file
|
|
src/__pycache__/router_dataset.cpython-39.pyc
ADDED
Binary file (10.5 kB). View file
|
|
src/__pycache__/router_dataset_manager.cpython-39.pyc
ADDED
Binary file (6.12 kB). View file
|
|
src/__pycache__/router_embed_fn.cpython-39.pyc
ADDED
Binary file (1.27 kB). View file
|
|
src/__pycache__/router_embedding.cpython-39.pyc
ADDED
Binary file (1.31 kB). View file
|
|
src/__pycache__/router_signal.cpython-39.pyc
ADDED
Binary file (1.93 kB). View file
|
|
src/__pycache__/router_tasks.cpython-39.pyc
ADDED
Binary file (585 Bytes). View file
|
|
src/__pycache__/router_utils.cpython-39.pyc
ADDED
Binary file (1.31 kB). View file
|
|
src/__pycache__/schema.cpython-39-pytest-7.2.2.pyc
ADDED
Binary file (14 kB). View file
|
|
src/__pycache__/schema.cpython-39.pyc
ADDED
Binary file (15.7 kB). View file
|
|
src/__pycache__/schema_test.cpython-39-pytest-7.2.2.pyc
ADDED
Binary file (9.41 kB). View file
|
|
src/__pycache__/schema_test.cpython-39-pytest-7.3.1.pyc
ADDED
Binary file (9.4 kB). View file
|
|
src/__pycache__/schema_test.cpython-39-pytest-7.4.0.pyc
ADDED
Binary file (9.4 kB). View file
|
|
src/__pycache__/server.cpython-39.pyc
ADDED
Binary file (3.77 kB). View file
|
|
src/__pycache__/server_api.cpython-39.pyc
ADDED
Binary file (4.46 kB). View file
|
|
src/__pycache__/server_concept_test.cpython-39-pytest-7.3.1.pyc
ADDED
Binary file (19.2 kB). View file
|
|
src/__pycache__/server_concept_test.cpython-39-pytest-7.4.0.pyc
ADDED
Binary file (19.2 kB). View file
|
|
src/__pycache__/server_concepts_test.cpython-39-pytest-7.3.1.pyc
ADDED
Binary file (141 Bytes). View file
|
|
src/__pycache__/server_test.cpython-39-pytest-7.2.2.pyc
ADDED
Binary file (8.39 kB). View file
|
|
src/__pycache__/server_test.cpython-39-pytest-7.3.1.pyc
ADDED
Binary file (12.5 kB). View file
|
|
src/__pycache__/server_test.cpython-39-pytest-7.4.0.pyc
ADDED
Binary file (12.5 kB). View file
|
|
src/__pycache__/tasks.cpython-39.pyc
ADDED
Binary file (9.66 kB). View file
|
|
src/__pycache__/tasks_test.cpython-39-pytest-7.2.2.pyc
ADDED
Binary file (2.91 kB). View file
|
|
src/__pycache__/tasks_test.cpython-39-pytest-7.3.1.pyc
ADDED
Binary file (2.91 kB). View file
|
|
src/__pycache__/test_utils.cpython-39-pytest-7.2.2.pyc
ADDED
Binary file (889 Bytes). View file
|
|
src/__pycache__/test_utils.cpython-39-pytest-7.3.1.pyc
ADDED
Binary file (1.1 kB). View file
|
|
src/__pycache__/test_utils.cpython-39-pytest-7.4.0.pyc
ADDED
Binary file (1.1 kB). View file
|
|
src/__pycache__/utils.cpython-39.pyc
ADDED
Binary file (9.63 kB). View file
|
|
src/server.py
CHANGED
@@ -62,33 +62,33 @@ app.mount('/', StaticFiles(directory=os.path.join(DIST_PATH), html=True, check_d
|
|
62 |
def startup() -> None:
|
63 |
"""Download dataset files from the HF space that is uploaded before building the image."""
|
64 |
# Setup.
|
65 |
-
repo_id = '
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
|
93 |
|
94 |
def run(cmd: str) -> subprocess.CompletedProcess[bytes]:
|
|
|
62 |
def startup() -> None:
|
63 |
"""Download dataset files from the HF space that is uploaded before building the image."""
|
64 |
# Setup.
|
65 |
+
repo_id = CONFIG.get('LILAC_DL_DATA_FROM_HF_SPACE', None)
|
66 |
+
|
67 |
+
if repo_id:
|
68 |
+
# Download the huggingface space data. This includes code and datasets, so we move the datasets
|
69 |
+
# alone to the data directory.
|
70 |
+
spaces_download_dir = os.path.join(data_path(), '.hf-spaces', repo_id)
|
71 |
+
snapshot_download(
|
72 |
+
repo_id=repo_id,
|
73 |
+
repo_type='space',
|
74 |
+
local_dir=spaces_download_dir,
|
75 |
+
local_dir_use_symlinks=False,
|
76 |
+
token=CONFIG['HF_ACCESS_TOKEN'])
|
77 |
+
|
78 |
+
datasets = list_datasets(os.path.join(spaces_download_dir, 'data'))
|
79 |
+
for dataset in datasets:
|
80 |
+
spaces_dataset_output_dir = get_dataset_output_dir(
|
81 |
+
os.path.join(spaces_download_dir, 'data'), dataset.namespace, dataset.dataset_name)
|
82 |
+
persistent_output_dir = get_dataset_output_dir(data_path(), dataset.namespace,
|
83 |
+
dataset.dataset_name)
|
84 |
+
|
85 |
+
shutil.rmtree(persistent_output_dir, ignore_errors=True)
|
86 |
+
print('~~~~moving', os.path.join(spaces_download_dir, dataset.namespace,
|
87 |
+
dataset.dataset_name), 'to', persistent_output_dir)
|
88 |
+
shutil.move(spaces_dataset_output_dir, persistent_output_dir)
|
89 |
+
|
90 |
+
run('ls -al')
|
91 |
+
run(f'ls {data_path()}')
|
92 |
|
93 |
|
94 |
def run(cmd: str) -> subprocess.CompletedProcess[bytes]:
|
web/blueprint/build/_app/immutable/chunks/{ConceptView.4cac775f.js → ConceptView.aac099b5.js}
RENAMED
The diff for this file is too large to render.
See raw diff
|
|
web/blueprint/build/_app/immutable/chunks/navigation.4a0e612e.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{j as o}from"./singletons.8070b87f.js";const e=o("goto");export{e as g};
|
|
|
|
web/blueprint/build/_app/immutable/chunks/navigation.6aaae227.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{j as o}from"./singletons.f0ce81ce.js";const e=o("goto");export{e as g};
|
web/blueprint/build/_app/immutable/chunks/{singletons.8070b87f.js → singletons.f0ce81ce.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{w as u}from"./index.5884c3e8.js";var p;const k=((p=globalThis.
|
|
|
1 |
+
import{w as u}from"./index.5884c3e8.js";var p;const k=((p=globalThis.__sveltekit_12no3nh)==null?void 0:p.base)??"";var h;const m=((h=globalThis.__sveltekit_12no3nh)==null?void 0:h.assets)??k,w="1688698229991",T="sveltekit:snapshot",y="sveltekit:scroll",I="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1};function S(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function x(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function g(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function O(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=g(e)}}function U(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,r=!n||!!a||A(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),l=(n==null?void 0:n.origin)===location.origin&&e.hasAttribute("download");return{url:n,external:r,target:a,download:l}}function L(e){let t=null,n=null,a=null,r=null,l=null,o=null,s=e;for(;s&&s!==document.documentElement;)a===null&&(a=c(s,"preload-code")),r===null&&(r=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),l===null&&(l=c(s,"reload")),o===null&&(o=c(s,"replacestate")),s=g(s);function i(v){switch(v){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[a??"off"],preload_data:d[r??"off"],keep_focus:i(t),noscroll:i(n),reload:i(l),replace_state:i(o)}}function _(e){const t=u(e);let n=!0;function a(){n=!0,t.update(o=>o)}function r(o){n=!1,t.set(o)}function l(o){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&o(s=i)})}return{notify:a,set:r,subscribe:l}}function E(){const{set:e,subscribe:t}=u(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${m}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const o=(await r.json()).version!==w;return o&&(e(!0),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:a}}function A(e,t){return e.origin!==location.origin||!e.pathname.startsWith(t)}let b;function N(e){b=e.client}function P(e){return(...t)=>b[e](...t)}const V={url:_({}),page:_({}),navigating:u(null),updated:E()};export{I,f as P,y as S,T as a,U as b,L as c,x as d,k as e,O as f,S as g,N as h,A as i,P as j,V as s};
|