Skip to content

Commit

Permalink
Merge hsml docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aversey committed Jul 14, 2024
1 parent 5673e5b commit f9a194b
Show file tree
Hide file tree
Showing 31 changed files with 176 additions and 2,057 deletions.
160 changes: 160 additions & 0 deletions auto_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@

import keras_autodoc

JSON_METHODS = [
"extract_fields_from_json",
"from_json",
"from_response_json",
"json",
"update_from_response_json",
]

PAGES = {
"api/login.md": {
"login": ["hopsworks.login"],
Expand Down Expand Up @@ -520,6 +528,158 @@
"api/similarity_function_type_api.md": {
"similarity_function_type": ["hsfs.embedding.SimilarityFunctionType"],
},
# Model registry
"connection_api.md": {
"connection": ["hsml.connection.Connection"],
"connection_properties": keras_autodoc.get_properties(
"hsml.connection.Connection", exclude=["trust_store_path"]
),
"connection_methods": keras_autodoc.get_methods("hsml.connection.Connection"),
},
"model-registry/model_registry_api.md": {
"mr_get": ["hsml.connection.Connection.get_model_registry"],
"mr_modules": keras_autodoc.get_properties(
"hsml.model_registry.ModelRegistry",
exclude=[
"project_id",
"project_name",
"model_registry_id",
"shared_registry_project_name",
],
),
"mr_properties": keras_autodoc.get_properties(
"hsml.model_registry.ModelRegistry",
exclude=[
"python",
"sklearn",
"tensorflow",
"torch",
],
),
"mr_methods": keras_autodoc.get_methods(
"hsml.model_registry.ModelRegistry", exclude=["from_response_json"]
),
},
"model-registry/model_api.md": {
"ml_create_tf": ["hsml.model_registry.ModelRegistry.tensorflow.create_model"],
"ml_create_th": ["hsml.model_registry.ModelRegistry.torch.create_model"],
"ml_create_sl": ["hsml.model_registry.ModelRegistry.sklearn.create_model"],
"ml_create_py": ["hsml.model_registry.ModelRegistry.python.create_model"],
"ml_get": ["hsml.model_registry.ModelRegistry.get_model"],
"ml_properties": keras_autodoc.get_properties("hsml.model.Model"),
"ml_methods": keras_autodoc.get_methods(
"hsml.model.Model",
exclude=[
"from_response_json",
"json",
"to_dict",
"update_from_response_json",
],
),
},
"model-registry/model_schema.md": {},
"model-registry/model_schema_api.md": {
"schema": ["hsml.schema.Schema"],
"schema_dict": ["hsml.schema.Schema.to_dict"],
"model_schema": ["hsml.model_schema.ModelSchema"],
"model_schema_dict": ["hsml.model_schema.ModelSchema.to_dict"],
},
"model-registry/links.md": {
"links_properties": keras_autodoc.get_properties(
"hsml.core.explicit_provenance.Links"
),
"artifact_properties": keras_autodoc.get_properties(
"hsml.core.explicit_provenance.Artifact"
),
},
# Model Serving
"model-serving/model_serving_api.md": {
"ms_get": ["hsml.connection.Connection.get_model_serving"],
"ms_properties": keras_autodoc.get_properties(
"hsml.model_serving.ModelServing"
),
"ms_methods": keras_autodoc.get_methods(
"hsml.model_serving.ModelServing", exclude=["from_response_json"]
),
},
"model-serving/deployment_api.md": {
"ms_get_model_serving": ["hsml.connection.Connection.get_model_serving"],
"ms_get_deployments": [
"hsml.model_serving.ModelServing.get_deployment",
"hsml.model_serving.ModelServing.get_deployment_by_id",
"hsml.model_serving.ModelServing.get_deployments",
],
"ms_create_deployment": ["hsml.model_serving.ModelServing.create_deployment"],
"m_deploy": ["hsml.model.Model.deploy"],
"p_deploy": ["hsml.predictor.Predictor.deploy"],
"dep_properties": keras_autodoc.get_properties("hsml.deployment.Deployment"),
"dep_methods": keras_autodoc.get_methods(
"hsml.deployment.Deployment", exclude=JSON_METHODS + ["from_predictor"]
),
},
"model-serving/predictor_api.md": {
"ms_get_model_serving": ["hsml.connection.Connection.get_model_serving"],
"ms_create_predictor": ["hsml.model_serving.ModelServing.create_predictor"],
"pred_properties": keras_autodoc.get_properties("hsml.predictor.Predictor"),
"pred_methods": keras_autodoc.get_methods(
"hsml.predictor.Predictor",
exclude=JSON_METHODS + ["for_model"],
),
},
"model-serving/transformer_api.md": {
"ms_get_model_serving": ["hsml.connection.Connection.get_model_serving"],
"ms_create_transformer": ["hsml.model_serving.ModelServing.create_transformer"],
"trans_properties": keras_autodoc.get_properties(
"hsml.transformer.Transformer"
),
"trans_methods": keras_autodoc.get_methods(
"hsml.transformer.Transformer", exclude=JSON_METHODS
),
},
"model-serving/inference_logger_api.md": {
"il": ["hsml.inference_logger.InferenceLogger"],
"il_properties": keras_autodoc.get_properties(
"hsml.inference_logger.InferenceLogger"
),
"il_methods": keras_autodoc.get_methods(
"hsml.inference_logger.InferenceLogger", exclude=JSON_METHODS
),
},
"model-serving/inference_batcher_api.md": {
"ib": ["hsml.inference_batcher.InferenceBatcher"],
"ib_properties": keras_autodoc.get_properties(
"hsml.inference_batcher.InferenceBatcher"
),
"ib_methods": keras_autodoc.get_methods(
"hsml.inference_batcher.InferenceBatcher", exclude=JSON_METHODS
),
},
"model-serving/resources_api.md": {
"res": ["hsml.resources.Resources"],
"res_properties": keras_autodoc.get_properties("hsml.resources.Resources"),
"res_methods": keras_autodoc.get_methods(
"hsml.resources.Resources", exclude=JSON_METHODS
),
},
"model-serving/predictor_state_api.md": {
"ps_get": ["hsml.deployment.Deployment.get_state"],
"ps_properties": keras_autodoc.get_properties(
"hsml.predictor_state.PredictorState"
),
"ps_methods": keras_autodoc.get_methods(
"hsml.predictor_state.PredictorState", exclude=JSON_METHODS
),
},
"model-serving/predictor_state_condition_api.md": {
"psc_get": ["hsml.predictor_state.PredictorState.condition"],
"psc_properties": keras_autodoc.get_properties(
"hsml.predictor_state_condition.PredictorStateCondition"
),
"psc_methods": keras_autodoc.get_methods(
"hsml.predictor_state_condition.PredictorStateCondition",
exclude=JSON_METHODS,
),
},
}

hw_dir = pathlib.Path(__file__).resolve().parents[0]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
210 changes: 0 additions & 210 deletions hsml/auto_doc.py

This file was deleted.

Loading

0 comments on commit f9a194b

Please sign in to comment.