Akshay4506 commited on
Commit
c4ff02d
Β·
1 Parent(s): ea8eeac

Fix deployment entry point and merge requirements

Browse files
This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. app.py +19 -0
  2. {backend β†’ matrix}/.env.example +0 -0
  3. {backend β†’ matrix}/Dockerfile +0 -0
  4. {backend β†’ matrix}/benchmark.py +1 -1
  5. {backend β†’ matrix}/catboost_info/catboost_training.json +0 -0
  6. {backend β†’ matrix}/catboost_info/learn/events.out.tfevents +0 -0
  7. {backend β†’ matrix}/catboost_info/learn_error.tsv +0 -0
  8. {backend β†’ matrix}/catboost_info/time_left.tsv +0 -0
  9. {backend β†’ matrix}/code/analysis/__init__.py +0 -0
  10. {backend β†’ matrix}/code/analysis/aggregate_results.py +0 -0
  11. {backend β†’ matrix}/code/config/datasets.yaml +0 -0
  12. {backend β†’ matrix}/code/config/experiments.yaml +0 -0
  13. {backend β†’ matrix}/code/config/models.yaml +0 -0
  14. {backend β†’ matrix}/code/docker/Dockerfile +0 -0
  15. {backend β†’ matrix}/code/evaluation/__init__.py +0 -0
  16. {backend β†’ matrix}/code/evaluation/compute_tracker.py +0 -0
  17. {backend β†’ matrix}/code/evaluation/cross_validation.py +0 -0
  18. {backend β†’ matrix}/code/evaluation/metrics.py +0 -0
  19. {backend β†’ matrix}/code/evaluation/statistical_tests.py +0 -0
  20. {backend β†’ matrix}/code/models/__init__.py +0 -0
  21. {backend β†’ matrix}/code/models/autogluon_wrapper.py +0 -0
  22. {backend β†’ matrix}/code/models/base_wrapper.py +0 -0
  23. {backend β†’ matrix}/code/models/baseline_wrappers.py +0 -0
  24. {backend β†’ matrix}/code/models/sap_rpt1_hf_wrapper.py +0 -0
  25. {backend β†’ matrix}/code/models/sap_rpt1_wrapper.py +0 -0
  26. {backend β†’ matrix}/code/models/tabicl_wrapper.py +0 -0
  27. {backend β†’ matrix}/code/models/tabpfn_wrapper.py +0 -0
  28. {backend β†’ matrix}/code/runners/__init__.py +0 -0
  29. {backend β†’ matrix}/code/runners/run_baselines.py +0 -0
  30. {backend β†’ matrix}/code/runners/run_batch.py +0 -0
  31. {backend β†’ matrix}/code/runners/run_experiment.py +0 -0
  32. {backend β†’ matrix}/code/sap_rpt1.egg-info/PKG-INFO +0 -0
  33. {backend β†’ matrix}/code/sap_rpt1.egg-info/SOURCES.txt +0 -0
  34. {backend β†’ matrix}/code/sap_rpt1.egg-info/dependency_links.txt +0 -0
  35. {backend β†’ matrix}/code/sap_rpt1.egg-info/requires.txt +0 -0
  36. {backend β†’ matrix}/code/sap_rpt1.egg-info/top_level.txt +0 -0
  37. {backend β†’ matrix}/code/utils/__init__.py +0 -0
  38. {backend β†’ matrix}/code/utils/logging_utils.py +0 -0
  39. {backend β†’ matrix}/ensemble.py +0 -0
  40. {backend β†’ matrix}/fix_dataset.py +0 -0
  41. main.py β†’ matrix/main.py +2 -0
  42. {backend β†’ matrix}/scripts/demo_benchmark.py +0 -0
  43. {backend β†’ matrix}/scripts/download_datasets.py +0 -0
  44. {backend β†’ matrix}/scripts/reproduce_all.sh +0 -0
  45. {backend β†’ matrix}/scripts/test_sap_rpt1.py +0 -0
  46. {backend β†’ matrix}/setup.py +0 -0
  47. {backend β†’ matrix}/static/app.js +0 -0
  48. {backend β†’ matrix}/static/arena.html +0 -0
  49. {backend β†’ matrix}/static/landing.html +0 -0
  50. {backend β†’ matrix}/static/style.css +0 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import sys
2
+ import os
3
+ from pathlib import Path
4
+
5
+ # Add backend to sys.path so we can import modules correctly
6
+ # We add both backend/ and backend/code to the path
7
+ backend_path = Path(__file__).parent / "backend"
8
+ sys.path.append(str(backend_path))
9
+ sys.path.append(str(backend_path / "code"))
10
+
11
+ # Import the FastAPI app from main.py in the backend folder
12
+ from main import app
13
+
14
+ # For Hugging Face Spaces, the file must be named app.py or main.py
15
+ # and the app instance must be called 'app'.
16
+ if __name__ == "__main__":
17
+ import uvicorn
18
+ port = int(os.environ.get("PORT", 7860))
19
+ uvicorn.run(app, host="0.0.0.0", port=port)
{backend β†’ matrix}/.env.example RENAMED
File without changes
{backend β†’ matrix}/Dockerfile RENAMED
File without changes
{backend β†’ matrix}/benchmark.py RENAMED
@@ -17,7 +17,7 @@ from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
17
  warnings.filterwarnings("ignore")
18
 
19
  # Allow importing model wrappers from the code directory
20
- sys.path.insert(0, str(Path(__file__).parent.parent / "code"))
21
 
22
  N_FOLDS = int(os.getenv("N_FOLDS", "5"))
23
  RAND = int(os.getenv("RANDOM_STATE", "42"))
 
17
  warnings.filterwarnings("ignore")
18
 
19
  # Allow importing model wrappers from the code directory
20
+ sys.path.insert(0, str(Path(__file__).parent / "code"))
21
 
22
  N_FOLDS = int(os.getenv("N_FOLDS", "5"))
23
  RAND = int(os.getenv("RANDOM_STATE", "42"))
{backend β†’ matrix}/catboost_info/catboost_training.json RENAMED
File without changes
{backend β†’ matrix}/catboost_info/learn/events.out.tfevents RENAMED
File without changes
{backend β†’ matrix}/catboost_info/learn_error.tsv RENAMED
File without changes
{backend β†’ matrix}/catboost_info/time_left.tsv RENAMED
File without changes
{backend β†’ matrix}/code/analysis/__init__.py RENAMED
File without changes
{backend β†’ matrix}/code/analysis/aggregate_results.py RENAMED
File without changes
{backend β†’ matrix}/code/config/datasets.yaml RENAMED
File without changes
{backend β†’ matrix}/code/config/experiments.yaml RENAMED
File without changes
{backend β†’ matrix}/code/config/models.yaml RENAMED
File without changes
{backend β†’ matrix}/code/docker/Dockerfile RENAMED
File without changes
{backend β†’ matrix}/code/evaluation/__init__.py RENAMED
File without changes
{backend β†’ matrix}/code/evaluation/compute_tracker.py RENAMED
File without changes
{backend β†’ matrix}/code/evaluation/cross_validation.py RENAMED
File without changes
{backend β†’ matrix}/code/evaluation/metrics.py RENAMED
File without changes
{backend β†’ matrix}/code/evaluation/statistical_tests.py RENAMED
File without changes
{backend β†’ matrix}/code/models/__init__.py RENAMED
File without changes
{backend β†’ matrix}/code/models/autogluon_wrapper.py RENAMED
File without changes
{backend β†’ matrix}/code/models/base_wrapper.py RENAMED
File without changes
{backend β†’ matrix}/code/models/baseline_wrappers.py RENAMED
File without changes
{backend β†’ matrix}/code/models/sap_rpt1_hf_wrapper.py RENAMED
File without changes
{backend β†’ matrix}/code/models/sap_rpt1_wrapper.py RENAMED
File without changes
{backend β†’ matrix}/code/models/tabicl_wrapper.py RENAMED
File without changes
{backend β†’ matrix}/code/models/tabpfn_wrapper.py RENAMED
File without changes
{backend β†’ matrix}/code/runners/__init__.py RENAMED
File without changes
{backend β†’ matrix}/code/runners/run_baselines.py RENAMED
File without changes
{backend β†’ matrix}/code/runners/run_batch.py RENAMED
File without changes
{backend β†’ matrix}/code/runners/run_experiment.py RENAMED
File without changes
{backend β†’ matrix}/code/sap_rpt1.egg-info/PKG-INFO RENAMED
File without changes
{backend β†’ matrix}/code/sap_rpt1.egg-info/SOURCES.txt RENAMED
File without changes
{backend β†’ matrix}/code/sap_rpt1.egg-info/dependency_links.txt RENAMED
File without changes
{backend β†’ matrix}/code/sap_rpt1.egg-info/requires.txt RENAMED
File without changes
{backend β†’ matrix}/code/sap_rpt1.egg-info/top_level.txt RENAMED
File without changes
{backend β†’ matrix}/code/utils/__init__.py RENAMED
File without changes
{backend β†’ matrix}/code/utils/logging_utils.py RENAMED
File without changes
{backend β†’ matrix}/ensemble.py RENAMED
File without changes
{backend β†’ matrix}/fix_dataset.py RENAMED
File without changes
main.py β†’ matrix/main.py RENAMED
@@ -7,7 +7,9 @@ from pathlib import Path
7
  from dotenv import load_dotenv
8
 
9
  # Load .env before anything else so HF_TOKEN is available to benchmark.py
 
10
  load_dotenv(Path(__file__).parent / ".env")
 
11
 
12
  import pandas as pd
13
  from fastapi import FastAPI, File, UploadFile, Form, HTTPException
 
7
  from dotenv import load_dotenv
8
 
9
  # Load .env before anything else so HF_TOKEN is available to benchmark.py
10
+ # Load .env from current or parent directory
11
  load_dotenv(Path(__file__).parent / ".env")
12
+ load_dotenv(Path(__file__).parent.parent / ".env")
13
 
14
  import pandas as pd
15
  from fastapi import FastAPI, File, UploadFile, Form, HTTPException
{backend β†’ matrix}/scripts/demo_benchmark.py RENAMED
File without changes
{backend β†’ matrix}/scripts/download_datasets.py RENAMED
File without changes
{backend β†’ matrix}/scripts/reproduce_all.sh RENAMED
File without changes
{backend β†’ matrix}/scripts/test_sap_rpt1.py RENAMED
File without changes
{backend β†’ matrix}/setup.py RENAMED
File without changes
{backend β†’ matrix}/static/app.js RENAMED
File without changes
{backend β†’ matrix}/static/arena.html RENAMED
File without changes
{backend β†’ matrix}/static/landing.html RENAMED
File without changes
{backend β†’ matrix}/static/style.css RENAMED
File without changes