Skip to content

Commit

Permalink
Doc update main (#142)
Browse files Browse the repository at this point in the history
* chore: bump dev version

* fix(ci): update main documentation

* fix(style): correct with ruff
  • Loading branch information
tengomucho authored Jan 8, 2025
1 parent 9c791e0 commit c0dee09
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
cd optimum
version=`echo "$(grep '^__version__ =' tpu/version.py | cut -d '=' -f 2- | xargs)"`
if [[ $version == *a* ]]
if [[ $version == *.dev0 ]]
then
echo "VERSION=main" >> $GITHUB_ENV
else
Expand Down
2 changes: 1 addition & 1 deletion optimum/tpu/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
from packaging.version import parse


__version__ = "0.2.3"
__version__ = "0.2.3.dev0"
VERSION = parse(__version__)
2 changes: 1 addition & 1 deletion text-generation-inference/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ RUN apt-get update -y \
RUN pip3 --no-cache-dir install --upgrade pip

ARG ENABLE_GOOGLE_FEATURE
ARG VERSION='0.2.3'
ARG VERSION='0.2.3.dev0'
RUN test -n ${VERSION:?}

FROM base AS optimum-tpu-installer
Expand Down
10 changes: 5 additions & 5 deletions text-generation-inference/integration-tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def validate_ci_tpu_env_format(env_string: str) -> bool:
"""
Validate that CI TPU environment string follows '--env Argument' pattern.
Returns True if valid, False otherwise.
"""
"""
parts = env_string.split()
return len(parts) % 2 == 0 and all(
parts[i] == "--env" and not parts[i + 1].startswith("--env")
Expand All @@ -49,15 +49,15 @@ def process_ci_tpu_env_vars(env_string: str) -> dict:
env_vars = {}
# Extract variables from string
tpu_vars = [x.strip() for x in env_string.split('--env') if x.strip()]

# Process each variable
for var in tpu_vars:
env_value = os.environ.get(var, "")
env_vars[var] = env_value
# Log if environment variable is not set
if not env_value:
logger.warning(f"TPU environment variable {var} is not set")

return env_vars


Expand Down Expand Up @@ -212,12 +212,12 @@ def docker_launcher(

# Add TPU environment variables when running in CI
if TPU_ENV:
logger.info(f"TPU_ENV is set, adding specific TPU environment variables for the CI")
logger.info("TPU_ENV is set, adding specific TPU environment variables for the CI")
logger.debug(f"TPU_ENV: {TPU_ENV}")
# Validate TPU environment format
if not validate_ci_tpu_env_format(TPU_ENV):
raise ValueError("Invalid TPU environment format", TPU_ENV)

# Process TPU environment variables
tpu_env_vars = process_ci_tpu_env_vars(TPU_ENV)
env.update(tpu_env_vars)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pkg_resources import parse_version


__version__ = "0.2.3"
__version__ = "0.2.3.dev0"
VERSION = parse_version(__version__)

0 comments on commit c0dee09

Please sign in to comment.