Comments (5)
Hi, we have tested mongoDB connection and able to write cleaned raw data into database, which ensured that connection is established. You can have a look at test case under Tests>>Automate Test cases>>test_ai.py
Revert to us in case of any questions.
from dxc-industrialized-ai-starter.
I saw the code below in test_ai.py. It seems if for any reason the connection things didn't workout it will print mongodb connnection failed. I am looking for something to test api keys specifically.
Let's say before starting a project i want to ensure my keys are working. I import the ai library...i don't have the dataset yet. How do i test my keys in this scenraio.
Note : Assuming i understood below code correctly.
try:
wrt_raw_data = ai.write_raw_data(data_layer, raw_data, date_fields)
except:
print('----------MONGODB CONNECTION FAILED----------')
from dxc-industrialized-ai-starter.
Hello @Amar244. You can use below code snippet to check MongoDB connection.
from pymongo import MongoClient
client = MongoClient("mongodb://{user}:{password}@{host}:{port}")
db = client.{database}
try: db.command("serverStatus")
except Exception as e: print(e)
else: print("You are connected!")
client.close()
In our test cases we are focusing on complete end to end testing in MongoDB data insertion. When we run our tests then automatically it will take care about this connection string also.
If you have any doubts in using above code snippet, please reach out to me I can help you.
from dxc-industrialized-ai-starter.
Hi ,
If i understand correctly the above code works if you have a password and a username. However i do believe this AI Library takes api keys as input to connect to the server. i am looking for something like ai.test_keys() method or function to return True or False if my keys are working and able to reach the server.
from dxc-industrialized-ai-starter.
Hi @npulagam ,
The code you presented seems to provide a way for me to test to my connection.
Thank you.
from pymongo import MongoClient
client = MongoClient("mongodb://{user}:{password}@{host}:{port}")
db = client.{database}
try: db.command("serverStatus")
except Exception as e: print(e)
else: print("You are connected!")
client.close()
from dxc-industrialized-ai-starter.
Related Issues (20)
- Code failed when try to import dxc ai - bug level : Blocker HOT 1
- [BUG] Loose Dependency Resolver Constraints HOT 3
- Add logs to the crucial steps HOT 1
- Add the drift function after pipeline HOT 1
- Provide Auto-ML documentation link in user guide for running models HOT 1
- Indicate the completeness or correctness of the data and show the outliers HOT 1
- Research- Add encryption to the published microservice HOT 1
- Unclear "Set up the development environment" instructions HOT 1
- Cannot upload a local file into Colab HOT 2
- List of available data sets not available HOT 2
- custom dataset creation for images HOT 1
- Develop a function to download datasets directly from DXC public github HOT 2
- Add separator parameter for reading csv files with ai.read_data_frame_from_local_csv() HOT 1
- ai.clean_dataframe() unable to parse date formatted in MM/D/YYYY HOT 2
- Read data from local excel file in Colab HOT 1
- distplot is a deprecated HOT 1
- [BUG] Unable to run AI experiments for Time-Series problems HOT 4
- Cant resubmit after rework on badge HOT 2
- [BUG] Pandas.IO.JSON.JSON_Normalize is depreceated, (Build Data Pipeline) HOT 1
- [BUG] Error when importing ai package HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dxc-industrialized-ai-starter.