Using version strings

This commit is contained in:
Jake Poznanski 2024-11-13 12:35:40 -08:00
parent 9610eac4f0
commit 6c9c785130
3 changed files with 8 additions and 5 deletions

View File

@ -31,6 +31,7 @@ from pdelfin.prompts import build_finetuning_prompt, PageResponse
from pdelfin.prompts.anchor import get_anchor_text
from pdelfin.check import check_poppler_version
from pdelfin.metrics import MetricsKeeper, WorkerTracker
from pdelfin.version import VERSION
# Initialize logger
logger = logging.getLogger(__name__)
@ -537,7 +538,7 @@ def submit_beaker_job(args):
b = Beaker.from_env(default_workspace=args.beaker_workspace)
account = b.account.whoami()
owner = account.name
beaker_image = "jakep/pdelfin-inference"
beaker_image = f"jakep/pdelfin-inference-{VERSION}"
task_name = f"pdelfin-{os.path.basename(args.workspace.rstrip('/'))}"
priority = "normal"
@ -622,7 +623,7 @@ async def main():
if "AWS_CREDENTIALS_FILE" in os.environ:
cred_path = os.path.join(os.path.expanduser('~'), '.aws', 'credentials')
os.path.makedirs(os.path.dirname(cred_path), exist_ok=True)
os.makedirs(os.path.dirname(cred_path), exist_ok=True)
with open(cred_path, "w") as f:
f.write(os.environ.get("AWS_CREDENTIALS_FILE"))

View File

@ -2,7 +2,7 @@ _MAJOR = "0"
_MINOR = "1"
# On main and in a nightly release the patch should be one ahead of the last
# released build.
_PATCH = "0"
_PATCH = "1"
# This is mainly for nightly builds which have the suffix ".dev$DATE". See
# https://semver.org/#is-v123-a-semantic-version for the semantics.
_SUFFIX = ""

View File

@ -2,6 +2,8 @@
set -e
docker build --platform linux/amd64 -f ./scripts/beaker/Dockerfile-inference -t pdelfin-inference .
VERSION=$(python -c 'import pdelfin.version; print(pdelfin.version.VERSION)')
echo "$VERSION"
beaker image create --workspace ai2/oe-data-pdf --name pdelfin-inference pdelfin-inference
docker build --platform linux/amd64 -f ./scripts/beaker/Dockerfile-inference -t pdelfin-inference-$VERSION .
beaker image create --workspace ai2/oe-data-pdf --name pdelfin-inference-$VERSION pdelfin-inference-$VERSION