Skip to content

Four fixes for RASP Tutorial#391

Closed
roelbertens wants to merge 6 commits intofacebookresearch:masterfrom
roelbertens:master
Closed

Four fixes for RASP Tutorial#391
roelbertens wants to merge 6 commits intofacebookresearch:masterfrom
roelbertens:master

Conversation

@roelbertens
Copy link
Copy Markdown
Contributor

@roelbertens roelbertens commented Feb 5, 2021

When trying to follow the tutorial 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.

  1. This config file probably is outdated: serving/examples/ecommerce/training/contextual_bandit.yaml
  • changed indentation level
  • changed key name
  1. There is an init.py file missing in the gym tests therefore leading to an error

  2. The path to the SPARK_JAR was not resolving correctly.

@facebook-github-bot
Copy link
Copy Markdown

Hi @roelbertens!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@roelbertens roelbertens changed the title Fix typo in logging Fix typo in logging that was breaking rasp_to_model.py Feb 5, 2021
@roelbertens roelbertens changed the title Fix typo in logging that was breaking rasp_to_model.py Two fixes for RASP Tutorial Feb 11, 2021
-fix SPARK_JAR path
@roelbertens roelbertens changed the title Two fixes for RASP Tutorial Four fixes for RASP Tutorial Feb 12, 2021
@facebook-github-bot
Copy link
Copy Markdown

@MisterTea has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

MisterTea pushed a commit to MisterTea/ReAgent that referenced this pull request Apr 20, 2021
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
@facebook-github-bot
Copy link
Copy Markdown

@MisterTea merged this pull request in 322a542.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants