https://github.com/GPflow/GPflow
Revision c8e8f00e7d488784a09fe6d8fd8dc6632b6723bf authored by ilia-kats on 30 March 2020, 11:20:14 UTC, committed by GitHub on 30 March 2020, 11:20:14 UTC
Changes setattr_by_path to delete the attribute before setting it again.

When simply replacing a Parameter with tf.Constant, tensorflow
did not update its internal list of tracked variables, which prevented
deepcopying and pickling of frozen models. Explicitly deleting the
tracked variable before assigning a constant value forces tensorflow
to update its state.

Workaround for https://github.com/tensorflow/tensorflow/issues/37806
1 parent 0b9e1f0
Raw File
Tip revision: c8e8f00e7d488784a09fe6d8fd8dc6632b6723bf authored by ilia-kats on 30 March 2020, 11:20:14 UTC
enable pickling of frozen models (#1338)
Tip revision: c8e8f00
Makefile
.PHONY: help clean dev-install install package format test

help:
	@echo "The following make targets are available:"
	@echo "	dev-install		install all dependencies for dev environment and sets a egg link to the project sources"
	@echo "	install			install all dependencies and the project in the current environment"
	@echo "	package			build pip package"
	@echo "	test			run all tests in parallel"
	@echo "	clean			removes package, build files and egg info"

clean:
	rm -rf dist *.egg-info build

dev-install:
	pip install -e .

install:
	pip install .

package:
	python setup.py bdist

format:
	black -t py36 -l 100 gpflow tests doc setup.py

test:
	pytest -v --durations=10 tests/
back to top