Skip to content

Commit

Permalink
Move Orion Search space to Sample-Space (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Delaunay authored Mar 3, 2022
1 parent 80b81de commit 419ed4d
Show file tree
Hide file tree
Showing 21 changed files with 5,230 additions and 22 deletions.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

space
conditional
orion/index


.. toctree::
Expand Down
5 changes: 5 additions & 0 deletions docs/orion/builder.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Space Builder
=============

.. automodule:: sspace.orion.builder
:members:
10 changes: 10 additions & 0 deletions docs/orion/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Orion
=====

.. toctree::
:maxdepth: 1
:caption: Modules

builder
space
transformer
6 changes: 6 additions & 0 deletions docs/orion/space.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Space search
============

.. automodule:: sspace.orion.space
:members:

5 changes: 5 additions & 0 deletions docs/orion/transformer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Dimension transformations
=========================

.. automodule:: sspace.orion.transformer
:members:
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ConfigSpace
orion
scipy
numpy
17 changes: 4 additions & 13 deletions sspace/backends/ospace.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
import_error = None
import functools

try:
import functools
from sspace.orion.builder import SpaceBuilder, DimensionBuilder
import sspace.orion.space as OrionSpace

from orion.core.io.space_builder import SpaceBuilder, DimensionBuilder
import orion.algo.space as OrionSpace

from sspace.utils import sort_dict

except ImportError as e:
import_error = e
from sspace.utils import sort_dict


class _OrionSpaceBuilder:
def __init__(self):
if import_error:
raise import_error

self.builder = DimensionBuilder()
self.dim_leaves = {
'uniform': self.uniform,
Expand Down
5 changes: 2 additions & 3 deletions sspace/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
import ConfigSpace as cs
import ConfigSpace.hyperparameters as csh

from orion.core.io.space_builder import SpaceBuilder, DimensionBuilder
import orion.algo.space as OrionSpace
from sspace.orion.builder import SpaceBuilder, DimensionBuilder
import sspace.orion.space as OrionSpace
import functools

from sspace.utils import sort_dict


except ImportError as e:
import_error = e

Expand Down
Empty file added sspace/orion/__init__.py
Empty file.
Loading

0 comments on commit 419ed4d

Please sign in to comment.