google / uv-metrics Goto Github PK
View Code? Open in Web Editor NEWComposable metric reporters in Python.
Home Page: https://uv-metrics.readthedocs.io
License: Apache License 2.0
Composable metric reporters in Python.
Home Page: https://uv-metrics.readthedocs.io
License: Apache License 2.0
On workstation, the command make build
fails when trying to create an VirtualEnv with python3.6
installation. The full output is as follows:
rm -rf env
rm -rf .tox
rm -rf .coverage
find . -name \*.pyc -type f -delete
find . -name \*.test.db -type f -delete
find . -depth -name __pycache__ -type d -exec rm -rf {} \;
rm -rf dist *.egg* build
rm -rf env
virtualenv -p python3.6 env
RuntimeError: failed to find interpreter for Builtin discoverer of python_spec='python3.6'
make: *** [Makefile:43: install] Error 1
So it's the command virtualenv -p python3.6 env
which is failing, and this same failure happens when I try to run that command in shell.
As @ajslone suggested, changing the version to python3
, i.e. using the command virtualenv -p python3 env
by changing the variable PYTHON_BIN=python3
in the makefile does work.
Situation: I was making changes to tests in test_measurementmanager.py
, and while I was testing, the test_sql_roundtrip
failed a couple times in succession, even though I hadn't touched that file.
A second test failed again, but a third passed. This seems stochastic.
Here is the failure:
========================================== FAILURES ==========================================
_____________________________________ test_sql_roundtrip _____________________________________
tmp_path = PosixPath('/tmp/pytest-of-ramasesh/pytest-18/test_sql_roundtrip0')
def test_sql_roundtrip(tmp_path):
engine = u.sqlite_engine(str(tmp_path))
# you can't make a reporter with an engine pointing to a nonexistent DB:
with pytest.raises(Exception):
sr.SQLReporter(engine, sr.Experiment(id=10), 0)
# Same goes for reader.
with pytest.raises(Exception):
sr.SQLReader(engine, sr.Experiment(id=10), 0)
sr.create_tables(engine)
experiment = sr.new_experiment(engine, {"learning_rate": 0.01})
with closing(sr.SQLReporter(engine, experiment, 0)) as reporter:
with closing(reporter.reader()) as reader:
with closing(sr.SQLReader(engine, experiment, 0)) as reader2:
> reporter.report_all(0, {"a": 1})
tests/uv/sql/test_sql.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
uv/sql/reporter.py:118: in report_all
session.add_all([self._metric(step, k, v) for k, v in m.items()])
uv/sql/reporter.py:118: in <listcomp>
session.add_all([self._metric(step, k, v) for k, v in m.items()])
uv/sql/reporter.py:110: in _metric
return Metric(experiment_id=self._experiment.id,
env/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py:287: in __get__
return self.impl.get(instance_state(instance), dict_)
env/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py:718: in get
value = state._load_expired(state, passive)
env/lib/python3.8/site-packages/sqlalchemy/orm/state.py:652: in _load_expired
self.manager.deferred_scalar_loader(self, toload)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mapper = <Mapper at 0x7fba3a2211f0; Experiment>
state = <sqlalchemy.orm.state.InstanceState object at 0x7fba39f08e80>
attribute_names = {'id', 'params'}
def load_scalar_attributes(mapper, state, attribute_names):
"""initiate a column-based attribute refresh operation."""
# assert mapper is _state_mapper(state)
session = state.session
if not session:
> raise orm_exc.DetachedInstanceError(
"Instance %s is not bound to a Session; "
"attribute refresh operation cannot proceed" % (state_str(state))
)
E sqlalchemy.orm.exc.DetachedInstanceError: Instance <Experiment at 0x7fba39f08d00> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error
at: http://sqlalche.me/e/13/bhk3)
env/lib/python3.8/site-packages/sqlalchemy/orm/loading.py:944: DetachedInstanceError
To start editing some docs, I ran make build
in the root directory to get the env
folder setup, and then ran sphinx-reload docs
. I get the error
/bin/sh: ../env/bin/sphinx-build: No such file or directory
Looking in the env/bin
folder, there is no sphinx-build. However, there is one in the Caliban env/bin
folder, so somehow the setup is not happening in UV in the same way.
An example of this can be seen here: https://github.com/google/uv-metrics/runs/1097920935
We get the following error message:
2020-09-10 17:52:54.571909: W tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to cuInit: UNKNOWN ERROR (303)
2020-09-10 17:52:54.571931: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (fv-az12): /proc/driver/nvidia/version does not exist
2020-09-10 17:52:54.572223: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-09-10 17:52:54.578381: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2294685000 Hz
2020-09-10 17:52:54.578542: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560b84667430 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-09-10 17:52:54.578560: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:From /home/runner/work/uv-metrics/uv-metrics/tests/uv/tensorflow/test_reporter.py:38: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.
Instructions for updating:
Use eager execution and:
`tf.data.TFRecordDataset(path)`
For some reason, this doesn't happen always, but seemingly randomly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.