Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataset migration #57

Merged
merged 1 commit into from
May 25, 2024
Merged

dataset migration #57

merged 1 commit into from
May 25, 2024

Conversation

akshat-g
Copy link
Contributor

@akshat-g akshat-g commented May 16, 2024

Summary by CodeRabbit

  • New Features

    • Added data_source attribute to datasets, enhancing dataset metadata.
  • Improvements

    • Updated API endpoints for dataset creation and row addition to /api/v1/dataset_v2 for better versioning.
  • Documentation

    • Enhanced dataset creation example notebook with additional outputs and a new cell to print dataset.id.

Copy link
Contributor

coderabbitai bot commented May 16, 2024

Walkthrough

The updates across various files introduce a new data_source attribute to the Dataset class, modify API endpoints for dataset creation and row addition, and enhance a Jupyter notebook with execution counts and output displays. These changes aim to improve dataset handling and API interactions while providing better feedback during notebook execution.

Changes

Files Change Summary
athina/datasets/dataset.py Added data_source attribute to Dataset class and included it in the create method.
athina/services/athina_api_service.py Updated dataset creation and row addition endpoints to new versions (_v2).
examples/dataset_creation.ipynb Set execution_count, added outputs with warnings, and introduced a new cell to print dataset.id.

In code's domain, a change so bright,
With data_source, we set our flight.
Endpoints new, to v2 they steer,
Enhancing flows, making them clear.
In notebooks, outputs now do show,
A rabbit's joy, as data grows.
🌟✨🐇


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Out of diff range and nitpick comments (10)
athina/datasets/dataset.py (2)

Line range hint 43-58: Improve exception handling by logging the exception message.

-        except Exception as e:
-            raise
+        except Exception as e:
+            print(f"Failed to create dataset: {e}")
+            raise

Line range hint 66-78: Improve exception handling by logging the exception message.

-            except Exception as e:
-                raise
+            except Exception as e:
+                print(f"Failed to add rows: {e}")
+                raise
athina/services/athina_api_service.py (8)

Line range hint 41-85: Remove the unused variable e in the exception handling.

-        except Exception as e:
-            print("Exception fetching inferences", e)
+        except Exception:
+            print("Exception fetching inferences")

Line range hint 87-101: Remove the unused variable e in the exception handling.

-        except Exception as e:
-            pass
+        except Exception:
+            pass

Line range hint 103-150: Remove the unused variable e in the exception handling.

-        except Exception as e:
-            print(
-                f"An error occurred while posting eval results",
-                str(e),
-            )
+        except Exception:
+            print(
+                "An error occurred while posting eval results"
+            )

Line range hint 132-147: Remove the unused variable e in the exception handling.

-        except Exception as e:
-            raise
+        except Exception:
+            raise

Line range hint 169-184: Remove the unused variable e in the exception handling.

-        except Exception as e:
-            raise
+        except Exception:
+            raise

Line range hint 186-217: Remove the unused variable e in the exception handling.

-        except Exception as e:
-            print(
-                f"An error occurred while creating eval request",
-                str(e),
-            )
+        except Exception:
+            print(
+                "An error occurred while creating eval request"
+            )

Line range hint 219-261: Remove the unused variable e in the exception handling.

-        except Exception as e:
-            print(
-                f"An error occurred while posting experiment metadata",
-                str(e),
-            )
+        except Exception:
+            print(
+                "An error occurred while posting experiment metadata"
+            )

Line range hint 263-330: Remove the unused variable e in the exception handling.

-        except Exception as e:
-            raise
+        except Exception:
+            raise
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between b6aa8f0 and 57ed947.
Files selected for processing (3)
  • athina/datasets/dataset.py (3 hunks)
  • athina/services/athina_api_service.py (2 hunks)
  • examples/dataset_creation.ipynb (3 hunks)
Additional Context Used
Ruff (15)
athina/datasets/dataset.py (5)

1-1: json imported but unused


3-3: requests imported but unused


4-4: dataclasses.asdict imported but unused


56-56: Local variable e is assigned to but never used


78-78: Local variable e is assigned to but never used

athina/services/athina_api_service.py (10)

3-3: dataclasses.asdict imported but unused


6-6: athina.errors.exceptions.NoAthinaApiKeyException imported but unused


85-85: Local variable e is assigned to but never used


119-119: f-string without any placeholders


150-150: Local variable e is assigned to but never used


186-186: Local variable e is assigned to but never used


217-217: f-string without any placeholders


261-261: f-string without any placeholders


304-304: f-string without any placeholders


330-330: Local variable e is assigned to but never used

Additional comments not posted (7)
examples/dataset_creation.ipynb (4)

5-16: No issues found in this cell.


Line range hint 31-52: No issues found in this cell.


53-60: No issues found in this cell.


Line range hint 61-78: No issues found in this cell.

athina/datasets/dataset.py (2)

Line range hint 1-12: No issues found in the DatasetRow class.


Line range hint 79-81: No issues found in the dataset_link method.

athina/services/athina_api_service.py (1)

Line range hint 17-20: No issues found in the _headers method.

@akshat-g akshat-g merged commit 0029300 into main May 25, 2024
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.

None yet

1 participant