Skip to content

Commit

Permalink
Merge pull request #237 from thanawan-atc/experiment-build-docs
Browse files Browse the repository at this point in the history
Experiment build docs
  • Loading branch information
thanawan-atc authored Aug 31, 2023
2 parents 52abf99 + 97833a5 commit 560bf9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .ci/run-repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
nox -s "docs-${PYTHON_VERSION}(pandas_version='${PANDAS_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 -- ${MODEL_ID} ${MODEL_VERSION} ${TRACING_FORMAT} -ed ${EMBEDDING_DIMENSION} -pm ${POOLING_MODE} -md ${MODEL_DESCRIPTION:+"$MODEL_DESCRIPTION"}
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"}

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
12 changes: 8 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,13 @@ def test(session, pandas_version: str):
)


@nox.session(reuse_venv=True)
def docs(session):
@nox.session(python=["3.8", "3.9", "3.10"])
@nox.parametrize("pandas_version", ["1.5.0"])
def docs(session, pandas_version: str):
# 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 @@ -153,15 +155,17 @@ def docs(session):
# While nox is typically used for automating testing, in this case, we utilize it
# to automate the action workflow, leveraging its ability to set up the environment
# required for model autotracing.
@nox.session
def trace(session):
@nox.session(python=["3.8", "3.9", "3.10"])
@nox.parametrize("pandas_version", ["1.5.0"])
def trace(session, pandas_version: str):
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 560bf9d

Please sign in to comment.