Skip to content

Commit

Permalink
revert testcases
Browse files Browse the repository at this point in the history
Signed-off-by: kalyan <[email protected]>
  • Loading branch information
rawwar committed Oct 31, 2023
1 parent eab5a29 commit 4e159c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
4 changes: 2 additions & 2 deletions opensearch_py_ml/ml_commons/model_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ModelTrain:
Class for training models using ML Commons train API.
"""

API_ENDPOINT = "models/_train"
API_ENDPOINT = "_train"

def __init__(self, os_client: OpenSearch):
self._client = os_client
Expand All @@ -38,7 +38,7 @@ def _train(

return self._client.transport.perform_request(
method="POST",
url=f"{ML_BASE_URI}/_train/{algorithm_name}",
url=f"{ML_BASE_URI}/{API_ENDPOINT}/{algorithm_name}",
body=input_json,
params=params,
)
20 changes: 0 additions & 20 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
# under the License.

import inspect
import os

import pandas as pd
import pytest
from opensearchpy import OpenSearch

import opensearch_py_ml as oml

Expand All @@ -45,8 +43,6 @@
assert_series_equal,
)

pytest_plugins = ["tests.fixtures.index_fixtures"]


class SymmetricAPIChecker:
def __init__(self, oml_obj, pd_obj):
Expand Down Expand Up @@ -166,19 +162,3 @@ def df():
@pytest.fixture(scope="session")
def testdata():
return TestData()


@pytest.fixture
def opensearch_client():
opensearch_host = os.environ.get("OPENSEARCH_HOST", "https://localhost:9200")
opensearch_admin_user = os.environ.get("OPENSEARCH_ADMIN_USER", "admin")
opensearch_admin_password = os.environ.get("OPENSEARCH_ADMIN_PASSWORD", "admin")
client = OpenSearch(
hosts=[opensearch_host],
http_auth=(opensearch_admin_user, opensearch_admin_password),
verify_certs=False,
)
yield client

# tear down
client.transport.close()

0 comments on commit 4e159c2

Please sign in to comment.