Skip to content

Conversation

@alok
Copy link
Contributor

@alok alok commented May 4, 2018

What do these changes do?

Everybody loves that sweet sweet (syntactic) sugar.

Since we typically care about the .data attribute, but may not want to just
subclass dict (I assume), we can use dict's already implemented magic methods
to clean up syntax. These let us just treat rollouts more or less as dicts.

Related issue number

None.

Since we typically care about the `.data` attribute, but may not want to just
subclass dict (I assume), we can use `dict`'s already implemented magic methods
to clean up syntax. These let us just treat rollouts more or less as dicts.
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/5208/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/5210/
Test FAILed.

@alok
Copy link
Contributor Author

alok commented May 9, 2018

I'd appreciate if someone could take a look at this. The Jenkins build errors out and I'm not really sure why since these changes are either formatting or (I'd think) simple rewrites to use equivalent methods.

@robertnishihara
Copy link
Collaborator

Jenkins retest this please.

@robertnishihara
Copy link
Collaborator

Thanks @alok, the primary changes look good to me, but can you address the linting errors?

Flake8 is failing with

./python/ray/rllib/utils/sampler.py:84:1: E302 expected 2 blank lines, found 1

and yapf is failing with a bunch of errors. You shouldn't need to change the formatting of any lines beyond the ones you modified in the initial commit I think.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/5294/
Test PASSed.

alok added 2 commits May 9, 2018 20:55
* master:
  [DataFrame] Add direct pandas imports for MVP (ray-project#1960)
  Make ActorHandles pickleable, also make proper ActorHandle and ActorC… (ray-project#2007)
  Expand local_dir in Trial init (ray-project#2013)
  Fixing ascii error for Python2 (ray-project#2009)
  [DataFrame] Implements df.update (ray-project#1997)
  [DataFrame] Implements df.as_matrix (ray-project#2001)
  [DataFrame] Implement quantile (ray-project#1992)
  [DataFrame] Impement sort_values and sort_index (ray-project#1977)
  [DataFrame] Implement rank (ray-project#1991)
  [DataFrame] Implemented prod, product, added test suite (ray-project#1994)
  [DataFrame] Implemented __setitem__, select_dtypes, and astype (ray-project#1941)
  [DataFrame] Implement diff (ray-project#1996)
  [DataFrame] Implemented nunique, skew (ray-project#1995)
  [DataFrame] Implements filter and dropna (ray-project#1959)
  [DataFrame] Implements df.pipe (ray-project#1999)
  [DataFrame] Apply() for Lists and Dicts (ray-project#1973)
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/5298/
Test FAILed.

@alok
Copy link
Contributor Author

alok commented May 9, 2018

I decided it might just be easier to put in another PR with no formatting changes. See #2024.

@alok alok closed this May 9, 2018
@alok alok deleted the magic-methods branch May 21, 2018 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants