Exemplo n.º 1
0
    def pca_is_ready(self, pca, **kwargs):
        """Checks whether a pca's status is FINISHED.

        """
        check_resource_type(pca, PCA_PATH, message="A PCA id is needed.")
        resource = self.get_pca(pca, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 2
0
    def model_is_ready(self, model, **kwargs):
        """Checks whether a model's status is FINISHED.

        """
        check_resource_type(model, MODEL_PATH, message="A model id is needed.")
        resource = self.get_model(model, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 3
0
    def ensemble_is_ready(self, ensemble):
        """Checks whether a ensemble's status is FINISHED.

        """
        check_resource_type(ensemble, ENSEMBLE_PATH,
                            message="An ensemble id is needed.")
        resource = self.get_ensemble(ensemble)
        return resource_is_ready(resource)
Exemplo n.º 4
0
    def deepnet_is_ready(self, deepnet, **kwargs):
        """Checks whether a deepnet's status is FINISHED.

        """
        check_resource_type(deepnet, DEEPNET_PATH,
                            message="A deepnet id is needed.")
        resource = self.get_deepnet(deepnet, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 5
0
    def logistic_regression_is_ready(self, logistic_regression, **kwargs):
        """Checks whether a logistic regressioin's status is FINISHED.

        """
        check_resource_type(logistic_regression, LOGISTIC_REGRESSION_PATH,
                            message="A logistic regression id is needed.")
        resource = self.get_logistic_regression(logistic_regression, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 6
0
    def cluster_is_ready(self, cluster, **kwargs):
        """Checks whether a cluster's status is FINISHED.

        """
        check_resource_type(cluster, CLUSTER_PATH,
                            message="A cluster id is needed.")
        resource = self.get_cluster(cluster, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 7
0
    def time_series_is_ready(self, time_series, **kwargs):
        """Checks whether a time series's status is FINISHED.

        """
        check_resource_type(time_series, TIME_SERIES_PATH,
                            message="A time series id is needed.")
        resource = self.get_time_series(time_series, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 8
0
    def optiml_is_ready(self, optiml, **kwargs):
        """Checks whether an optiml's status is FINISHED.

        """
        check_resource_type(optiml, OPTIML_PATH,
                            message="An optiml id is needed.")
        resource = self.get_optiml(optiml, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 9
0
    def fusion_is_ready(self, fusion, **kwargs):
        """Checks whether a fusion's status is FINISHED.

        """
        check_resource_type(fusion, FUSION_PATH,
                            message="A fusion id is needed.")
        resource = self.get_fusion(fusion, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 10
0
    def anomaly_is_ready(self, anomaly, **kwargs):
        """Checks whether an anomaly detector's status is FINISHED.

        """
        check_resource_type(anomaly,
                            ANOMALY_PATH,
                            message="An anomaly id is needed.")
        resource = self.get_anomaly(anomaly, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 11
0
    def dataset_is_ready(self, dataset):
        """Check whether a dataset' status is FINISHED.

        """
        check_resource_type(dataset,
                            DATASET_PATH,
                            message="A dataset id is needed.")
        resource = self.get_dataset(dataset)
        return resource_is_ready(resource)
Exemplo n.º 12
0
    def topic_model_is_ready(self, topic_model, **kwargs):
        """Checks whether a topic model's status is FINISHED.

        """
        check_resource_type(topic_model,
                            TOPIC_MODEL_PATH,
                            message="A topic model id is needed.")
        resource = self.get_topic_model(topic_model, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 13
0
    def source_is_ready(self, source):
        """Checks whether a source' status is FINISHED.

        """
        check_resource_type(source,
                            SOURCE_PATH,
                            message="A source id is needed.")
        source = self.get_source(source)
        return resource_is_ready(source)
Exemplo n.º 14
0
    def linear_regression_is_ready(self, linear_regression, **kwargs):
        """Checks whether a linear regressioin's status is FINISHED.

        """
        check_resource_type(linear_regression,
                            LINEAR_REGRESSION_PATH,
                            message="A linear regression id is needed.")
        resource = self.get_linear_regression(linear_regression, **kwargs)
        return resource_is_ready(resource)
Exemplo n.º 15
0
def check_local_but_fields(model):
    """Whether the information in `model` is enough to use it locally
       except for the fields section

    """
    try:

        return resource_is_ready(model) and \
            check_model_structure(model)
    except Exception:
        return False