Open Netceor opened 2 years ago
Now I have solved part of the problem, currently there are only two types of error.
File "/home/myx/.cache/bazel/_bazel_myx/d2a33cf9a94393d7ef91227effa0186e/execroot/bark_ml/bazel-out/k8-fastbuild/bin/examples/qrdqn.runfiles/bark_ml/bark_ml/library_wrappers/lib_fqf_iqn_qrdqn/agent/base_agent.py", line 131, in reset_action_observer
self._observer = self._env._observer
File "/home/myx/anaconda3/envs/bark-ml/lib/python3.7/site-packages/gym/core.py", line 228, in __getattr__
raise AttributeError(f"attempted to get missing private attribute '{name}'")
AttributeError: attempted to get missing private attribute '_observer'
File "/home/myx/.cache/bazel/_bazel_myx/d2a33cf9a94393d7ef91227effa0186e/execroot/bark_ml/bazel-out/k8-fastbuild/bin/examples/tfa_counterfactual.runfiles/bark_ml/bark_ml/environments/counterfactual_runtime.py", line 169, in TraceCounterfactualWorldStats
collision_rate = local_tracer.collision_rate
AttributeError: 'Tracer' object has no attribute 'collision_rate'
Tracer
import through from bark_ml.commons.tracer import Tracer
,and in bark_ml/commons/tracer.py
, the context as follows:
import pickle
class Tracer:
"""The tracer can be used to log certain values during episodes."""
def __init__(self, states=None, trace_history=True):
self._trace_history = trace_history
self._states = []
def Trace(self, eval_dict):
"""Traces and stores a state."""
if self._trace_history:
self._states.append(eval_dict)
def Reset(self):
self._trace_history = []
There are no collision_rate
、success_rate
params which is running counterfactual_runtime needed
Hi,
thanks a lot for your interest in our bark-ml. Sorry for these bugs, we noticed them in June, and just had time to fix them. These bugs should be fixed in the latest commit. If you still have problems with running them, pls. raise your question here again. Thanks and best
Sorry to bother you, for some reason many of my projects fail, such as fqf、iqn、qrdqn、tfa_counterfactual
I use code like
bazel run //examples:Project
to run these.The following are some error details, I do not know how to solve.But among these items, I care most about item tfa_counterfactual. If you can solve my questions, I would be very grateful!
I try to modify the code in
fqf.py
. Changeagent = FQFAgent(env=env, test_env=env, params = params)
toagent = FQFAgent(env=env, params = params)
, but new error occurs.In base_agent.py, there has a function,but error will say that no attribute '_observer' and '_ml_behavior'
I add
import bark_ml.environments.gym
iniqn.py
, but new error occurs.This is the same mistake, but I don't know how to solove it.
Similar to
fqf
, I changed the code incounterfactual_runtime.py
And new error occurs.
I Find that
Tracer
import throughfrom bark_ml.commons.tracer import Tracer
,and inbark_ml/commons/tracer.py
, the context as follows: