-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5c7bcf
commit aff1f38
Showing
6 changed files
with
140 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import json | ||
|
||
import fire | ||
import pandas as pd | ||
|
||
|
||
def create_example_request() -> None: | ||
example_df = pd.DataFrame( | ||
[ | ||
{ | ||
"season": "spring", | ||
"month": 1, | ||
"hour": 0, | ||
"holiday": False, | ||
"weekday": 6, | ||
"workingday": False, | ||
"weather": "clear", | ||
"temp": 9.84, | ||
"feel_temp": 14.395, | ||
"humidity": 0.81, | ||
"windspeed": 0.0, | ||
} | ||
] | ||
) # This is the first row of the training split | ||
with open("example_request.json", "w") as f: | ||
json.dump({"dataframe_split": example_df.to_dict(orient="split")}, f) | ||
|
||
|
||
if __name__ == "__main__": | ||
fire.Fire() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"dataframe_split": { | ||
"index": [0], | ||
"columns": [ | ||
"season", | ||
"month", | ||
"hour", | ||
"holiday", | ||
"weekday", | ||
"workingday", | ||
"weather", | ||
"temp", | ||
"feel_temp", | ||
"humidity", | ||
"windspeed" | ||
], | ||
"data": [["spring", 1, 0, false, 6, false, "clear", 9.84, 14.395, 0.81, 0.0]] | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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