Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read TF version from poetry.lock #9785

Merged
merged 2 commits into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
limit string length
  • Loading branch information
HotThoughts committed Oct 4, 2021
commit 8948a532d8a279d78255135ae035db939acb5cae
2 changes: 2 additions & 0 deletions .github/workflows/ci-model-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ jobs:
# Read TF version from poetry.lock file
pip install toml
TF_VERSION=$(scripts/read_tenforflow_version.sh)
# Keep the first 3 characters, e.g. we keep 2.3 if TF_VERSION is 2.3.4
TF_VERSION=${TF_VERSION::3}
echo "TensorFlow version: $TF_VERSION"
echo TF_VERSION=$TF_VERSION >> $GITHUB_ENV

Expand Down
2 changes: 1 addition & 1 deletion scripts/read_tenforflow_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if __name__ == "__main__":
# Get the list of dict that contains all information about packages
package_list = toml.load(poetry_path).get('package')
# Extract tensorflow version
tf_version = next(filter(lambda x: x.get('name') == 'tensorflow', package_list))['version']
tf_version = next(filter(lambda x: x.get('name') == 'tensorflow', package_list)).get('version')
print(tf_version)
sys.exit(0)

Expand Down