Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions docs/source/workflows/design_spaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -419,25 +419,3 @@ We will require that formulations contain 2 ingredients, that no more than 1 sol
)

registered_design_space = project.design_spaces.register(design_space)

Sampling from Design Spaces
---------------------------

To sample candidates from a registered design space, follow the example below:

.. code:: python

from citrine import Citrine
from citrine.jobs.waiting import wait_while_executing
from citrine.informatics.design_spaces.sample_design_space import SampleDesignSpaceInput

sample_input = SampleDesignSpaceInput(n_candidates=50)
sample_design_space_collection = design_space.sample_design_space_executions
sample_design_space_execution = sample_design_space_collection.trigger(sample_input)

execution = wait_while_executing(
collection=sample_design_space_collection, execution=sample_design_space_execution
)

sampled_candidates = [candidate.material for candidate in execution.results()]
root_materials = [candidate.root for candidate in sampled_candidates]
60 changes: 0 additions & 60 deletions docs/source/workflows/generative_design.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/workflows/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ AI Engine
data_sources
predictor_reports
predictor_evaluations
generative_design
code_examples
2 changes: 1 addition & 1 deletion src/citrine/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.2.0"
__version__ = "5.3.0"
7 changes: 7 additions & 0 deletions src/citrine/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ class WorkflowNotReadyException(RetryableException):
"""The workflow is not ready to be executed. I.e., still validating. (http status 425)."""


class FeatureRemovedError(NonRetryableException, AttributeError):
"""The feature has been removed from the Citrine Platform.

It is also an AttributeError, so hasattr() and introspection skip the removed accessors.
"""


class PollingTimeoutError(NonRetryableException):
"""Polling for an asynchronous result has exceeded the timeout."""

Expand Down
15 changes: 0 additions & 15 deletions src/citrine/informatics/design_candidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"MeanAndStd",
"Mixture",
"MolecularStructure",
"SampleSearchSpaceResultCandidate",
"TopCategories",
]

Expand Down Expand Up @@ -204,17 +203,3 @@ class HierarchicalDesignCandidate(Serializable["HierarchicalDesignCandidate"]):
""":int: rank by score amongst other candidates produced by the design workflow"""
material = properties.Object(HierarchicalDesignMaterial, "material")
""":HierarchicalDesignMaterial: the material returned by the design workflow"""


class SampleSearchSpaceResultCandidate(Serializable["SampleSearchSpaceResultCandidate"]):
"""A hierarchical candidate material generated by the Citrine Platform.

This class represents the candidate computed by a design execution.
"""

uid = properties.UUID("id")
""":UUID: unique external Citrine ID of the material"""
execution_uid = properties.UUID("id")
""":UUID: unique external Citrine ID of the execution"""
material = properties.Object(HierarchicalDesignMaterial, "material")
""":HierarchicalDesignMaterial: the material returned by the design workflow"""
20 changes: 7 additions & 13 deletions src/citrine/informatics/design_spaces/sample_design_space.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
from citrine._serialization import properties
from citrine._serialization.serializable import Serializable
"""Design space sampling has been removed; this name remains so existing scripts fail clearly."""

from citrine.exceptions import FeatureRemovedError

class SampleDesignSpaceInput(Serializable["SampleDesignSpaceInput"]):
"""A Citrine Sample Design Space Execution Input.
SAMPLING_REMOVED = "Design space sampling has been removed from the Citrine Platform."

Parameters
----------
n_candidates: int
The number of non-correlated samples to draw from the design space domain.

"""
class SampleDesignSpaceInput:
"""Removed. Constructing one raises :class:`~citrine.exceptions.FeatureRemovedError`."""

n_candidates = properties.Integer("n_candidates")

def __init__(self, *, n_candidates: int):
self.n_candidates: int = n_candidates
def __init__(self, *args, **kwargs):
raise FeatureRemovedError(SAMPLING_REMOVED)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from citrine._serialization.polymorphic_serializable import PolymorphicSerializable
from citrine._serialization.serializable import Serializable
from citrine._session import Session
from citrine.resources.sample_design_space_execution import SampleDesignSpaceExecutionCollection
from citrine.exceptions import FeatureRemovedError
from citrine.informatics.design_spaces.sample_design_space import SAMPLING_REMOVED

__all__ = ["TopLevelDesignSpace"]

Expand Down Expand Up @@ -72,7 +73,5 @@ def is_locked(self) -> bool:

@property
def sample_design_space_executions(self):
"""Start a Sample Design Space Execution using the current Design Space."""
return SampleDesignSpaceExecutionCollection(
project_id=self._project_id, design_space_id=self.uid, session=self._session
)
"""Removed. Accessing it raises :class:`~citrine.exceptions.FeatureRemovedError`."""
raise FeatureRemovedError(SAMPLING_REMOVED)
1 change: 0 additions & 1 deletion src/citrine/informatics/executions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# flake8: noqa
from .predictor_evaluation import *
from .design_execution import *
from .generative_design_execution import *

This file was deleted.

This file was deleted.

Loading
Loading