Skip to content

Commit

Permalink
Merge pull request #154 from IBM/jrute/update-tf-2-12
Browse files Browse the repository at this point in the history
Upgrade to TF 2.12 and support python 3.11
  • Loading branch information
jasonrute authored Nov 7, 2023
2 parents 09f4303 + e43d51e commit 4794f2d
Show file tree
Hide file tree
Showing 15 changed files with 35,007 additions and 34,994 deletions.
2 changes: 1 addition & 1 deletion graph2tac/tfgnn/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def main_with_return_value():
parser.error(f'--run-config {args.run_config} must be a YAML file')
with args.run_config.open() as yaml_file:
run_config = yaml.load(yaml_file, Loader=yaml.SafeLoader)
tf.random.set_seed(run_config['tf_seed'])
tf.keras.utils.set_random_seed(run_config['tf_seed'])

# dataset creation
if args.data_dir is not None and not args.data_dir.is_dir():
Expand Down
14 changes: 13 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
[pytest]
# filter annoying DeprecationWarning warning not related to our code
# filter annoying warnings not related to our code
filterwarnings =
# this deprecation warning is inside flatbuffers so ok
ignore::DeprecationWarning:flatbuffers
# this deprecation warning is inside tensorflow so ok
ignore:`np.bool8`:DeprecationWarning:tensorflow
ignore:`np.bool8`:DeprecationWarning:tensorboard
# this deprecation warning is inside tensorflow so ok
ignore:module 'sre_constants' is deprecated:DeprecationWarning:tensorflow
# this deprication warning is related to tf.keras.layers.Embedding and not our code
ignore:non-integer arguments to randrange:DeprecationWarning:random
# this deprecation warning is inside tensorflow_gnn so ok
ignore:Call to deprecated create function [A-Za-z]*Descriptor:DeprecationWarning:tensorflow_gnn

# this deprecation warning is in pytactician. It is due to having too new a version of setuptools.
# The pytactician author knows how to fix it if it ever becomes an error.
ignore:pkg_resources is deprecated as an API:DeprecationWarning:pytact
ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning

# This warning seems to be triggered by deleting eager functions.
# It is hard to track down, but it is likely related to
# the hacks we do with the tensorflow context in the tests
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
version='0.1.0',
description='graph2tac converts graphs to actions',
author=' Mirek Olsak, Vasily Pestun, Jason Rute, Fidel I. Schaposnik Massolo',
python_requires='>=3.8',
python_requires='>=3.9,<3.12', # the python version is determined by the tensorflow version
include_package_data=True,
entry_points={'console_scripts':
[
Expand All @@ -21,8 +21,9 @@
license='MIT',
install_requires=[
'keras>=2.8',
'tensorflow>=2.9.0,<2.10', # TODO(jrute): Try to upgrade to >=2.10
'tensorflow>=2.12.0,<2.13',
'tensorflow_gnn>=0.2.0,<0.3', # TODO(jrute): Try to upgrade to >=0.3
'protobuf<4.0',
'tqdm',
'numpy',
'pycapnp',
Expand Down
32 changes: 16 additions & 16 deletions tests/data/duplicate_identities/params/normal/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ arguments_seq_accuracy:
- 1.0
- 1.0
definition_embedding_loss:
- 1.9717113971710205
- 1.8164892196655273
- 1.9104526042938232
- 1.6432937383651733
global_arguments_logits_accuracy:
- 0.0
- 0.0
Expand All @@ -17,23 +17,23 @@ local_arguments_logits_loss:
- 0.0
- 0.0
loss:
- 986.5518188476562
- 908.939208984375
- 955.9256591796875
- 822.3450317382812
strict_accuracy:
- 0.5
- 0.5
- 0.375
- 0.375
tactic_logits_accuracy:
- 0.5
- 0.5
- 0.375
- 0.375
tactic_logits_loss:
- 0.6929093599319458
- 0.6914161443710327
- 0.6961860656738281
- 0.695002019405365
val_arguments_seq_accuracy:
- 1.0
- 1.0
val_definition_embedding_loss:
- 2.00787615776062
- 1.9343894720077515
- 1.8634824752807617
- 2.0301172733306885
val_global_arguments_logits_accuracy:
- 0.0
- 0.0
Expand All @@ -47,14 +47,14 @@ val_local_arguments_logits_loss:
- 0.0
- 0.0
val_loss:
- 1004.6301879882812
- 967.8862915039062
- 932.4425659179688
- 1015.7590942382812
val_strict_accuracy:
- 0.5
- 0.5
val_tactic_logits_accuracy:
- 0.5
- 0.5
val_tactic_logits_loss:
- 0.6889426112174988
- 0.688327968120575
- 0.6981880068778992
- 0.6973153948783875
Loading

0 comments on commit 4794f2d

Please sign in to comment.