shashist / recsys-rl Goto Github PK
View Code? Open in Web Editor NEWCourse project for https://deeppavlov.ai/rl_course_2020
Course project for https://deeppavlov.ai/rl_course_2020
Running the last cell produces this error: IndexError Traceback (most recent call last) Cell In[54], line 12 10 for in range(3): _11 action_emb = model(state_representation(user, memory)) ---> 12 action = model.get_action( 13 user, 14 torch.tensor(example_env.memory[to_np(user).astype(int), :]), 15 state_representation, 16 action_emb, 17 torch.tensor( 18 [item for item in example_env.available_items 19 if item not in example_env.viewed_items] 20 ).long() 21 ) 22 user, memory, reward, _= example_env.step(action) 23 preds.append(action) Cell In[5], line 32 30 return scores, torch.gather(items, 0, scores.argmax(0)) 31 else: ---> 32 return torch.gather(items, 0, scores.argmax(0));
Hello,
Does anyone have the same problem as me?
I install ranger by
pip install ranger-fm
and there is no error report when I type "import ranger"
but "from ranger import Ranger" doesn't work.
as follow:
(py36_torch) โ ~ python
Python 3.6.13 |Anaconda, Inc.| (default, Feb 23 2021, 12:58:59)
[GCC Clang 10.0.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ranger
>>> from ranger import Ranger
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'Ranger'
Hello! I notice that 'reward' is pushed twice in step() in block 4 but the sample() in block 11 get 'done' in the same place. I am a little bit confused about it. I also don't understand why you multiply (1.0-done) in value learning in block 11? Could you please explain it? Thank you in advance!
Hello, in the fourth part of the code, the folder is invalid. Can you resend it?
Hi, I was trying to experiment with https://github.com/shashist/recsys-rl
However, I'm getting: NameError: name 'Ranger' is not defined
I installed ranger package, that didn't help either.
Any help is highly appreciated.
it seems run_evalution only resets before for batch in loader
. If batch['user'] changes, memory returned by env would be invalid.
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.