Four fixes for RASP Tutorial (#391)#458
Closed
MisterTea wants to merge 1 commit intofacebookresearch:masterfrom
Closed
Four fixes for RASP Tutorial (#391)#458MisterTea wants to merge 1 commit intofacebookresearch:masterfrom
MisterTea wants to merge 1 commit intofacebookresearch:masterfrom
Conversation
Summary: When trying to follow the [tutorial](https://reagent.ai/rasp_tutorial.html) there are a few things that need fixing: 1. When running the script serving/scripts/rasp_to_model.py I came across this error ``` python serving/scripts/rasp_to_model.py /tmp/rasp_logging/log.txt /tmp/input_df.pkl Traceback (most recent call last): File "serving/scripts/rasp_to_model.py", line 13, in <module> logger.setLevel(logging.info) File "/usr/local/anaconda3/envs/reagent/lib/python3.7/logging/__init__.py", line 1353, in setLevel self.level = _checkLevel(level) File "/usr/local/anaconda3/envs/reagent/lib/python3.7/logging/__init__.py", line 195, in _checkLevel raise TypeError("Level not an integer or a valid string: %r" % level) TypeError: Level not an integer or a valid string: <function info at 0x7fb8000d73b0> ``` Luckily it is an easy fix to pass an actual loglevel. 2. This config file probably is outdated: serving/examples/ecommerce/training/contextual_bandit.yaml - changed indentation level - changed key name 3. There is an __init__.py file missing in the gym tests therefore leading to an error 4. The path to the SPARK_JAR was not resolving correctly. Pull Request resolved: facebookresearch#391 Test Plan: Imported from GitHub, without a `Test Plan:` line. ...but without running open source tests. Reviewed By: czxttkl Differential Revision: D27842451 Pulled By: MisterTea fbshipit-source-id: 1531981ae918c05c9d5e844928eed8d12002ea1d
|
This pull request was exported from Phabricator. Differential Revision: D27842451 |
|
@MisterTea merged this pull request in 322a542. |
|
Hello @MisterTea, When I try to run the contextual bandit section of the demo: The RASP server is throwing the following error: so I believe there are more changes needed to the format the data from the /api/request endpoint into the model? |
xuruiyang
pushed a commit
that referenced
this pull request
Sep 20, 2025
Summary: Pull Request resolved: #458 When trying to follow the [tutorial](https://reagent.ai/rasp_tutorial.html) there are a few things that need fixing: 1. When running the script serving/scripts/rasp_to_model.py I came across this error ``` python serving/scripts/rasp_to_model.py /tmp/rasp_logging/log.txt /tmp/input_df.pkl Traceback (most recent call last): File "serving/scripts/rasp_to_model.py", line 13, in <module> logger.setLevel(logging.info) File "/usr/local/anaconda3/envs/reagent/lib/python3.7/logging/__init__.py", line 1353, in setLevel self.level = _checkLevel(level) File "/usr/local/anaconda3/envs/reagent/lib/python3.7/logging/__init__.py", line 195, in _checkLevel raise TypeError("Level not an integer or a valid string: %r" % level) TypeError: Level not an integer or a valid string: <function info at 0x7fb8000d73b0> ``` Luckily it is an easy fix to pass an actual loglevel. 2. This config file probably is outdated: serving/examples/ecommerce/training/contextual_bandit.yaml - changed indentation level - changed key name 3. There is an __init__.py file missing in the gym tests therefore leading to an error 4. The path to the SPARK_JAR was not resolving correctly. Pull Request resolved: #391 Test Plan: Imported from GitHub, without a `Test Plan:` line. ...but without running open source tests. Reviewed By: czxttkl Differential Revision: D27842451 Pulled By: MisterTea fbshipit-source-id: 2175296c6b60db4dc4b22804a74c2259b14fee7e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
When trying to follow the tutorial there are a few things that need fixing:
Luckily it is an easy fix to pass an actual loglevel.
There is an init.py file missing in the gym tests therefore leading to an error
The path to the SPARK_JAR was not resolving correctly.
Pull Request resolved: #391
Test Plan:
Imported from GitHub, without a
Test Plan:line....but without running open source tests.
Reviewed By: czxttkl
Differential Revision: D27842451
Pulled By: MisterTea