alchemist-nrel 0.2.1__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 (54) hide show
  1. alchemist_core/__init__.py +63 -0
  2. alchemist_core/acquisition/__init__.py +1 -0
  3. alchemist_core/acquisition/base_acquisition.py +17 -0
  4. alchemist_core/acquisition/botorch_acquisition.py +668 -0
  5. alchemist_core/acquisition/skopt_acquisition.py +330 -0
  6. alchemist_core/config.py +113 -0
  7. alchemist_core/data/__init__.py +10 -0
  8. alchemist_core/data/experiment_manager.py +155 -0
  9. alchemist_core/data/search_space.py +169 -0
  10. alchemist_core/events.py +211 -0
  11. alchemist_core/models/__init__.py +0 -0
  12. alchemist_core/models/ax_model.py +159 -0
  13. alchemist_core/models/base_model.py +81 -0
  14. alchemist_core/models/botorch_model.py +922 -0
  15. alchemist_core/models/sklearn_model.py +717 -0
  16. alchemist_core/session.py +603 -0
  17. alchemist_core/utils/__init__.py +7 -0
  18. alchemist_nrel-0.2.1.dist-info/METADATA +206 -0
  19. alchemist_nrel-0.2.1.dist-info/RECORD +54 -0
  20. alchemist_nrel-0.2.1.dist-info/WHEEL +5 -0
  21. alchemist_nrel-0.2.1.dist-info/entry_points.txt +2 -0
  22. alchemist_nrel-0.2.1.dist-info/licenses/LICENSE +13 -0
  23. alchemist_nrel-0.2.1.dist-info/top_level.txt +4 -0
  24. api/__init__.py +3 -0
  25. api/dependencies.py +43 -0
  26. api/example_client.py +192 -0
  27. api/main.py +117 -0
  28. api/middleware/__init__.py +17 -0
  29. api/middleware/error_handlers.py +127 -0
  30. api/models/__init__.py +52 -0
  31. api/models/requests.py +202 -0
  32. api/models/responses.py +292 -0
  33. api/routers/__init__.py +5 -0
  34. api/routers/acquisition.py +164 -0
  35. api/routers/experiments.py +154 -0
  36. api/routers/models.py +116 -0
  37. api/routers/sessions.py +146 -0
  38. api/routers/variables.py +317 -0
  39. api/routers/visualizations.py +557 -0
  40. api/services/__init__.py +5 -0
  41. api/services/session_store.py +291 -0
  42. main.py +8 -0
  43. ui/__init__.py +34 -0
  44. ui/acquisition_panel.py +878 -0
  45. ui/custom_widgets.py +105 -0
  46. ui/experiment_logger.py +205 -0
  47. ui/gpr_panel.py +613 -0
  48. ui/notifications.py +654 -0
  49. ui/pool_viz.py +240 -0
  50. ui/ui.py +1192 -0
  51. ui/ui_utils.py +25 -0
  52. ui/utils.py +33 -0
  53. ui/variables_setup.py +496 -0
  54. ui/visualizations.py +1424 -0
@@ -0,0 +1,63 @@
1
+ """
2
+ ALchemist Core - Headless Bayesian Optimization Library
3
+
4
+ This package provides the core functionality for active learning and Bayesian
5
+ optimization workflows without UI dependencies.
6
+
7
+ Main Components:
8
+ - OptimizationSession: High-level API for optimization workflows
9
+ - SearchSpace: Define variable search spaces
10
+ - ExperimentManager: Manage experimental data
11
+ - Models: Surrogate modeling backends (sklearn, BoTorch)
12
+ - Acquisition: Acquisition function strategies
13
+
14
+ Example:
15
+ >>> from alchemist_core import OptimizationSession, SearchSpace, ExperimentManager
16
+ >>>
17
+ >>> # Create session
18
+ >>> session = OptimizationSession(
19
+ ... search_space=SearchSpace.from_json("variables.json"),
20
+ ... experiment_manager=ExperimentManager.from_csv("experiments.csv")
21
+ ... )
22
+ >>>
23
+ >>> # Train model
24
+ >>> session.fit_model(backend="sklearn")
25
+ >>>
26
+ >>> # Get next experiment suggestion
27
+ >>> next_point = session.suggest_next(acq_func="ei")
28
+
29
+ Version: 0.2.0-dev (Core-UI Split)
30
+ """
31
+
32
+ __version__ = "0.2.0-dev"
33
+ __author__ = "Caleb Coatney"
34
+ __email__ = "caleb.coatney@nrel.gov"
35
+
36
+ # Core data structures
37
+ from alchemist_core.data.search_space import SearchSpace
38
+ from alchemist_core.data.experiment_manager import ExperimentManager
39
+
40
+ # Event system
41
+ from alchemist_core.events import EventEmitter
42
+
43
+ # Configuration and logging
44
+ from alchemist_core.config import configure_logging, get_logger, set_verbosity
45
+
46
+ # High-level session API
47
+ from alchemist_core.session import OptimizationSession
48
+
49
+ # Public API
50
+ __all__ = [
51
+ # High-level API (recommended entry point)
52
+ "OptimizationSession",
53
+
54
+ # Data structures
55
+ "SearchSpace",
56
+ "ExperimentManager",
57
+
58
+ # Events and logging
59
+ "EventEmitter",
60
+ "configure_logging",
61
+ "get_logger",
62
+ "set_verbosity",
63
+ ]
@@ -0,0 +1 @@
1
+ # Acquisition functions package
@@ -0,0 +1,17 @@
1
+ from abc import ABC, abstractmethod
2
+
3
+ class BaseAcquisition(ABC):
4
+ def __init__(self, search_space, model=None, random_state=42):
5
+ self.search_space = search_space
6
+ self.model = model
7
+ self.random_state = random_state
8
+
9
+ @abstractmethod
10
+ def update(self, X, y):
11
+ """Update with training data"""
12
+ pass
13
+
14
+ @abstractmethod
15
+ def select_next(self, candidate_points=None):
16
+ """Select the next point to evaluate"""
17
+ pass