Skip to content

Commit

Permalink
opensearch-project#339 : Remove separate pandas installations in nox …
Browse files Browse the repository at this point in the history
…tests (opensearch-project#368)

* remove pins

Signed-off-by: kalyanr <[email protected]>

* fix

Signed-off-by: kalyanr <[email protected]>

* add changelog

Signed-off-by: kalyanr <[email protected]>

* fix

Signed-off-by: kalyanr <[email protected]>

* revert

Signed-off-by: kalyanr <[email protected]>

* remove

Signed-off-by: kalyanr <[email protected]>

* lint fixes

Signed-off-by: kalyanr <[email protected]>

---------

Signed-off-by: kalyanr <[email protected]>
  • Loading branch information
rawwar authored Feb 12, 2024
1 parent 3cfcc23 commit e0b1bcf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .ci/run-repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [[ "$TASK_TYPE" == "test" ]]; then
--env "TEST_TYPE=server" \
--name opensearch-py-ml-test-runner \
opensearch-project/opensearch-py-ml \
nox -s "test-${PYTHON_VERSION}(pandas_version='${PANDAS_VERSION}')"
nox -s "test-${PYTHON_VERSION}"

docker cp opensearch-py-ml-test-runner:/code/opensearch-py-ml/junit/ ./junit/
docker rm opensearch-py-ml-test-runner
Expand All @@ -61,7 +61,7 @@ elif [[ "$TASK_TYPE" == "doc" ]]; then
--env "TEST_TYPE=server" \
--name opensearch-py-ml-doc-runner \
opensearch-project/opensearch-py-ml \
nox -s "docs-${PYTHON_VERSION}(pandas_version='${PANDAS_VERSION}')"
nox -s "docs-${PYTHON_VERSION}"

docker cp opensearch-py-ml-doc-runner:/code/opensearch-py-ml/docs/build/ ./docs/
docker rm opensearch-py-ml-doc-runner
Expand All @@ -84,7 +84,7 @@ elif [[ "$TASK_TYPE" == "trace" ]]; then
--env "TEST_TYPE=server" \
--name opensearch-py-ml-trace-runner \
opensearch-project/opensearch-py-ml \
nox -s "trace-${PYTHON_VERSION}(pandas_version='${PANDAS_VERSION}')" -- ${MODEL_ID} ${MODEL_VERSION} ${TRACING_FORMAT} -ed ${EMBEDDING_DIMENSION} -pm ${POOLING_MODE} -md ${MODEL_DESCRIPTION:+"$MODEL_DESCRIPTION"}
nox -s "trace-${PYTHON_VERSION}" -- ${MODEL_ID} ${MODEL_VERSION} ${TRACING_FORMAT} -ed ${EMBEDDING_DIMENSION} -pm ${POOLING_MODE} -md ${MODEL_DESCRIPTION:+"$MODEL_DESCRIPTION"}

docker cp opensearch-py-ml-trace-runner:/code/opensearch-py-ml/upload/ ./upload/
docker cp opensearch-py-ml-trace-runner:/code/opensearch-py-ml/trace_output/ ./trace_output/
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Enable the model upload workflow to add model_content_size_in_bytes & model_content_hash_value to model config automatically @thanawan-atc ([#291](https://github.com/opensearch-project/opensearch-py-ml/pull/291))
- Update pretrained_models_all_versions.json (2023-10-18 18:11:34) by @dhrubo-os ([#322](https://github.com/opensearch-project/opensearch-py-ml/pull/322))
- Update model upload history - sentence-transformers/paraphrase-mpnet-base-v2 (v.1.0.0)(BOTH) by @dhrubo-os ([#321](https://github.com/opensearch-project/opensearch-py-ml/pull/321))
- Replaced usage of `is_datetime_or_timedelta_dtype` with `is_timedelta64_dtype` and `is_datetime64_any_dtype`([#316](https://github.com/opensearch-project/opensearch-py-ml/pull/316))
- Replaced usage of `is_datetime_or_timedelta_dtype` with `is_timedelta64_dtype` and `is_datetime64_any_dtype` by @rawwar ([#316](https://github.com/opensearch-project/opensearch-py-ml/pull/316))
- use try-except-else block for handling unexpected exceptions during integration tests by @rawwar([#370](https://github.com/opensearch-project/opensearch-py-ml/pull/370))
- Removed pandas version pin in nox tests by @rawwar ([#368](https://github.com/opensearch-project/opensearch-py-ml/pull/368))

### Fixed
- Enable make_model_config_json to add model description to model config file by @thanawan-atc in ([#203](https://github.com/opensearch-project/opensearch-py-ml/pull/203))
Expand Down
12 changes: 3 additions & 9 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,14 @@ def lint(session):


@nox.session(python=["3.8", "3.9", "3.10"])
@nox.parametrize("pandas_version", ["1.5.0"])
def test(session, pandas_version: str):
def test(session):
session.install(
"-r",
"requirements-dev.txt",
"--timeout",
"1500",
)
session.install(".")
session.run("python", "-m", "pip", "install", f"pandas~={pandas_version}")
session.run("python", "-m", "setup_tests")

junit_xml = join(abspath(dirname(__file__)), "junit", "opensearch-py-ml-junit.xml")
Expand Down Expand Up @@ -140,12 +138,10 @@ def test(session, pandas_version: str):


@nox.session(python=["3.9"])
@nox.parametrize("pandas_version", ["1.5.0"])
def docs(session, pandas_version: str):
def docs(session):
# Run this so users get an error if they don't have Pandoc installed.
session.install("-r", "docs/requirements-docs.txt")
session.install(".")
session.run("python", "-m", "pip", "install", f"pandas~={pandas_version}")

session.cd("docs")
session.run("make", "clean", external=True)
Expand All @@ -156,16 +152,14 @@ def docs(session, pandas_version: str):
# to automate the action workflow, leveraging its ability to set up the environment
# required for model autotracing.
@nox.session(python=["3.9"])
@nox.parametrize("pandas_version", ["1.5.0"])
def trace(session, pandas_version: str):
def trace(session):
session.install(
"-r",
"requirements-dev.txt",
"--timeout",
"1500",
)
session.install(".")
session.run("python", "-m", "pip", "install", f"pandas~={pandas_version}")

session.run(
"python",
Expand Down

0 comments on commit e0b1bcf

Please sign in to comment.